palday / JellyMe4.jl

RCall support for MixedModels.jl and lme4
MIT License
12 stars 2 forks source link

Turn off `check.nobs.vs.nRE` lme4-control parameter #30

Closed kliegl closed 3 years ago

kliegl commented 4 years ago

In lme4 it is sometimes necessary and justified to explicity set control=lmerControl(check.nobs.vs.nRE="ignore"). Currently, when moving such a MixedModel object to R , this triggers:

ERROR: REvalError: Error: number of observations (...); the random-effects parameters and the residual variance (or scale parameter) are probably unidentifiable

I would appreciate if this control parameter could be turned off or changed to a warning, possibly there are also other parameters of this kind.

palday commented 4 years ago

Note to self, the current set of checks in lme4 is:

    check.nobs.vs.rankZ = "ignore",
    check.nobs.vs.nlev = "stop",
    check.nlev.gtreq.5 = "ignore",
    check.nlev.gtr.1 = "stop",
    check.nobs.vs.nRE= "stop",
    check.rankX = c("message+drop.cols", "silent.drop.cols", "warn+drop.cols",
                    "stop.deficient", "ignore"),
    check.scaleX = c("warning","stop","silent.rescale",
                     "message+rescale","warn+rescale","ignore"),
    check.formula.LHS = "stop",
    ## convergence checking options
    check.conv.grad     = .makeCC("warning", tol = 2e-3, relTol = NULL),
    check.conv.singular = .makeCC(action = "message", tol = formals(isSingular)$tol),
    check.conv.hess     = .makeCC(action = "warning", tol = 1e-6),