[R-sig-ME] Understanding/plotting fixed effects estimates &standard errors
Rafael Maia
queirozrafaelmv at yahoo.com.br
Fri Jun 22 05:17:33 CEST 2012
hi dr Duffy,
many thanks for the attention and the reply. I followed the instructions under "Predictions and/or confidence (or prediction) intervals on predictions" of the wiki FAQ; however, unless I missed something, the results were nearly identical (and therefore confidence intervals wide & overlapping) to what I had by removing the intercept from the model:
>m1=lmer(cbind(success,fail) ~ factor + (1|spp/variable), bb, family='binomial')
>summary(m1)
...
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 1.43834 0.52289 2.751 0.00595 **
factor1 0.21081 0.04269 4.938 7.88e-07 ***
>newdat=expand.grid(success=0,fail=0,factor=c('0',"1"))
>mm=model.matrix(terms(m1),newdat)
> estims=mm %*% fixef(m1)
> estims
[,1]
1 1.438342
2 1.649149
> pvar1=diag(mm %*% tcrossprod(vcov(m1),mm))
> sqrt(pvar1)
[1] 0.5228946 0.5229200
#compare to
>m3=lmer(cbind(success,fail) ~ factor -1 + (1|spp/variable), bb, family='binomial')
>summary(m3)
...
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
factor0 1.4383 0.5229 2.751 0.00595 **
factor1 1.6491 0.5229 3.154 0.00161 **
many thanks,
Abraços,
Rafael Maia
---
webpage: http://gozips.uakron.edu/~rm72
"A little learning is a dangerous thing; drink deep, or taste not the Pierian spring." (A. Pope)
Graduate Student - Integrated Bioscience
University of Akron
http://gozips.uakron.edu/~shawkey/
On Jun 21, 2012, at 10:48 PM, David Duffy wrote:
>
> This is nothing to with mixed modelling per se, but how your contrasts for the fixed effects are set up. If this was fixed effects only, you could fit -1 + factor (no intercept) to give estimates for each level of factor with standard errors that you could correctly interpret as you are trying to. The FAQ (http://glmm.wikidot.com/faq) shows plotting of confidence intervals for predictions.
More information about the R-sig-mixed-models
mailing list