R/mice_imputation_multilevel_lmerControl_define_optimizer.R

Defines functions mice_imputation_multilevel_lmerControl_define_optimizer

## File Name: mice_imputation_multilevel_lmerControl_define_optimizer.R
## File Version: 0.08

mice_imputation_multilevel_lmerControl_define_optimizer <- function(model,
            optimizer="bobyqa", ...)
{
    require_namespace("lme4")
    args <- list(...)
    if ( ! ( "control" %in% names(args) ) ){
        if (model=="binary"){
            control <- lme4::glmerControl(optimizer=optimizer)
        } else {
            control <- lme4::lmerControl(optimizer=optimizer)
        }
    }
    return(control)
}

Try the miceadds package in your browser

Any scripts or data that you put into this service are public.

miceadds documentation built on May 29, 2024, 11:05 a.m.