family
objects specify characteristics of the
models used by functions such as glm
. The
families implemented in the stats
package include
binomial
, gaussian
,
Gamma
, inverse.gaussian
,
and poisson
, which are all special cases of
the exponential family of distributions that have probability mass
or density function of the form $$f(y; \theta, \phi) =
\exp\left\{\frac{y\theta - b(\theta) - c_1(y)}{\phi/m} -
\frac{1}{2}a\left(-\frac{m}{\phi}\right) + c_2(y)\right\} \quad y
\in Y \subset \Re\,, \theta \in \Theta \subset \Re\, , \phi >
0$$ where \(m > 0\) is an observation
weight, and \(a(.)\), \(b(.)\),
\(c_1(.)\) and \(c_2(.)\) are sufficiently
smooth, real-valued functions.
The current implementation of family
objects
includes the variance function (variance
), the deviance
residuals (dev.resids
), and the Akaike information criterion
(aic
). See, also family
.
The enrich
method can further enrich exponential
family
distributions with \(\theta\) in
terms of \(\mu\) (theta
), the functions
\(b(\theta)\) (bfun
), \(c_1(y)\)
(c1fun
), \(c_2(y)\) (c2fun
),
\(a(\zeta)\) (fun
), the first two derivatives of
\(V(\mu)\) (d1variance
and d2variance
,
respectively), and the first four derivatives of
\(a(\zeta)\) (d1afun
, d2afun
,
d3afun
, d4afun
, respectively).
Corresponding enrichment options are also avaialble for
quasibinomial
,
quasipoisson
and wedderburn
families.
The quasi
families are enriched with
d1variance
and d2variance
.
See enrich.link-glm
for the enrichment of
link-glm
objects.