logLik: Extract The Log-Likelihood From a Linear Mixed Model

Description Usage Arguments Details Value

Description

Extract or compute the log-likelihood of a linear mixed model.

Usage

1
2
## S3 method for class 'lmm'
logLik(object, data = NULL, p = NULL, indiv = FALSE, ...)

Arguments

object

a lmm object.

data

[data.frame] dataset relative to which the log-likelihood should be computed. Only relevant if differs from the dataset used to fit the model.

p

[numeric vector] value of the model coefficients at which to evaluate the log-likelihood. Only relevant if differs from the fitted values.

indiv

[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.

Details

transform:

indiv: only relevant when using maximum likelihood. Must be FALSE when using restricted maximum likelihood.

Value

A numeric value (total logLikelihood) or a vector of numeric values, one for each cluster (cluster specific logLikelihood).


LMMstar documentation built on Nov. 5, 2021, 1:07 a.m.