\HeaderA{coef}{Extract Model Coefficients}{coef}
\aliasA{coefficients}{coef}{coefficients}
\keyword{regression}{coef}
\keyword{models}{coef}
\begin{Description}\relax
\code{coef} is a generic function which extracts model coefficients
from objects returned by modeling functions.  \code{coefficients} is
an \emph{alias} for it.
\end{Description}
\begin{Usage}
\begin{verbatim}
coef(object, ...)
coefficients(object, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{object}] an object for which the extraction of model coefficients is
meaningful.
\item[\code{...}] other arguments.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
All object classes which are returned by model fitting functions
should provide a \code{coef} method or use the default one.
(Note that the method is for \code{coef} and not \code{coefficients}.)

Class \code{"aov"} has a \code{coef} method that does not report
aliased coefficients (see \code{\LinkA{alias}{alias}}).
\end{Details}
\begin{Value}
Coefficients extracted from the model object \code{object}.
\end{Value}
\begin{References}\relax
Chambers, J. M. and Hastie, T. J. (1992)
\emph{Statistical Models in S}.
Wadsworth \& Brooks/Cole.
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{fitted.values}{fitted.values}} and \code{\LinkA{residuals}{residuals}} for related methods;
\code{\LinkA{glm}{glm}}, \code{\LinkA{lm}{lm}} for model fitting.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
x <- 1:5; coef(lm(c(1:3,7,6) ~ x))
\end{ExampleCode}
\end{Examples}

