logLik.lmList {nlme}  R Documentation 
If pool=FALSE
, the (restricted) loglikelihoods of the lm
components of object
are summed together. Else, the (restricted)
loglikelihood of the lm
fit with different coefficients for
each level of the grouping factor associated with the partitioning of
the object
components is obtained.
## S3 method for class 'lmList': logLik(object, REML, pool, ...)
object 
an object inheriting from class lmList , representing
a list of lm objects with a common model.

REML 
an optional logical value. If TRUE the restricted
loglikelihood is returned, else, if FALSE , the loglikelihood
is returned. Defaults to FALSE .

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

... 
some methods for this generic require additional arguments. None are used in this method. 
either the sum of the (restricted) loglikelihoods of each lm
component in object
, or the (restricted) loglikelihood for the
lm
fit with separate coefficients for each component of
object
.
Jose Pinheiro Jose.Pinheiro@pharma.novartis.com and Douglas Bates bates@stat.wisc.edu
fm1 < lmList(distance ~ age  Subject, Orthodont) logLik(fm1) # returns NA when it should not