A Family of GLM Models

DESCRIPTION:

A class of objects returned by one of the family functions.

GENERATION:

This class of objects is returned by one of the family functions; see the family help file for the available choices. A family is a list of functions and expressions that define the IRLS iterations for fitting glm and gam models. The family objects allow a great deal of flexibility in fitting generalized linear and generalized additive models. In particular, they allow construction of robust fitting algorithms and composite link functions.

STRUCTURE:

The following components and corresponding functionality are required for a valid family object.

VALUE:

family
character vector giving the family name, the link name, and the variance name.
link
function with argument mu that transforms from the scale of the mean to the scale of the linear or additive predictor eta.
inverse
function with argument eta that defines the inverse of the link.
deriv
function with argument mu that defines the derivative of the link.
initialize
expression to initialize the fitted values mu in the body of glm and gam. Other values can also be initialized, including the prior weights w and the maximum number of iterations maxit. Modifying the w and maxit expressions should be done with care, and is only recommended for experienced users. Other variables local to glm and gam can be initialized as well; see binomial()$initialize for an example. The initialize expression can be used to transform a response variable having specialized structure into the required vector response y. Once again, the binomial family serves as an example.
variance
function with argument mu that defines the variance function.
deviance
function with four arguments: mu, y, w, and residuals=F. The function returns the deviance, a quantity similar to the residual sum of squares for a Gaussian least squares model. If residuals=T, the deviance function returns a vector of deviance residuals whose weighted sum of squares is the deviance.
weight
expression for updating the iterative weights. For the binomial family, this is w*mu*(1 - mu), and for the gaussian family it is w, where w contains the prior weights.

SEE ALSO:

, , , .