Skip to contents

Linear model with random effects. Calls lme4::lmer() from lme4.

Dictionary

This Learner can be instantiated via the dictionary mlr_learners or with the associated sugar function lrn():

mlr_learners$get("regr.lmer")
lrn("regr.lmer")

Meta Information

  • Task type: “regr”

  • Predict Types: “response”

  • Feature Types: “logical”, “integer”, “numeric”, “factor”

  • Required Packages: mlr3, lme4

Parameters

IdTypeDefaultLevelsRange
formulauntypedformula-
REMLlogicalTRUETRUE, FALSE-
startuntyped-
verboseinteger0\([0, \infty)\)
offsetuntyped-
contrastsuntyped-
optimizercharacternloptwrapNelder_Mead, bobyqa, nlminbwrap, nloptwrap-
restart_edgelogicalFALSETRUE, FALSE-
boundary.tolnumeric1e-05\([0, \infty)\)
calc.derivslogicalTRUETRUE, FALSE-
check.nobs.vs.rankZcharacterignoreignore, warning, message, stop-
check.nobs.vs.nlevcharacterstopignore, warning, message, stop-
check.nlev.gtreq.5characterignoreignore, warning, message, stop-
check.nlev.gtr.1characterstopignore, warning, message, stop-
check.nobs.vs.nREcharacterstopignore, warning, message, stop-
check.rankXcharactermessage+drop.colsmessage+drop.cols, silent.drop.cols, warn+drop.cols, stop.deficient, ignore-
check.scaleXcharacterwarningwarning, stop, silent.rescale, message+rescale, warn+rescale, ignore-
check.formula.LHScharacterstopignore, warning, message, stop-
check.conv.graduntypedlme4::.makeCC("warning", tol = 2e-3, relTol = NULL)-
check.conv.singularuntypedlme4::.makeCC(

        action = "message",
        tol = formals(lme4::isSingular)$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 | |- |

References

Bates, M D (2010). “lme4: Mixed-effects modeling with R.”

See also

Author

s-kganz

Super classes

mlr3::Learner -> mlr3::LearnerRegr -> LearnerRegrLmer

Methods

Inherited methods


Method new()

Creates a new instance of this R6 class.

Usage


Method clone()

The objects of this class are cloneable with this method.

Usage

LearnerRegrLmer$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

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: -

# 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"