[R] Defining interaction in random effects in lme4
bgunter.4567 at gmail.com
Sun Jan 7 20:05:35 CET 2018
Probably better to post this on the r-sig-mixed-models list.
On Jan 7, 2018 12:20 PM, "Dominik Ćepulić" <dcepulic at gmail.com> wrote:
> Dear everybody!
> My fixed-effects-only model looks like this: glmer(Accuracy ~ C.RT*Group,
> data = da)
> C.RT is the reaction time variable, and Group is a categorical variable
> with 0 and 1 as values. I would like to specify that main intercept, Group
> intercept, C.RT slope and C.RT*Group slope vary across subjects and trials.
> All subjects have values in Group = 0 and in Group = 1. Trials are nested
> within Group because each trial belongs either to Group = 0 or Group = 1.
> How should I specify the model?
> My ideas were:
> 1. glmer(Accuracy ~ C.RT*Group + (C.RT*Group|subject) + (1+C.RT|trial),
> data = da)
> 2. glmer(Accuracy ~ C.RT*Group + (1+C.RT|Group:subject) +
> (1+C.RT|Group:trial), data = da)
> Here, Group:trial does not make much sense as trials are *per se* divided
> in Group 0 or Group 1.
> What is, in your opinion, the best way to specify the model that I want to
> Additionally, the difference between (1+C.RT|Group:subject) and
> (C.RT*Object|subject) is not clear to me. Can someone also shed some light
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide http://www.R-project.org/
> and provide commented, minimal, self-contained, reproducible code.
[[alternative HTML version deleted]]
More information about the R-help