[R-sig-ME] Model sintax unbalanced design
Lorenzo Vignali
lorenzo.vignali88 at gmail.com
Thu Feb 11 11:00:57 CET 2016
Dear all,
I am trying to use the R package lme4 to analyse behavioral results from a
brain stimulation experiment.
I would be thankful to receive opinions and comments on how would you
structure the model.
We tested two groups of 20 participants each (between factor), one with
brain stimulation over the left hemisphere and one with brain stimulation
over the right hemisphere - factor (Hemi)
Each participant (within each group) was tested twice, once with sham
stimulation, and once with cathodal stimulation - factor (tDCS)
Participants were asked to perform a task by pressing a button (we have
therefore both accuracy rates and reaction times) in 4 different conditions
(100 trials per condition) - factor (Conditions)
Two of this conditions, had an additional manipulation, they had first or
last constraining trigrams.
- factor (Trigrams). Is an unbalanced design and the conditions which have
no Trigrams manipulation are were defined as NA in the R data.frame
So far I tried different models, but one of the best ones is this one (ACC
stands for accuracy, measure a number of correct responses):
basic_ACC <- lmer(Correct_Resp ~ Hemi + tDCS * Conditions * Trigrams + (1 +
Hemi + tdcs + Conditions + Trigrams | sbj), data = tot.all)
as a result I get:
REML criterion at convergence: 13567.9
Scaled residuals:
Min 1Q Median 3Q Max
-2.90479 -0.95169 0.07642 0.46143 1.96212
Random effects:
Groups Name Variance Std.Dev. Corr
sbj (Intercept) 2.321e-03 0.048177
Hemiright 5.193e-03 0.072063 -0.63
tdcsstim 6.602e-03 0.081254 -0.70 -0.04
Conditions 6.976e-04 0.026412 -0.25 -0.18 0.15
Trigrams 4.323e-05 0.006575 -0.07 0.79 -0.64 -0.17
Residual 1.373e-01 0.370542
Number of obs: 15682, groups: sbj, 20
Fixed effects:
Estimate Std. Error t value
(Intercept) 1.158451 0.031748 36.49
Hemiright 0.003500 0.017166 0.20
tdcsstim 0.011775 0.045735 0.26
Conditions -0.180447 0.014495 -12.45
Trigrams 0.024563 0.018864 1.30
tdcsstim:Conditions -0.014195 0.018700 -0.76
tdcsstim:Trigrams -0.001830 0.026569 -0.07
Conditions:Trigrams -0.035831 0.008378 -4.28
tdcsstim:Conditions:Trigrams 0.005560 0.011837 0.47
Correlation of Fixed Effects:
(Intr) Hmrght tdcsst Cndtns Trgrms tdcs:C tdcs:T Cndt:T
Hemiright -0.234
tdcsstim -0.703 -0.015
Conditions -0.799 -0.068 0.556
Trigrams -0.887 0.058 0.595 0.768
tdcsstm:Cnd 0.593 0.000 -0.822 -0.646 -0.599
tdcsstm:Trg 0.629 0.000 -0.871 -0.549 -0.706 0.849
Cndtns:Trgr 0.795 0.000 -0.552 -0.866 -0.893 0.671 0.634
tdcsstm:C:T -0.563 0.000 0.779 0.613 0.632 -0.949 -0.895 -0.708
it looks fine to me, as we get the expected main effects and the expected
interactions. But I just want to be sure that nothing is too weird, as the
design is quite a tricky one and I am rather inexperienced with lmer.
Thank you all in advance.
Kind regards,
Lorenzo
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models
mailing list