[R-sig-ME] Understanding/plotting fixed effects estimates &standard errors

Paul Johnson pauljohn32 at gmail.com
Fri Jun 22 06:18:34 CEST 2012


Can I make a wild guess/accusation below? Please?

On Thu, Jun 21, 2012 at 10:17 PM, Rafael Maia
<queirozrafaelmv at yahoo.com.br> wrote:
> 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))

The predicted value is not very different between the two levels of
"factor" when success=0 and fail=0.  This is a binomial model, the
precision of the predictions is not "linear" or evenly spaced from
left to right.

Can you supply the same calculations for some more meaningful
combinations of success and fail?

When you do, let us see

mm

and

vcov(m1)

please.


>> 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.
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models



-- 
Paul E. Johnson
Professor, Political Science    Assoc. Director
1541 Lilac Lane, Room 504     Center for Research Methods
University of Kansas               University of Kansas
http://pj.freefaculty.org            http://quant.ku.edu



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