Learn R Programming

mmrm (version 0.3.14)

h_construct_model_frame_inputs: Construction of Model Frame Formula and Data Inputs

Description

Input formulas are converted from mmrm-style to a style compatible with default stats::model.frame() and stats::model.matrix() methods.

The full formula is returned so we can construct, for example, the model.frame() including all columns as well as the requested subset. The full set is used to identify rows to include in the reduced model frame.

Usage

h_construct_model_frame_inputs(
  formula,
  data,
  include,
  include_choice = c("subject_var", "visit_var", "group_var", "response_var"),
  full
)

Value

named list with four elements:

  • "formula": the formula including the columns requested in the include= argument.

  • "data": a data frame including all columns needed in the formula. full formula are identical

Arguments

formula

(mmrm)
mmrm fit object.

data

optional data frame that will be passed to model.frame() or model.matrix()

include

(character)
names of variable to include

full

(flag)
indicator whether to return full model frame (deprecated).