getXReTrms: Create X and random effect terms from formula

View source: R/glmmTMB.R

getXReTrmsR Documentation

Create X and random effect terms from formula

Description

Create X and random effect terms from formula

Usage

getXReTrms(
  formula,
  mf,
  fr,
  ranOK = TRUE,
  type = "",
  contrasts,
  sparse = FALSE,
  old_smooths = NULL
)

Arguments

formula

current formula, containing both fixed & random effects

mf

matched call

fr

full model frame

ranOK

random effects allowed here?

type

label for model type

contrasts

a list of contrasts (see ?glmmTMB)

sparse

(logical) return sparse model matrix?

old_smooths

smooth information from a prior model fit (for prediction)

Value

a list composed of

X

design matrix for fixed effects

Z

design matrix for random effects

reTrms

output from mkReTrms from lme4, possibly augmented with information about mgcv-style smooth terms

ss

splitform of the formula

aa

additional arguments, used to obtain rank

terms

terms for the fixed effects

offset

offset vector, or vector of zeros if offset not specified

reXterms

terms for the model matrix in each RE term


glmmTMB documentation built on Oct. 7, 2023, 5:07 p.m.