[R-sig-ME] lme4: Parameter contrasts?

Andrew Robinson A.Robinson at ms.unimelb.edu.au
Thu Feb 5 03:58:28 CET 2015


Also maybe try the inestimable estimable() in gmodels.

Cheers

Andrew

On Thu, Feb 5, 2015 at 12:34 PM, Ben Bolker <bbolker at gmail.com> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 15-02-04 08:25 PM, Carpenter, Tom wrote:
> > Hoping someone has some advice here. I recently made the switch
> > from using HLM to lmer. I know that in HLM, you could do a
> > parameter contrast (e.g., contrast two fixed effects against each
> > other and test the significance of the contrast). I was curious if
> > anyone knows how to do this in R? I have run a model in lmer (with
> > standardized predictors) and wish to see if one fixed effect is
> > significantly larger (more predictive) than other fixed effect.
> >
> > If that is not possible in lme4, does anyone have any advice for
> > how to bootstrap it? I?m fine letting the thing run overnight to
> > get a 95% CI if anyone has any suggestions.
> >
> > Tom Carpenter, Ph.D. Instructor of Psychology Seattle Pacific
> > University 3307 3rd Ave W. Suite 107, Seattle, WA, 98119
> > tcarpenter at spu.edu<mailto:tcarpenter at spu.edu> Office: (206)
> > 281-2916 Fax: (206) 281-2695
> >
>
>   I'm pretty sure that Russ Lenth's "lsmeans" package works with
> merMod objects.
>
>   bootstrapping would go something like
>
>   bootMer(fitted, FUN = function(m) { f <- fixef(m); f[3]-f[1] })
>
> (for example, to compare fixed effect parameters #3 and #1).  The PB
> estimates would probably be a little bit better (i.e., take account of
> more aspects of variation) than the lsmeans() contrast, which would be
> conditional on the estimates of the RE variance ...
>
>   (however, you might conceivably run into problems with
> https://github.com/lme4/lme4/issues/231 , which we haven't gotten
> around to fixing yet ...)
>
>   Ben Bolker
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
>
> iQEcBAEBAgAGBQJU0siaAAoJEOCV5YRblxUHEvkIALJns7YtDxYv49uxRTcDk2Ms
> dMbS1ppo9NY1jAbrC24B1ANBctZUxGI3be889dvXBR3kZLPTW5F3ajM6J5DLEXDt
> xXJ7QVT4fz6TvUztmWhZFhNBFT8HJYXSfcLCiXVuXiW1K2Wv7mW2FetplgFKrEho
> wJbFCbxi/0/xFjJJbIRDXTZS2JBSklVN/TmBCeOW+ky3dQ4m62amKtuMiaTdjFL1
> BTByO9iAS3mt6GXM88ztxrCODZoCgGrFaMVg5KQyAxD8F+2BWmnna2QGdkQg0abV
> BWdeZZiCPeHYxO9kEsifReDrYNOKIhMED+plgKD9k08+eY1YSjBMiB/5SGmakvU=
> =bb22
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>



-- 
Andrew Robinson
Deputy Director, CEBRA, School of Biosciences
Reader & Associate Professor in Applied Statistics  Tel: (+61) 0403 138 955
School of Mathematics and Statistics                        Fax: +61-3-8344
4599
University of Melbourne, VIC 3010 Australia
Email: a.robinson at ms.unimelb.edu.au
Website: http://www.ms.unimelb.edu.au/~andrewpr

MSME: http://www.crcpress.com/product/isbn/9781439858028
FAwR: http://www.ms.unimelb.edu.au/~andrewpr/FAwR/
SPuR: http://www.ms.unimelb.edu.au/spuRs/

	[[alternative HTML version deleted]]



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