[R-sig-ME] help: error in fn(x, ...): Downdated VtV is not positive definite

Ben Bolker bbolker @ending from gm@il@com
Fri Jul 20 01:57:16 CEST 2018


(Please keep r-sig-mixed-models using r-project.org in the Cc: list ...)

On Thu, Jul 19, 2018 at 4:49 PM Ahreum Maeng <amaengwork using gmail.com> wrote:
>
> 1) Okay, I centered all the numeric variables and ran the model again. I did not get the error message and the model ran and I was able to get the summary results. However, I got the following warning message. Would this warning be a problem?
>
> med.fit <- lmer(situ.cent ~ cult.cont*change.cent + (change.cent || id), data = tidy.total, REML=FALSE)
> Warning messages:
> 1: In optwrap(optimizer, devfun, getStart(start, rho$lower, rho$pp),  :
>   convergence code 3 from bobyqa: bobyqa -- a trust region step failed to reduce q
> 2: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
>   unable to evaluate scaled gradient
> 3: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
>   Model failed to converge: degenerate  Hessian with 2 negative eigenvalues

   The bobyqa error means the model got stuck somewhere, this may or
may not be important (see
https://stats.stackexchange.com/questions/89945/meaning-of-a-convergence-warning-in-glmer
for more discussion). The standard suggestion is to try with another
optimizer and compare results (see `?troubleshooting` and
`?convergence`).
   The fact that the Hessian has negative eigenvalues probably means
the model is singular.  Are some of your estimated random-effects
standard deviations zero or very close to zero?  That may be ignorable
(see the GLMM FAQ), but in general means your model is more complex
than your data can support.

>
>
> 2) I ran another related model with the same data set using the following model. But I get the error message saying that the grouping factor specification is invalid. How could I fix this issue?
>
>  out.fit <- lmer(rating.cent ~ situ.cent*cult.cont*change.cent + (change.cent || id), data = tidy.total, REML=FALSE)
>
> Error: Invalid grouping factor specification, id

  Pretty much impossible to say without a reproducible example.  Is
'id' definitely a factor within tidy.total?  (It should work anyway if
it's (1) not a factor [it will be converted] and (2) not in tidy.total
[it will be taken from the environment], but both of these cases will
improve the chances of everything working OK.)

>
>
> Many thanks,
> Ahreum
>
> On Thu, Jul 19, 2018 at 2:37 PM, Ahreum Maeng <amaengwork using gmail.com> wrote:
>>
>> frace is a factor as well.  I still get the same error message after dropping (0 + frace | type) part.
>>
>> How can I do the resealing parameters?
>>
>>
>> On Thu, Jul 19, 2018 at 2:33 PM, Ben Bolker <bbolker using gmail.com> wrote:
>>>
>>>  what is frace?
>>>
>>>   This is a relatively rare error message.  It usually indicates a
>>> strongly unbalanced/unstable model for some reason. Have you tried
>>> rescaling parameters?  Do simpler versions of the model work?
>>> On Thu, Jul 19, 2018 at 3:15 PM Ahreum Maeng <amaengwork using gmail.com> wrote:
>>> >
>>> > Hello,
>>> >
>>> > I got a following error message while running a MLM using lme4 package.
>>> >
>>> > Error in fn(x, ...) : Downdated VtV is not positive definite
>>> >
>>> >
>>> > my model was as following:
>>> >
>>> > out <- lmer(situ ~ cult*change + (change || id) + (0 + frace | type), data
>>> > = tidy.total, REML=FALSE)
>>> >
>>> > where
>>> > situ:  numeric
>>> > change: numeric
>>> > cult: factor (coded in 1 and -1)
>>> >
>>> >
>>> > How could I fix this issue?
>>> >
>>> > Thanks a lot,
>>> > Ahreum
>>> >
>>> >         [[alternative HTML version deleted]]
>>> >
>>> > _______________________________________________
>>> > R-sig-mixed-models using r-project.org mailing list
>>> > https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>>
>>
>>
>>
>> --
>>
>> --------------------------------
>>
>> Ahreum Maeng
>>
>> Assistant Professor in Marketing
>>
>> KU School of Business
>>
>> University of Kansas
>>
>> 1654 Naismith Dr. #2183
>>
>> Lawrence, KS 66045
>>
>> https://sites.google.com/site/ahreummaeng1/research
>>
>> ----------------------------------
>
>
>
>
> --
>
> --------------------------------
>
> Ahreum Maeng
>
> Assistant Professor in Marketing
>
> KU School of Business
>
> University of Kansas
>
> 1654 Naismith Dr. #2183
>
> Lawrence, KS 66045
>
> https://sites.google.com/site/ahreummaeng1/research
>
> ----------------------------------



More information about the R-sig-mixed-models mailing list