Regression Linear Mixed Effects Learner
mlr_learners_regr.lmer.Rd
Linear model with random effects.
Calls lme4::lmer()
from lme4.
Formula
Although most mlr3 learners don't allow to specify the formula manually, and automatically
set it by valling task$formula()
, this learner allows to set the formula
because it's core
functionality depends it. This means that it might not always use all features that are available
in the task.
Be aware, that this can sometimes lead to unexpected error messages,
because mlr3 checks the compatibility between the learner and the task on all available features.
Dictionary
This Learner can be instantiated via the dictionary mlr_learners or with the associated sugar function lrn()
:
$get("regr.lmer")
mlr_learnerslrn("regr.lmer")
Parameters
Id | Type | Default | Levels | Range |
formula | untyped | formula | - | |
REML | logical | TRUE | TRUE, FALSE | - |
start | untyped | - | ||
verbose | integer | 0 | \([0, \infty)\) | |
offset | untyped | - | ||
contrasts | untyped | - | ||
optimizer | character | nloptwrap | Nelder_Mead, bobyqa, nlminbwrap, nloptwrap | - |
restart_edge | logical | FALSE | TRUE, FALSE | - |
boundary.tol | numeric | 1e-05 | \([0, \infty)\) | |
calc.derivs | logical | TRUE | TRUE, FALSE | - |
check.nobs.vs.rankZ | character | ignore | ignore, warning, message, stop | - |
check.nobs.vs.nlev | character | stop | ignore, warning, message, stop | - |
check.nlev.gtreq.5 | character | ignore | ignore, warning, message, stop | - |
check.nlev.gtr.1 | character | stop | ignore, warning, message, stop | - |
check.nobs.vs.nRE | character | stop | ignore, warning, message, stop | - |
check.rankX | character | message+drop.cols | message+drop.cols, silent.drop.cols, warn+drop.cols, stop.deficient, ignore | - |
check.scaleX | character | warning | warning, stop, silent.rescale, message+rescale, warn+rescale, ignore | - |
check.formula.LHS | character | stop | ignore, warning, message, stop | - |
check.conv.grad | untyped | lme4::.makeCC("warning", tol = 2e-3, relTol = NULL) | - | |
check.conv.singular | untyped | lme4::.makeCC( |
= "message",
action = formals(lme4::isSingular)$tol
tol ) | |- |
|check.conv.hess |untyped |lme4::.makeCC(action = "warning", tol = 1e-6) | |- | |optCtrl |untyped |list | |- | |newparams |untyped | | |- | |re.form |untyped | | |- | |random.only |logical |FALSE |TRUE, FALSE |- | |allow.new.levels |logical |FALSE |TRUE, FALSE |- | |na.action |untyped |:: , stats , na.pass | |- |
See also
as.data.table(mlr_learners)
for a table of available Learners in the running session (depending on the loaded packages).Chapter in the mlr3book: https://mlr3book.mlr-org.com/basics.html#learners
mlr3learners for a selection of recommended learners.
mlr3cluster for unsupervised clustering learners.
mlr3pipelines to combine learners with pre- and postprocessing steps.
mlr3tuning for tuning of hyperparameters, mlr3tuningspaces for established default tuning spaces.
Super classes
mlr3::Learner
-> mlr3::LearnerRegr
-> LearnerRegrLmer
Examples
learner = mlr3::lrn("regr.lmer")
print(learner)
#> <LearnerRegrLmer:regr.lmer>: Linear Mixed Effects
#> * Model: -
#> * Parameters: list()
#> * Packages: mlr3, lme4
#> * Predict Types: [response]
#> * Feature Types: logical, integer, numeric, factor
#> * Properties: weights
# available parameters:
learner$param_set$ids()
#> [1] "formula" "REML" "start"
#> [4] "verbose" "offset" "contrasts"
#> [7] "optimizer" "restart_edge" "boundary.tol"
#> [10] "calc.derivs" "check.nobs.vs.rankZ" "check.nobs.vs.nlev"
#> [13] "check.nlev.gtreq.5" "check.nlev.gtr.1" "check.nobs.vs.nRE"
#> [16] "check.rankX" "check.scaleX" "check.formula.LHS"
#> [19] "check.conv.grad" "check.conv.singular" "check.conv.hess"
#> [22] "optCtrl" "newparams" "re.form"
#> [25] "random.only" "allow.new.levels" "na.action"