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

build.formula

Convert a buildmer term list into a proper model formula


Description

Convert a buildmer term list into a proper model formula

Usage

build.formula(dep, terms, env = parent.frame())

Arguments

dep

The dependent variable.

terms

The term list.

env

The environment of the formula to return.

Value

A formula.

Examples

library(buildmer)
form1 <- Reaction ~ Days + (Days|Subject)
terms <- tabulate.formula(form1)
form2 <- build.formula(dep='Reaction',terms)

# check that the two formulas give the same results
library(lme4)
check <- function (f) resid(lmer(f,sleepstudy))
all.equal(check(form1),check(form2))

buildmer

Stepwise Elimination and Term Reordering for Mixed-Effects Regression

v1.9
FreeBSD
Authors
Cesko C. Voeten [aut, cre] (<https://orcid.org/0000-0003-4687-9973>)
Initial release

We don't support your browser anymore

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