buildmer {buildmer} | R Documentation |
buildmer
to fit mixed-effects models using lmer
/glmer
from lme4
Use buildmer
to fit mixed-effects models using lmer
/glmer
from lme4
buildmer(
formula,
data = NULL,
family = gaussian(),
buildmerControl = buildmerControl()
)
formula |
See the general documentation under |
data |
See the general documentation under |
family |
See the general documentation under |
buildmerControl |
Control arguments for buildmer — see the general documentation under |
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'))