Learn R Programming

tramME (version 0.1.3)

ranef.tramME: Extract the conditional modes and conditional variances of random effects

Description

Extract the conditional modes and conditional variances of random effects

Usage

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

Arguments

object

A tramME object.

param

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

newdata

An optional data.frame of new observations for which the new random effects values are predicted.

condVar

If TRUE, include the conditional variances as attributes.

raw

Return the unformatted RE estimates as fitted by the model.

...

Optional arguments (for consistency with generic)

Value

Depending on the value of raw, either a numeric vector or a ranef.tramME object which contains the conditional mode and variance estimates by grouping factors.

Examples

Run this code
# NOT RUN {
data("sleepstudy", package = "lme4")
fit <- BoxCoxME(Reaction ~ Days + (Days | Subject), data = sleepstudy, order = 5)
ranef(fit, raw = TRUE)
ranef(fit)
# }

Run the code above in your browser using DataLab