\Header{logLik}{Extract Log-Likelihood}
\alias{as.data.frame.logLik}{logLik}
\alias{print.logLik}{logLik}
\alias{str.logLik}{logLik}
\keyword{models}{logLik}
\begin{Description}\relax
This function is generic; method functions can be written to handle
specific classes of objects.  Classes which already have methods for
this function include: \code{glm}, \code{lm},
\code{nls} in package \pkg{nls}
and \code{gls}, \code{lme} and others in package \pkg{nlme}.\end{Description}
\begin{Usage}
\begin{verbatim}
logLik(object, ...)

## S3 method for class 'logLik':
as.data.frame(x, row.names = NULL, optional = FALSE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{object}] any object from which a log-likelihood value, or a
contribution to a log-likelihood value, can be extracted.
\item[\code{...}] some methods for this generic function require additional
arguments.
\item[\code{x}] an object of class \code{logLik}.
\item[\code{row.names, optional}] arguments to the \code{\Link{as.data.frame}}
method; see its documentation.
\end{ldescription}
\end{Arguments}
\begin{Value}
Returns an object, say \code{r}, of class \code{logLik} which is a
number with attributes, \code{attr(r, "df")} (\bold{d}egrees of
\bold{f}reedom) giving the number of parameters in the model.
There's a simple \code{print} method for \code{logLik} objects.

The details depend on the method function used; see the appropriate
documentation.\end{Value}
\begin{Author}\relax
Jose Pinheiro and Douglas Bates\end{Author}
\begin{SeeAlso}\relax
\code{\Link{logLik.lm}}, \code{\Link{logLik.glm}},
\code{\Link{logLik.gls}}, \code{\Link{logLik.lme}}, etc.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
## see the method function documentation
x <- 1:5
lmx <- lm(x ~ 1)
logLik(lmx) # using print.logLik() method
str(logLik(lmx))
\end{ExampleCode}
\end{Examples}

