parse_formula: Parse a mixed model formula into components

Description Usage Arguments Details Author(s) See Also

Description

Takes a formula and data frame and parses them into lists of fixed and varying effects, with corresponding model matrices. Used internally by glmer2stan.

Usage

1

Arguments

formula

A formula with varying effects

data

A data frame or list

Details

The result of parse_formula is a list containing: (1) y, the outcome variable; (2) yname, the character name of the outcome; (3) fixef, a vector of fixed effect names; (4) ranef, a named list of varying (aka random) effect grouping variables, each containing a vector of factor names; (5) dat, a data frame containing all of the needed variables in the fixed and varying effects, including the grouping variables.

Author(s)

Richard McElreath

See Also

glmer2stan


rmcelreath/glmer2stan documentation built on May 27, 2019, 9:29 a.m.