Generate a Family Object

DESCRIPTION:
Generates a family object containing a list of functions and expressions used by glm and gam.

USAGE:
family(object)
binomial(link=logit)
gaussian()
Gamma(link=inverse)
inverse.gaussian()
poisson(link=log)
quasi(link=identity, variance=constant)

OPTIONAL ARGUMENTS:
link:
the choices of link functions are logit, probit, cloglog, identity, inverse, log, "1/mu^2", and sqrt. Not all links are suitable for all families.
variance:
the choices of variance functions are constant, mu(1-mu), mu, mu^2, and mu^3. This argument may be used only with quasi; each of the other families implies a variance function.
object:
any object from which a family object can be extracted. Typically a fitted model object, with a default of gaussian.

VALUE:
a family object, which is a list of functions and expressions used by glm and gam in their iteratively reweighted least-squares algorithms. See family.object for details.

DETAILS:
Each of the names, except for quasi and the family extractor function family, are associated with a member of the exponential family of distributions. As such, they have a fixed variance function. There is typically a choice of link functions, with the default corresponding to the canonical link for that family. The quasi name represents Quasi-likelihood and need not correspond to any particular distribution; rather quasi can be used to combine any available link and variance function.

The following table summarizes the suitable pairings: binomial gaussian Gamma inverse.gaussian poisson quasi logit * * probit * * cloglog * * identity * * * * inverse * * log * * * 1/mu^2 * * sqrt * *

The function power can also be used to generate a power link function object for use with quasi; power takes an argument lambda.

Users can construct their own families, as long as they have compatible components having the same names as those, for example, of binomial. The easiest way is to use quasi with home-made link and variance objects; otherwise make.family can be used, or else direct construction of the family object. When passed as an argument to glm or gam with the default link, the empty parentheses () can be omitted. There is a print method for the class "family".


SEE ALSO:
family.object , gam , glm , power , robust .

EXAMPLES:
binomial(link = probit) # generate binomial family with probit link
glm(formula, family = binomial)
robust(gaussian) # create a robust version of the gaussian family
gam(formula, family = robust(quasi(link = power(2))))  # the works!