Error message
On 14-11-05 04:37 PM, Ken Beath wrote:
I would try it using adaptive Gauss-Hermite, by setting nAgQ=3 or more and seeing how that works. It really should be your first option when fitting a GLMM, and something that should be checked anyway. In your case with binary data and approx 2 per group the Laplace approximation is almost certainly poor.
Ken, can you point me to heuristic and/or anecdotal and/or
(preferably) official or peer-reviewed discussions of when Laplace
approximation is most likely to fail? (I know it fails when the
sampling distribution of the conditional modes is non-Normal, it makes
sense that that would occur esp. for binary data and small samples per
group, but I'm trying to get a more precise handle on it ...)
cheers
Ben Bolker
On 5 November 2014 22:55, Luciano La Sala <lucianolasala at yahoo.com.ar> wrote:
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
[[alternative HTML version deleted]]
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models