Enrich objects of class
family with family-specific
an object of class
a character vector with the names of the components to
extra arguments to be passed to the
family objects specify the details of the models used
by functions such as
glm. The families
implemented in the
stats package include
objects specify particular characteristics of distributions from
the exponential family. Such distributions have probability mass or
density function of the form
f(y, theta, phi) = exp((y * theta - b(theta) - c_1(y))/(phi/m) - a(-m/phi)/2 - c_2(y))
where m > 0 is an observation weight, and a(.), b(.), c_1(.) and c_2(.) are sufficiently smooth, real-valued functions.
The expected value and the variance of such distributions is mu = b'(theta) and phi * V(mu)/m, respectively, where V(mu) is called the variance function. The parameter phi is called a dispersion parameter.
Characteristics of the exponential family that are already
family objects include:
dev.resids: -2(y c_1'(mu) - y c_1'(y) -
b(c'(mu)) + b(c'(y)))
aic: -2*sum(log f(y, theta, phi)) + 2*delta
where delta is
1 if the family has a dispersion
quasi families differ from the other families in
that the variance function is not determined by the family but may
be supplied by the user. Also, the
quasipoisson families differ from the
poisson families only in
that the dipsersion parameter is estimated to account for
dev.resid is m*(y - mu)^2 . For
dev.resid is the same as
quasipoisson, respectively. The
NA for all
quasi families. See
quasi for more details.
enrich method can enrich
objects with extra characteristics of the family and of the chosen
link function. See
enrich.link-glm for the enrichment
object of class
returns the components and their descriptions.
1 2 3 4 5 6 7 8 9
## An example from ?glm to illustrate that things still work with ## enriched families counts <- c(18,17,15,20,10,20,25,13,12) outcome <- gl(3,1,9) treatment <- gl(3,3) print(d.AD <- data.frame(treatment, outcome, counts)) glm.D93 <- glm(counts ~ outcome + treatment, family = enrich(poisson())) anova(glm.D93) summary(glm.D93)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.