[R-sig-ME] PredictSE.mer error message
yuki fujita
yuki_himawari at hotmail.com
Thu Aug 14 00:13:49 CEST 2014
Hi
I am running glmer model with binomial distribution and want to get confidence interval using fixed effect for each treatments.
However I get the error message I don't really understand therefore I don't know how to modify the code.
My model is
model_2b <- glmer(cbind(NumberCorrect,10-NumberCorrect)~ ADHDYN + EmotionType + (1 | ID),
family="binomial",data = data)
and here is the summary output
Generalized linear mixed model fit by maximum likelihood (Laplace Approximation) ['glmerMod']
Family: binomial ( logit )
Formula: cbind(NumberCorrect, 10 - NumberCorrect) ~ ADHDYN + EmotionType + (1 | ID)
Data: data
AIC BIC logLik deviance df.resid
2000.5 2034.5 -992.3 1984.5 508
Scaled residuals:
Min 1Q Median 3Q Max
-3.4809 -0.7256 0.1760 0.7238 3.4354
Random effects:
Groups Name Variance Std.Dev.
ID (Intercept) 0.1337 0.3656
Number of obs: 516, groups: ID, 86
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 1.15637 0.10193 11.345 < 2e-16 ***
ADHDYNYES -0.27728 0.10236 -2.709 0.00675 **
EmotionType2 2.04670 0.17845 11.469 < 2e-16 ***
EmotionType3 -0.24761 0.10744 -2.305 0.02119 *
EmotionType4 -1.79462 0.10811 -16.600 < 2e-16 ***
EmotionType5 -0.04793 0.10939 -0.438 0.66129
EmotionType6 -1.01871 0.10445 -9.753 < 2e-16 ***
---
And I used the code below to get CI's but got error message.
> predictSE.mer(model_2b, NEWdata,se.fit=TRUE, type="response",level=0, print.matrix=FALSE)
Error in predictSE.mer(model_2b, NEWdata, se.fit = TRUE, type = "response", :
no slot of name "offset" for this object of class "glmerMod"
Can you please guide me where I am getting wrong? I noted the sd of random effect is quite large- so might be worth to do the simulation. I heard about MCMCsamp but is this the way to go?
Thank you kindly
Yuki
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models
mailing list