logLik.mlmm: Log-Likelihood From Multiple Linear Mixed Models

View source: R/logLik.R

logLik.mlmmR Documentation

Log-Likelihood From Multiple Linear Mixed Models

Description

Extract or compute the log-likelihood from each group-specific Linear Mixed Model.

Usage

## S3 method for class 'mlmm'
logLik(object, newdata = NULL, p = NULL, indiv = FALSE, ...)

Arguments

object

a mlmm object.

newdata

[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

[list of numeric vector] values for the model parameters 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

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

Value

A numeric vector when indiv=FALSE (log-likelihood per model) or a matrix of numeric values when when indiv=TRUE with one line for each cluster and one column for each model.


bozenne/repeated documentation built on July 16, 2025, 11:16 p.m.