glm_constant: Gradient Descent for GLM (constant step)

Description Usage Arguments Value Author(s) Examples

View source: R/gradient_descent_glm.R

Description

Implement a first-order solution for the GLM maximum likelihood problem using only gradient information, avoiding the Hessian matrix.

Usage

1
glm_constant(X, Y, mu_fun, var_fun, maxit = 1e+06, tol = 1e-10, gamma = 1e-05)

Arguments

X

design matrix

Y

response vector

mu_fun

function from eta to the expected value

maxit

maximum number of iterations

tol

numeric tolerance parameter

gamma

The step size

Value

a list of beta coefficients

Author(s)

Yijun Yang

Examples

1
2
3
4
## Not run: 
glm_constant(X, Y, mu_fun = function(eta) 1/(1+exp(-eta)), var_fun = function(eta) eta)

## End(Not run)

yijunyang/bis557 documentation built on Dec. 21, 2020, 3:06 a.m.