model.matrix.tramME: Model matrix for tramME mdoels

Description Usage Arguments Note

Description

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

Usage

1
2
3
4
5
6
7
8
## S3 method for class '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.

Note

The model matrix of the random effects is a sparse matrix and it is transposed to be directly used with Matrix::crossprod which is faster than transposing and multiplying.


tramME documentation built on Aug. 16, 2021, 5:08 p.m.