[R-sig-ME] Error bars for treatment interactions in Gaussian and Binomial mixed models

John Fox jfox at mcmaster.ca
Mon Aug 26 19:26:34 CEST 2013


Dear Sarah,

You might try effect(), Effect(), or allEffects() in the effects package.

I hope this helps,
 John

> -----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 Sarah Dryhurst
> Sent: Monday, August 26, 2013 12:03 PM
> To: r-sig-mixed-models at r-project.org
> Subject: [R-sig-ME] Error bars for treatment interactions in Gaussian
> and Binomial mixed models
> 
> I have a model that I am running via lme4:
> 
> m1 <- lmer (Dependent ~ Tmt1 * Tmt2 + (1 | Block / Tmt1))
> 
> I am running this model for each of the three years of my experiment in
> turn.  Each treatment is a two level factor (treatment and control).
> It is
> a split plot design (with Treatment 2 embedded within Treatment 1
> embedded
> within block).
> 
> I'm interested in plotting each level of the interaction between the
> two
> treatments (i.e. 4 means), and some measure of error around each of
> these
> treatment means, for each year in turn.  This first set of models are
> Gaussian, but I have another set which use a binomial error
> distribution.
> 
> I am wondering if there is any package available that calculates
> interaction treatment means and their error bars for such models?
>  Everything I come across completely ignores the random effect
> variation in
> error bar calculation (e.g.the effects package)...
> 
> I tried plotLMER.fnc in language R which was useful for my Gaussian
> model,
> but doesn't work for the Binomial one (as the error calculations are
> based
> on an mcmc simulation).  Further I cannot actually extract the HPD 95%
> CI
> values for each treatment that plotLMER gives me!
> 
> Using the ez package I have been able to predict the treatment means
> and
> calculate the variance for these means, but I am unsure how to convert
> these variances to appropriate error estimations by hand (as I am
> assuming
> I need to take account of the random effect variance too?).  Again this
> is
> only for the Gaussian models...
> 
> If anyone has any suggestions it would be much appreciated!  Sorry if
> this
> is a simple question - I am new to these models :-)
> 
> Thanks in advance,
> 
> Sarah
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models



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