[R-sig-ME] using lmer instead of 2-way repeated measure ANOVA for categorical response data

Ben Bolker bbolker at gmail.com
Tue Jul 5 03:59:34 CEST 2011


David Duffy <davidD at ...> writes:

> 
> On Mon, 4 Jul 2011, Stefano Guidi wrote:
> 
> > I am trying to analyze with lmer some data I collected in a fully factorial
> > 2x2 experiment, with only within-subject factors and a categorical response
> > variable (binomial).
> >
> > model <- lmer(scelta =="antizolner" ~ phase * contrast  + (1 +
> > phase*contrast| subject), data=ck1bis, family="binomial")
> >
> > At this point I would like to be able to plot a barchart of the
> > probabilities for the 4 conditions with error bar representing 95% CI, just
> > I would do with the marginal means after an ANOVA, but I don't know how to
> > do it.
> 
> It seems mcmcsamp() and HPDinterval() are working OK, and I presume making 
> a new 4 level variable phase_contrast would simplify the output.
> 

  But: mcmcsamp() doesn't work for (1) GLMMs (i.e. with "family" specified),
(2) models with random effects more complicated than intercepts.

  We should really write a predict.mer function, but in the time
see the code on <http://glmm.wikidot.com> for a recipe for
predictions ...

  Ben Bolker




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