Skip to content

singular convergence with lmer()

8 messages · laurent stephane, Ben Bolker, Reinhold Kliegl +4 more

3 days later
#
laurent stephane <laurent_step at ...> writes:
This warning emerges from the nlminb optimizer used in the guts
of lme4, and I don't think there's much you can do to suppress it
or change the behavior of nlminb to avoid it.  The best you could
do would be to use other packages (SAS, other versions of lme4 or
nlme, etc.) to see if the correct answer was achieved despite the
warning.

  Ben Bolker
#
It converged for me for lme4_0.999999-0.
Estimates look different from what you posted at the site.
Reinhold Kliegl
Linear mixed model fit by REML
Formula: y ~ (1 | Operator) + (1 | Part) + (1 | Part:Operator)
   Data: dat
    AIC    BIC logLik deviance REMLdev
 -619.7 -603.4  314.9   -630.3  -629.7
Random effects:
 Groups        Name        Variance   Std.Dev.
 Part:Operator (Intercept) 0.00081854 0.028610
 Part          (Intercept) 1.06721729 1.033062
 Operator      (Intercept) 0.00031226 0.017671
 Residual                  0.00063295 0.025159
Number of obs: 192, groups: Part:Operator, 96; Part, 12; Operator, 8

Fixed effects:
            Estimate Std. Error t value
(Intercept)   2.7171     0.2983   9.109
On Sun, Jul 8, 2012 at 9:58 PM, Ben Bolker <bbolker at gmail.com> wrote:
#
Notice that the variance of one of your random effects is estimated at
0.  I suspect that this is the source of the singular convergence.
IIRC proc mixed (which is what I assume you are using in SAS) uses a
somewhat different approach to to estimate the random effects than
does lme4.

Although it seems to work for Reinhold, again some of the variances
are vanishingly small, which seems to me like it may suggest some of
the effects are borderline on 0 and perhaps slightly different
estimation methods either get "really small" or simply "0" and if 0,
you get a warning.  I would also consider simplifying your model
(although likelihood ratio tests seem to suggest a significant
decrement in the likelihood fixing the variance at 0).

Cheers,

Josh
On Thu, Jul 5, 2012 at 1:01 AM, laurent stephane <laurent_step at yahoo.fr> wrote:

  
    
#
I wonder if it is a version issue.  Using the data at forums.cirad.fr/logiciel-R/viewtopic.php?t=5071 I get the following (which matches what SAS produces):
'data.frame':   192 obs. of  3 variables:
 $ Operator: Factor w/ 8 levels "A","B","C","D",..: 1 1 1 1 1 1 1 1 1 1 ...
 $ Part    : Factor w/ 12 levels "1","2","3","4",..: 1 1 2 2 3 3 4 4 5 5 ...
 $ y       : num  0.724 0.699 1.554 1.535 1.786 ...
Linear mixed model fit by REML
Formula: y ~ (1 | Operator) + (1 | Part) + (1 | Part:Operator)
   Data: dat
    AIC    BIC logLik deviance REMLdev
 -619.7 -603.4  314.9   -630.3  -629.7
Random effects:
 Groups        Name        Variance   Std.Dev.
 Part:Operator (Intercept) 0.00081854 0.028610
 Part          (Intercept) 1.06721993 1.033063
 Operator      (Intercept) 0.00031226 0.017671
 Residual                  0.00063295 0.025159
Number of obs: 192, groups: Part:Operator, 96; Part, 12; Operator, 8

Fixed effects:
            Estimate Std. Error t value
(Intercept)   2.7171     0.2983   9.109


I'm using R 1.15.0 32-bit on Windows XP and Package lme4 version 0.999375-42.

Jim Baldwin
Pacific Southwest Research Station
USDA Forest Service
Albany, California

-----Original Message-----
From: r-sig-mixed-models-bounces at r-project.org [mailto:r-sig-mixed-models-bounces at r-project.org] On Behalf Of Joshua Wiley
Sent: Sunday, July 08, 2012 1:52 PM
To: laurent stephane
Cc: r-sig-mixed-models at r-project.org
Subject: Re: [R-sig-ME] singular convergence with lmer()

Notice that the variance of one of your random effects is estimated at 0.  I suspect that this is the source of the singular convergence.
IIRC proc mixed (which is what I assume you are using in SAS) uses a somewhat different approach to to estimate the random effects than does lme4.

Although it seems to work for Reinhold, again some of the variances are vanishingly small, which seems to me like it may suggest some of the effects are borderline on 0 and perhaps slightly different estimation methods either get "really small" or simply "0" and if 0, you get a warning.  I would also consider simplifying your model (although likelihood ratio tests seem to suggest a significant decrement in the likelihood fixing the variance at 0).

Cheers,

Josh
On Thu, Jul 5, 2012 at 1:01 AM, laurent stephane <laurent_step at yahoo.fr> wrote:
--
Joshua Wiley
Ph.D. Student, Health Psychology
Programmer Analyst II, Statistical Consulting Group University of California, Los Angeles https://joshuawiley.com/

_______________________________________________
R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models





This electronic message contains information generated by the USDA solely for the intended recipients. Any unauthorized interception of this message or the use or disclosure of the information it contains may violate the law and subject the violator to civil or criminal penalties. If you believe you have received this message in error, please notify the sender and delete the email immediately.
#
On Sun, 8 Jul 2012, Reinhold Kliegl wrote:

            
The regress package (1.3-8) also gives

  r1 <- regress(y ~ 1, ~ Operator+Part+I(Operator:Part), data=dat)
  r1$sigma
         Operator             Part I(Operator:Part)               In
     0.0003122871     1.0671419239     0.0008185268     0.0006329560
#
FWIW, I get the same result using
packageVersion('lme4')
[1] ?0.999999.0?

Dennis
On Sun, Jul 8, 2012 at 2:58 PM, Baldwin, Jim -FS <jbaldwin at fs.fed.us> wrote: