model.frame.tramME: Extract model frame from a tramME model

View source: R/terms.R

model.frame.tramMER Documentation

Extract model frame from a tramME model

Description

Extract model frame from a tramME model

Usage

## S3 method for class 'tramME'
model.frame(
  formula,
  data = NULL,
  group_as_factor = FALSE,
  ignore_response = FALSE,
  ...
)

Arguments

formula

A tramME object.

data

a data.frame, list or environment (or object coercible by as.data.frame to a data.frame), containing the variables in formula. Neither a matrix nor an array will be accepted.

group_as_factor

Logical; If TRUE, automatically convert the grouping variables of the random effects to factors. (not used, might not be needed) ## FIXME

ignore_response

Logical; If TRUE, the response is not added to the result. In this case the function won't look for it in data.

...

Optional arguments, passed to model.frame.

Details

In mlt, the basis functions expect the response variables in the data to be evaluated, i.e. instead of x and y columns we should have a `Surv(x, y)` column when the response is a Surv object. model.frame.tramME builds the model frame accordingly, assigning to the resulting object the class tramME_data to indicate this structure to other functions that use its results. If the input data is a tramME_data is also expects this structure.

Value

A tramME_data object, which is also a data.frame.

Examples

data("sleepstudy", package = "lme4")
mod <- LmME(Reaction ~ Days + (Days | Subject), data = sleepstudy, nofit = TRUE)
model.frame(mod)

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