coef is a generic function which extracts model coefficients
from objects returned by modeling functions.
an alias for it.
coef(object, ...) coefficients(object, ...) ## Default S3 method: coef(object, complete = TRUE, ...) ## S3 method for class 'aov' coef(object, complete = FALSE, ...)
an object for which the extraction of model coefficients is meaningful.
for the default (used for
All object classes which are returned by model fitting functions
should provide a
coef method or use the default one.
(Note that the method is for
coef and not
"aov" method does not report aliased coefficients (see
alias) by default where
complete = FALSE.
complete argument also exists for compatibility with
vcov methods, and
aov methods for
other classes should typically also keep the
complete = *
behavior in sync. By that, with
p <- length(coef(obj, complete = TF)),
dim(vcov(obj, complete = TF)) == c(p,p) will be fulfilled for both
complete settings and the default.
Coefficients extracted from the model object
For standard model fitting classes this will be a named numeric vector.
"maov" objects (produced by
aov) it will be a matrix.
Chambers, J. M. and Hastie, T. J. (1992) Statistical Models in S. Wadsworth & Brooks/Cole.
residuals for related methods;
lm for model fitting.
x <- 1:5; coef(lm(c(1:3, 7, 6) ~ x))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.