mixed-effects model with partially nested fixed effects
Hi Yuqi, Because each subject has only a single row, you don't need random effects for subjects. You do have observations nested in experiments, so you probably want some sort of experiment effects. Right now you have fixed experiment effects, but random effects probably make more sense. The maximal model <http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.703.657&rep=rep1&type=pdf> w/ random experiment effects would be like: lmer(DV ~ movement_type*motor_effort + (movement_type*motor_effort| experiment)) In case of convergence problems, you can probably drop the random movement_type*motor_effort interaction, but usually it's best to decide what to drop by eyeballing the nonconverged results to see which random effects seem extraneous (due to either 0 estimated variance or perfect estimated correlations with other random effects). As for how to center, it depends on what you're interested in. A good reference here is Enders & Tofighi <http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.928.9848&rep=rep1&type=pdf> . Jake
On Mon, Oct 9, 2017 at 9:20 AM, Yuqi Liu <yliu at psych.udel.edu> wrote:
Hi R-experts,
I am analyzing data from 3 experiments using linear mixed model. Each
experiment had 2 fixed effects, movement type and motor effort. Movement
type is shared by all experiments, motor effort varied but partially shared
across experiments. The data looks like this:
Subject experiment movement_type
motor_effort DV
1 1 synchronous
normal
2 1 asynchronous
normal
.
.
.
101 2 synchronous
normal
102 2 asynchronous
normal
103 2 synchronous
medium
104 2 asynchronous
medium
.
.
.
201 3 synchronous
normal
202 3 asynchronous
normal
203 3 synchronous
hard
204 3 asynchronous
hard
.
.
.
I want to test if the effect of movement type differed across
experiments and motor effort, but I am a little confused of how the model
should be constructed in this case.
My current model is : model <- lmer(DV ~ movement_type *
experiment/motor_effort + (1|subject), data). Is that correct in terms of
my purpose?
I am also wondering how to center independent variables in this case.
For movement_type, I could code "synchronous" as "0.5" and "asynchronous"
as "-0.5". For motor_effort, should I center them for each experiment
separately, or across all experiment?
Thank you for your help!
Yuqi
[[alternative HTML version deleted]]
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models