buildmer {buildmer}R Documentation

Use buildmer to fit mixed-effects models using lmer/glmer from lme4

Description

Use buildmer to fit mixed-effects models using lmer/glmer from lme4

Usage

buildmer(
  formula,
  data = NULL,
  family = gaussian(),
  buildmerControl = buildmerControl()
)

Arguments

formula

See the general documentation under buildmer-package

data

See the general documentation under buildmer-package

family

See the general documentation under buildmer-package

buildmerControl

Control arguments for buildmer — see the general documentation under buildmerControl

Examples

library(buildmer)
model <- buildmer(Reaction ~ Days + (Days|Subject),lme4::sleepstudy)

# Tests from github issue #2, that also show the use of the 'direction' and 'crit' parameters:
bm.test <- buildmer(cbind(incidence,size - incidence) ~ period + (1 | herd),
	family=binomial,data=lme4::cbpp)
bm.test <- buildmer(cbind(incidence,size - incidence) ~ period + (1 | herd),
	family=binomial,data=lme4::cbpp,buildmerControl=buildmerControl(direction='forward'))
bm.test <- buildmer(cbind(incidence,size - incidence) ~ period + (1 | herd),
	family=binomial,data=lme4::cbpp,buildmerControl=buildmerControl(crit='AIC'))
bm.test <- buildmer(cbind(incidence,size - incidence) ~ period + (1 | herd),
	family=binomial,data=lme4::cbpp,
	buildmerControl=buildmerControl(direction='forward',crit='AIC'))

[Package buildmer version 2.5 Index]