Learn R Programming

tramME (version 1.0.7)

simulate.tramME: Simulate from a tramME model

Description

Simulate from a tramME model

Usage

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

Value

A length nsim list of draws.

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.

Warning

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

Examples

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

Run the code above in your browser using DataLab