| buildmertree | R Documentation |
buildmer to perform stepwise elimination for lmertree and glmertree models from package glmertreeUse buildmer to perform stepwise elimination for lmertree and glmertree models from package glmertree
buildmertree(
formula,
data = NULL,
family = gaussian(),
buildmerControl = buildmerControl(crit = "AIC")
)
formula |
Either a |
data |
See the general documentation under |
family |
See the general documentation under |
buildmerControl |
Control arguments for buildmer — see the general documentation under |
Note that the likelihood-ratio test is not available for glmertree models, as it cannot be assured that the models being compared are nested. The default is thus to use AIC.
In the generalized case or when testing many partitioning variables, it is recommended to pass joint=FALSE, as this results in a dramatic speed gain and reduces the odds of the final glmer model failing to converge or converging singularly.
buildmer-package
if (requireNamespace('glmertree')) {
model <- buildmertree(Reaction ~ 1 | (Days|Subject) | Days,
buildmerControl=buildmerControl(crit='LL',direction='order',args=list(joint=FALSE)),
data=lme4::sleepstudy)
model <- buildmertree(Reaction ~ 1 | (Days|Subject) | Days,
buildmerControl=buildmerControl(crit='LL',direction='order',args=list(joint=FALSE)),
data=lme4::sleepstudy,family=Gamma(link=identity))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.