statmod (version 1.2.3)

glmgam.fit: 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.

Value

  • List with the following components:
  • coefficientsnumeric vector of regression coefficients
  • fittednumeric vector of fitted values
  • devianceresidual deviance
  • maxitinput maximum number of iterations
  • iternumber of iterations used to convergence. If convergence was not achieved then iter is set to maxit+1.

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.

Examples

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

Run the code above in your browser using DataCamp Workspace