If
pool=FALSE, the (restricted) log-likelihoods of the
lm
components of
object are summed together. Else, the (restricted)
log-likelihood of the
lm fit with different coefficients for
each level of the grouping factor associated with the partitioning of
the
object components is obtained.
USAGE:
logLik(object, REML, pool)
REQUIRED ARGUMENTS:
object
an object inheriting from class
lmList, representing
a list of
lm objects with a common model.
OPTIONAL ARGUMENTS:
REML
an optional logical value. If
TRUE the restricted
log-likelihood is returned, else, if
FALSE, the log-likelihood
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").
VALUE:
either the sum of the (restricted) log-likelihoods of each
lm
component in
object, or the (restricted) log-likelihood for the
lm
fit with separate coefficients for each component of
object
.
SEE ALSO:
EXAMPLES:
fm1 <- lmList(distance ~ age | Subject, Orthodont)
logLik(fm1)