[R] confirming a formula for use with lmer
Ben Bolker
bbolker at gmail.com
Thu Dec 20 01:43:16 CET 2012
Matthew Panichello <panichem <at> nmr.mgh.harvard.edu> writes:
>
[snip]
>
> I am interested in the effects of variables 'prime','time', and 'mood'
> on 'reaction_time' while taking into account the random effect
> 'subjects.' I've read through documentation on lme4 and came up with the
> following formula for use with lmer:
>
> reaction_time ~ (mood*prime*soa) + (1|subject)
>
> Prime and soa were repeated measures within subjects, while mood was
> manipulated between subjects. As I understand it, however, this
> distinction does not affect how the formula should be written.
>
[snip]
This looks reasonable. If 'prime' and 'soa' vary within individuals,
you might want to consider (mood*prime*soa) + (prime*soa|subject):
see Schielzeth, Holger, and Wolfgang Forstmeier. 2009. “Conclusions Beyond
Support: Overconfident Estimates in Mixed Models.” Behavioral Ecology 20 (2)
(March 1): 416–420. doi:10.1093/beheco/arn145.
http://beheco.oxfordjournals.org/content/20/2/416.
Followups to r-sig-mixed-models at r-project.org.
More information about the R-help
mailing list