simulate.tramME: Simulate from a 'tramME' model

View source: R/simulate.R

simulate.tramMER Documentation

Simulate from a tramME model

Description

Simulate from a tramME model

Usage

## S3 method for class 'tramME'
simulate(
  object,
  nsim = 1,
  seed = NULL,
  newdata = model.frame(object),
  type = c("ranef", "response", "joint"),
  ...
)

Arguments

object

A tramME object.

nsim

number of samples to generate

seed

optional seed for the random number generator

newdata

an optional data frame of observations

type

Defaults to "ranef". Currently the only avalable option.

...

Additional arguments, passed to simulate.mlt.

Value

A length nsim list of draws.

Warning

This method is under active development and may be subject to change. It is currently limited to simulating random effects.

Examples

data("sleepstudy", package = "lme4")
fit <- BoxCoxME(Reaction ~ Days + (Days | Subject), data = sleepstudy)
sim <- simulate(fit, nsim = 10, seed = 123)

tramME documentation built on July 9, 2023, 7:10 p.m.