Description Usage Arguments Value Examples
View source: R/first_order_glm.R
First-Order GLM Maximum Likelihood Solution
1 2 3 4 5 6 7 8 9 10 | first_order_glm(
X,
y,
mu_fun,
maxit = 100,
tol = 1e-10,
size,
adapt = FALSE,
gamma = 0.9
)
|
X |
A matrix of independent variables |
y |
A vector of response variable |
mu_fun |
The function specifying the mean function in exponential family |
maxit |
Maximum number of iterations |
tol |
Tolerance for the convergence |
size |
A number specifying the constant step size in gradient descent |
adapt |
A logical value. If TRUE, we use momentum gradient descent. If FALSE, we use constant step size |
gamma |
A parameter controlling the momentum update |
A vector of fitted regression coefficients.
1 | ## Not run: first_order_glm(X, y,mu_fun = function(eta) exp(eta), size = 0.00001,adapt = FALSE,maxit = 1000)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.