Extract or compute the log-likelihood of a linear mixed model.
# S3 method for lmm
logLik(object, newdata = NULL, p = NULL, indiv = FALSE, ...)
A numeric value (total logLikelihood) or a vector of numeric values, one for each cluster (cluster specific logLikelihood).
a lmm
object.
[data.frame] dataset relative to which the log-likelihood should be computed. Only relevant if differs from the dataset used to fit the model.
[numeric vector] value of the model coefficients at which to evaluate the log-likelihood. Only relevant if differs from the fitted values.
[logical] Should the contribution of each cluster to the log-likelihood be output? Otherwise output the sum of all clusters of the derivatives.
Not used. For compatibility with the generic method.
indiv: only relevant when using maximum likelihood. Must be FALSE
when using restricted maximum likelihood.