get_rand: Takes in a formula with bars and gives back the plain names...

Description Usage Arguments Value Examples

View source: R/bootstrap_methods.R

Description

Takes in a formula with bars and gives back the plain names of the columns

Usage

1
get_rand(form_with_bars)

Arguments

form_with_bars

A formula used in e.g. lme4 and similar packages. Typically along the lines: y ~ age + (1 | school) etc

Value

A vector of the variables that are treated as random.

Examples

1
2
3
4
5
get_rand("y ~ age + (1 | school)")
get_rand("y ~ income + (1 | school) + (1 | school:section)")
get_rand("y ~ income + (1 | school) + (1 | school/section)")
get_rand(as.formula("y ~ x + (1 | z)"))
get_rand("y ~ x")

ColmanHumphrey/glmmboot documentation built on June 28, 2021, 3:54 p.m.