Learn R Programming

tramME (version 0.1.3)

model.matrix.tramME: Model matrix for tramME mdoels

Description

Creates the model matrix of fixed and random effects corresponding a tramME model from a data.frame of response and covariate values.

Usage

# S3 method for tramME
model.matrix(
  object,
  data = model.frame(object),
  type = c("fixef", "ranef"),
  with_baseline = TRUE,
  ...
)

Arguments

object

A tramME object.

data

A data.frame containing the variable values.

type

Either "fixef" or "ranef".

with_baseline

Logical; indicating whether the returned fixed effects model matrix should contain the columns corresponding to the baseline transfromation. (ignored when type = "ranef")

...

Additional arguments.