I am still not very familiar with R and I would like to construct linear model of mixed effects using lmer
function.
We have 3 independent variables with 2 modalities each time:
- group (G3 and G5)
- frequency (LF and HF)
- conditions (NR and PH)
and one dependent variable:
- Reaction Time (RT).
Here is a sample of my data, extract of data manipfreq
:
subject group item RT frequency condition
502 G3 ARGENT 677 HF NR
502 G3 ACTION 814 HF NR
502 G3 AFFAIRE 1278 HF NR
502 G3 ARMOIRE 716 LF PH
502 G3 AIGLE 761 LF PH
503 G3 AFFAIRE 841 HF PH
503 G3 ARGENT 919 HF PH
503 G3 ACTION 1071 HF PH
503 G3 AIGLE 1253 LF NR
505 G3 ARGENT 785 HF PH
505 G3 AFFAIRE 1028 HF PH
505 G3 ACTION 1190 HF PH
505 G3 AIGLE 1248 LF NR
506 G3 ACTION 898 HF NR
506 G3 AFFAIRE 1566 HF NR
506 G3 ARGENT 2037 HF NR
506 G3 AIGLE 707 LF PH
506 G3 ARMOIRE 839 LF PH
1530 G5 ACTION 705 HF NR
1530 G5 ARGENT 755 HF NR
1530 G5 AFFAIRE 789 HF NR
1530 G5 AIGLE 481 LF PH
1530 G5 ARMOIRE 495 LF PH
1532 G5 ACTION 532 HF NR
1532 G5 ARGENT 679 HF NR
1532 G5 AFFAIRE 1142 HF NR
1532 G5 ARMOIRE 423 LF PH
1532 G5 AIGLE 484 LF PH
1533 G5 ACTION 690 HF PH
1533 G5 ARGENT 708 HF PH
1533 G5 AFFAIRE 775 HF PH
1533 G5 AIGLE 1027 LF NR
1533 G5 ARMOIRE 1299 LF NR
1539 G5 ARGENT 747 HF NR
1539 G5 ACTION 771 HF NR
1539 G5 AFFAIRE 827 HF NR
1539 G5 ARMOIRE 518 LF PH
1539 G5 AIGLE 566 LF PH
What interests me in particular is:
- Main effects of: “group”, “frequency”, “condition”
- Two way interactions : “condition*group” and “condition*frequency”
- Three way interaction: “group*frequency*condition”
And also two way interaction “group*frequency” in only NR condition
I wrote a model that takes in account interaction between my IV and variability related to my subjects and items on the intercept and on the slope.
Here is my model (correct me if I’m wrong):
model=lmer(RT~frequency*condition*group+(1|subject)+(1|item)+(1+condition|subject)+(1+condition|item),data=manipfreq)
I need to find the F and p values.
I would be grateful for your help.