Learn R Programming

glmmrBase (version 1.0.0)

logLik.mcml: Extracts the log-likelihood from an mcml object

Description

Extracts the final log-likelihood value from an mcml object returned from call of `MCML` or `LA` in the Model class. The fitting algorithm estimates the fixed effects, random effects, and covariance parameters all separately. The log-likelihood is separable in the fixed and covariance parameters, so one can return the log-likelihood for either component, or the overall log-likelihood.

Usage

# S3 method for mcml
logLik(object, fixed = TRUE, covariance = TRUE, ...)

Value

An object of class `logLik`. If both `fixed` and `covariance` are FALSE then it returns NA.

Arguments

object

An `mcml` model fit.

fixed

Logical whether to include the log-likelihood value from the fixed effects.

covariance

Logical whether to include the log-likelihood value from the covariance parameters.

...

Further arguments passed from other methods