glmgam.fit {statmod}R Documentation

Gamma Generalized Linear Model with Identity Link

Description

Estimates a gamma generalized linear model with identity link using Fisher scoring with Levenberg damping.

Usage

glmgam.fit(X, y, start=NULL, tol=1e-6, maxit=50, trace=FALSE)

Arguments

X design matrix, assumed to be of full column rank. Missing values not allowed.
y numeric vector of responses. Negative or missing values not allowed.
start numeric vector of starting values for the regression coefficients
tol small positive numeric value giving convergence tolerance
maxit maximum number of iterations allowed
trace logical value. If TRUE then output diagnostic information at each iteration.

Details

This function is similar to glm.fit(X,y,family=Gamma(link="identity")) but has more secure convergence.

This function is used by randomizedBlockFit.

Value

List with the following components:

coefficients numeric vector of regression coefficients
fitted numeric vector of fitted values
deviance residual deviance
maxit input maximum number of iterations
iter number of iterations used to convergence. If convergence was not achieved then iter is set to maxit+1.

Author(s)

Gordon Smyth

Examples

y <- rgamma(10,shape=5)
X <- cbind(1,1:10)
fit <- glmgam.fit(X,y,trace=TRUE)

[Package statmod version 1.2.4 Index]