Learn R Programming

tramME (version 0.1.3)

logLik.tramME: Get the log-likelihood of the model

Description

Get the log-likelihood of the model

Usage

# S3 method for tramME
logLik(
  object,
  param = c(coef(object, with_baseline = TRUE, fixed = FALSE), varcov(object, as.theta
    = TRUE)),
  newdata = NULL,
  ...
)

Arguments

object

A tramME object.

param

An optional vector of parameter values in the structure (beta, theta).

newdata

An optional data.frame to calculate the out-of-sample log-likelihood.

...

Optional argument (for consistency with generic).

Value

A numeric value of the log-likelihood.

Examples

Run this code
# NOT RUN {
data("sleepstudy", package = "lme4")
fit <- LmME(Reaction ~ Days + (Days | Subject), data = sleepstudy)
logLik(fit)
# }

Run the code above in your browser using DataLab