[R-sig-ME] R-sig-mixed-models Digest, Vol 95, Issue 6

Ken Beath ken.beath at mq.edu.au
Thu Nov 6 03:38:38 CET 2014


nAGQ=0 uses an even more approximate method, so probably isn't advised.
Looking at your output something has gone seriously wrong. The standard
errors are all very large and the random effect variance is zero.

Have you checked whether there is a collinearity problem between your fixed
effects. Start with a model with all the fixed effects and no random and
see how that works.

On 6 November 2014 13:27, Luciano La Sala <lucianolasala at yahoo.com.ar>
wrote:

> Dear Ken and Ben,
>
> Thank you so much for your prompt responses. This is more frustrating than
> interesting to me. Weird, but the model runs "smoothly" if I use nAGQ=0
> (output below). Any value other than that yields the mentioned error. I
> have no idea how this Gauss-Hermite Quadrature stuff works, or if setting
> nAGQ to 0 makes my model building strategy (AIC criterion) a poor choice.
> Should I stick with nAGQ=0 then?
>
> > model.1 <- glmer(Death_2 ~ Year + Sex + Egg_Volume + Hatch_Order +
> (1|Nest_ID), nAGQ=0, family = binomial, data = surv.2)
> > summary(model.1)
>
> Generalized linear mixed model fit by maximum likelihood (Adaptive
> Gauss-Hermite Quadrature, nAGQ =  0)
>  [glmerMod]
>  Family: binomial  ( logit )
> Formula: Death_2 ~ Year + Sex + Egg_Volume + Hatch_Order + (1 | Nest_ID)
>    Data: surv.2
>
>      AIC      BIC   logLik deviance df.resid
>     22.0     44.7     -4.0      8.0      182
>
> Scaled residuals:
>     Min      1Q  Median      3Q     Max
> -0.2291  0.0000  0.0000  0.0000  4.4713
>
> Random effects:
>  Groups  Name        Variance Std.Dev.
>  Nest_ID (Intercept) 0        0
> Number of obs: 189, groups:  Nest_ID, 111
>
> Fixed effects:
>                     Estimate Std. Error z value Pr(>|z|)
> (Intercept)       -4.185e+01  1.538e+04  -0.003    0.998
> Year2007           1.933e+01  1.096e+04   0.002    0.999
> Sex               -1.878e+01  1.139e+04  -0.002    0.999
> Egg_Volume        -5.620e-03  2.077e-01  -0.027    0.978
> Hatch_OrderSecond  1.997e+01  1.079e+04   0.002    0.999
> Hatch_OrderThird  -3.482e-01  2.544e+04   0.000    1.000
>
> Correlation of Fixed Effects:
>             (Intr) Yr2007 Sex    Egg_Vl Htc_OS
> Year2007    -0.713
> Sex          0.000  0.000
> Egg_Volume  -0.001  0.000  0.000
> Htch_OrdrSc -0.701  0.000  0.000  0.000
> Htch_OrdrTh -0.298  0.000  0.000  0.000  0.424
>
> El 11/5/2014 6:38 PM, r-sig-mixed-models-request at r-project.org escribió:
>
>> Send R-sig-mixed-models mailing list submissions to
>>         r-sig-mixed-models at r-project.org
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>>         https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>> or, via email, send a message with subject or body 'help' to
>>         r-sig-mixed-models-request at r-project.org
>>
>> You can reach the person managing the list at
>>         r-sig-mixed-models-owner at r-project.org
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of R-sig-mixed-models digest..."
>>
>>
>> Today's Topics:
>>
>>     1. Re: Error message (Luciano La Sala)
>>     2. Re: Error message (Ben Bolker)
>>     3. Re: subject level predictions with lme4 from     incomplete
>>        longitudinal profile (Tarca, Adi)
>>     4. Re: Error message (Ken Beath)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Wed, 05 Nov 2014 08:55:27 -0300
>> From: Luciano La Sala <lucianolasala at yahoo.com.ar>
>> To: Daniel Wright <Daniel.Wright at act.org>
>> Cc: "r-sig-mixed-models at r-project.org"
>>         <r-sig-mixed-models at r-project.org>
>> Subject: Re: [R-sig-ME] Error message
>> Message-ID: <545A102F.3030407 at yahoo.com.ar>
>> Content-Type: text/plain; charset="UTF-8"
>>
>> Thank you Dan,
>>
>> According to the new version of lme4 I refited my model as follows:
>>
>> model <- glmer(Death ~ Year + Sex + Egg Volume + Hatch Order + (1|Nest
>> ID), family = binomial, data = Data)
>> summary(model)
>>
>> However, the same error message keeps showing up:
>>
>>
>> Error: (maxstephalfit) PIRLS step-halvings failed to reduce deviance in
>> pwrssUpdate
>>
>>
>> Interestingly, if I reduce the model to contain only one main effect
>> (whichever), say Hatch_Order, things look better:
>>
>> model2 <- glmer(Death 2 ~ Hatch Order + (1|Nest_ID), family = binomial,
>> data = Data) summary(model2)
>>
>>
>> Generalized linear mixed model fit by maximum likelihood (Laplace
>> Approximation) ['glmerMod']
>> Family: binomial  ( logit )
>> Formula: Death_2 ~ Hatch_Order + (1 | Nest_ID)
>>      Data: surv.2
>>
>>        AIC      BIC   logLik deviance df.resid
>>      118.5    131.8    -55.2    110.5      205
>>
>> Scaled residuals:
>>       Min      1Q  Median      3Q     Max
>> -0.7390 -0.1714 -0.1682 -0.1506  3.7689
>>
>> Random effects:
>>    Groups  Name        Variance Std.Dev.
>>    Nest_ID (Intercept) 1.586    1.259
>> Number of obs: 209, groups:  Nest ID, 115
>>
>> Fixed effects:
>>                     Estimate Std. Error z value Pr(>|z|)
>> (Intercept)        -3.4824     1.1274  -3.089 0.00201 **
>> Hatch_OrderSecond  -0.1266     0.7576  -0.167  0.86729
>> Hatch_OrderThird    2.0486     0.7572   2.705  0.00682 **
>> ---
>> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
>>
>> Correlation of Fixed Effects:
>>               (Intr) Htc_OS
>> Htch_OrdrSc -0.111
>> Htch_OrdrTh -0.709  0.276
>>
>>
>> Any pointers please? Best. Luciano
>>
>>
>>
>> El 10/22/2014 6:35 PM, Daniel Wright escribi? The lme4 package has
>> changed some. Details are inhttp://arxiv.org/pdf/1406.5823.pdf
>>
>>>
>>> For your problem, the first thing to note is glmer is now used instead
>>> of lmer for generalized linear models.  Glancing at your model the other
>>> bits look like they should work.
>>>
>>> Dan
>>>
>>> Daniel B. Wright, Ph.D.
>>> Statistical Research Division
>>> 8701 N. MoPac Expressway, Suite 200, Austin, TX 78759
>>> (preferred method of communication is email, use cell if urgent)
>>> Office: 512.320.1827
>>> Cell: 786 342 4656
>>>
>>>
>>>
>>>
>>>
>>>
>>> This email message is intended only for the personal use of the
>>> recipient(s) named above. If you are not an intended recipient, you may not
>>> review, copy, or distribute this message. If you have received this
>>> communication in error, please notify the sender immediately by email and
>>> delete the original message.
>>>
>>>
>>>
>>> -----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 Luciano La Sala
>>> Sent: Wednesday, October 22, 2014 4:20 PM
>>> Cc:r-sig-mixed-models at r-project.org
>>> Subject: [R-sig-ME] Error message
>>>
>>> Hello,
>>>
>>> A few years back I used to fit GLMM (binomial response) using lmer
>>> function in lme4. Back then I had to specify the family of response
>>> variable  (dead /alive) as binomial. Now I have to refit those models using
>>> quite newer versions of both R (R x64 3.1.1) and lme4 (lme4_1.1-7), but
>>> things seem to have changed quite a bit.
>>>
>>> My response variable is death (yes/no), and independent variables are
>>> Year (2006 / 2007), Sex (M / F), Egg volume (continuous), and Hatching
>>> Order (ordered factor variable, namely first, second, third). I need to
>>> control autocorrelation among siblings, so I use "Nest ID" to fit random
>>> intercepts for different nests.
>>>
>>> My model is:
>>>
>>> model.1 <- lmer(Death_2 ~ Year + Sex + Egg_Volume + Hatch_Order +
>>> (1|Nest_ID), family = binomial, data = Data)
>>> summary(model.1)
>>>
>>> But I get the error and warning messages below:
>>>
>>> Error in eval(expr, envir, enclos) :
>>>      (maxstephalfit) PIRLS step-halvings failed to reduce deviance in
>>> pwrssUpdate In addition:Warning message:
>>> In lmer(Death_2 ~ Year + Sex + Egg_Volume + Hatch_Order + (1 |
>>> Nest_ID),  :
>>>      calling lmer with 'family' is deprecated; please use glmer() instead
>>>
>>>
>>> Question: how can I circumvent these two issues?
>>>
>>> Thanks in advance.
>>>
>>> Luciano
>>>
>>>
>>>         [[alternative HTML version deleted]]
>>>
>>> _______________________________________________
>>> R-sig-mixed-models at r-project.org  mailing listhttps://stat.ethz.ch/
>>> mailman/listinfo/r-sig-mixed-models
>>>
>>>
>>
> --
> Luciano F. La Sala
> Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
> Cátedra de Epidemiología
> Departamento de Biología, Bioquímica y Farmacia
> Universidad Nacional del Sur
> San Juan 670
> Bahía Blanca (8000)
> Argentina
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>



-- 

*Ken Beath*
Lecturer
Statistics Department
MACQUARIE UNIVERSITY NSW 2109, Australia

Phone: +61 (0)2 9850 8516

Building E4A, room 526
http://stat.mq.edu.au/our_staff/staff_-_alphabetical/staff/beath,_ken/

CRICOS Provider No 00002J
This message is intended for the addressee named and may...{{dropped:9}}



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