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

getXReTrms

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)

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?

Value

a list composed of

X

design matrix for fixed effects

Z

design matrix for random effects

reTrms

output from mkReTrms from lme4

offset

offset vector, or vector of zeros if offset not specified


glmmTMB

Generalized Linear Mixed Models using Template Model Builder

v1.0.2.1
AGPL-3
Authors
Arni Magnusson [aut] (<https://orcid.org/0000-0003-2769-6741>), Hans Skaug [aut], Anders Nielsen [aut] (<https://orcid.org/0000-0001-9683-9262>), Casper Berg [aut] (<https://orcid.org/0000-0002-3812-5269>), Kasper Kristensen [aut], Martin Maechler [aut] (<https://orcid.org/0000-0002-8685-9910>), Koen van Bentham [aut], Ben Bolker [aut] (<https://orcid.org/0000-0002-2127-0443>), Nafis Sadat [ctb] (<https://orcid.org/0000-0001-5715-616X>), Daniel Lüdecke [ctb] (<https://orcid.org/0000-0002-8895-3206>), Russ Lenth [ctb], Joseph O'Brien [ctb] (<https://orcid.org/0000-0001-9851-5077>), Mollie Brooks [aut, cre] (<https://orcid.org/0000-0001-6963-8326>)
Initial release

We don't support your browser anymore

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