glm,
bdGlm, and
gam.
family(object) binomial(link=logit) gaussian() Gamma(link=inverse) inverse.gaussian() poisson(link=log) quasi(link=identity, variance=constant)
logit,
probit,
cloglog,
identity,
inverse,
log,
"1/mu^2", and
sqrt.
Not all links are suitable for all families.
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.
gaussian.
glm,
bdGlm, and
gam in their iteratively reweighted least-squares algorithms.
See
family.object for 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
canonicallink for that family.
The
quasi name represents
Quasi-likelihoodand 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 * *
power can also be used to generate a
powerlink function object for use with
quasi;
power takes an argument
lambda.
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,
bdGlm, or
gam
with the default link, the empty parentheses
() can be omitted.
There is a
print method for the class
"family".
See
GAMMA for the functions related to the
gamma distribution:
dgamma (density),
pgamma (probability),
qgamma (quantile),
rgamma (sample).
See
gamma for the gamma function.
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!