\Header{logLik.lmList}{Log-Likelihood of an lmList Object}
\keyword{models}{logLik.lmList}
\begin{Description}\relax
If \code{pool=FALSE}, the (restricted) log-likelihoods of the \code{lm}
components of \code{object} are summed together. Else, the (restricted)
log-likelihood of the \code{lm} fit with different coefficients for
each level of the grouping factor associated with the partitioning of
the \code{object} components is obtained.
\end{Description}
\begin{Usage}
\begin{verbatim}
## S3 method for class 'lmList':
logLik(object, REML, pool, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{object}] an object inheriting from class \code{lmList}, representing
a list of \code{lm} objects with a common model.

\item[\code{REML}] an optional logical value. If \code{TRUE} the restricted
log-likelihood is returned, else, if \code{FALSE}, the log-likelihood
is returned. Defaults to \code{FALSE}.

\item[\code{pool}] an optional logical value indicating whether all \code{lm}
components of \code{object} may be assumed to have the same error
variance. Default is \code{attr(object, "pool")}.

\item[\code{...}] some methods for this generic require additional
arguments.  None are used in this method.
\end{ldescription}
\end{Arguments}
\begin{Value}
either the sum of the (restricted) log-likelihoods of each \code{lm}
component in \code{object}, or the (restricted) log-likelihood for the
\code{lm} fit with separate coefficients for each component of
\code{object}.
\end{Value}
\begin{Author}\relax
Jose Pinheiro \email{Jose.Pinheiro@pharma.novartis.com} and Douglas Bates \email{bates@stat.wisc.edu}
\end{Author}
\begin{SeeAlso}\relax
\code{\Link{lmList}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
data(Orthodont)
fm1 <- lmList(distance ~ age | Subject, Orthodont)
logLik(fm1)   # returns NA when it should not
\end{ExampleCode}
\end{Examples}

