Learn R Programming

glmer2stan (version 0.995)

parse_formula: Parse a mixed model formula into components

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

parse_formula( formula , data )

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.

See Also

glmer2stan