get_model_matrix: Extract or remake model matrix from model

Description Usage Arguments Value Author(s)

View source: R/terms_utils.R

Description

Extract or remake model matrix from model and potentially change the contrast coding

Usage

1
get_model_matrix(model, type = c("extract", "remake"), contrasts = "restore")

Arguments

model

an lm or lmerMod model object.

type

extract or remake model matrix?

contrasts

contrasts settings. These may be restored to those in the model or they may be changed. If a length one character vector (e.g. "contr.SAS") this is applied to all factors in the model, but it can also be a list naming factors for which the contrasts should be set as specified.

Value

the model (or 'design') matrix.

Author(s)

Rune Haubo B Christensen


lmerTest documentation built on Oct. 23, 2020, 6:16 p.m.