family.object
Family of GLM Models

Description

A class of objects returned by one of the family functions.
Value
a valid family object must contain the following components:

family character giving the family name.
link character giving the link name.
linkfun link function with argument mu that transforms from the scale of the mean to the scale of the linear or additive predictor eta.
linkinv function with argument eta that defines the inverse of the link.
variance function with argument mu that defines the variance function.
dev.resids function with three arguments: y, mu, wt that gives deviance residuals.
aic function with arguments: y, n, mu, wt, dev that gives the AIC value.
mu.eta function with argument eta that defines the derivative of the linkinv function.
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.

validmu logical function with argument mu that indicates the validity of mu in variance.
valideta logical function with argument eta that indicates the validity of eta in linkinv.
simulate simulate function with argument object, nsim, where object is a glm.object or lm.object and nsim is the number of simulations.

A list or vector is returned that contains simulated responses based on the fitted model.

This component is optional and is only available in family functions: binomial, gaussian, Gamma, inverse.gaussian, and poisson

varfun character name of variance function. This component is optional and only available in family function quasi.

The character could be "constant", "mu(1-mu)", "mu", "mu^2", and "mu^3".

Generation
This class of objects is returned by one of the family functions; for the available choices, see the family help file.
A family is a list of functions and expressions that define the IRLS iterations for fitting glm and gam models. The family objects provide flexibility in fitting generalized linear and generalized additive models. In particular, they allow construction of robust fitting algorithms and composite link functions.
See Also
family, make.family, make.link, gam, glm.
Examples
attributes(binomial()) 
gaussian()$initialize 
attributes(Gamma()) 
inverse.gaussian() 
poisson()$simulate 
quasi(variance="mu^2")$varfun
attributes(quasibinomial(link="logit"))
attributes(quasipoisson(link="log"))

Package stats version 6.1.1-7
Package Index