model_matrix: Model matrices along with compact encodings of data...

View source: R/Design.R

model_matrixR Documentation

Model matrices along with compact encodings of data availability/missingness

Description

Grow a model matrix while at the same time compactly encoding missingness patterns in RHS variables of a model frame.

Usage

model_matrix(object, data = environment(object), remove.intercept = TRUE, ...)

Arguments

object

Model formula or terms object (as in 'model.matrix')

data

data.frame, as in 'model.matrix()' but has to have ‘(weights)’ column

remove.intercept

logical

...

passed to 'model.matrix.default' (and further)

Value

ModelMatrixPlus, i.e. model matrix enriched with missing data info

Author(s)

Ben B Hansen


RItools documentation built on June 22, 2024, 9:06 a.m.