Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

buildModelMatrix

Build model matrix


Description

a function to create a model matrix with all predictor terms in both the group level and fixed effect level

Usage

buildModelMatrix(model, newdata, which = "full")

Arguments

model

a merMod object from lme4

newdata

a data frame to construct the matrix from

character

which matrix to return,default is full matrix with fixed and random terms, other options are "fixed" and "random"

Source

Taken from predict.merMod in lme4


merTools

Tools for Analyzing Mixed Effect Regression Models

v0.5.2
GPL (>= 2)
Authors
Jared E. Knowles [aut, cre], Carl Frederick [aut], Alex Whitworth [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.