i am new in R and studying statistical analysis for experiments, please help me~
I have 3 age groups (Y/HO/LO) and 2 conditions (Related/Unrelated). I am running a linear regression model on RT (reaction time) with Group and Condition as fixed effects, Subject and Item as random effect:
mdl_RT <- lmer(Target_RT ~ Group * Condition + (1|Subject) + (1|ItemID_1), data = SP_RT)
summary(mdl_RT)
Anova(mdl_RT, type = "III")
It shows that there is a significant interaction between Group and Condition, so I did a post-hoc comparison:
posthoc_rt <- emmeans(mdl_RT, pairwise ~ Group:Condition)
comp <- pairs(posthoc_rt, simple = "each", adjust = "bonferroni")
comp$emmeans
It is good that it gave me the simple contrasts for Group and for Condition, something like this:
$`simple contrasts for Condition`
Group = HO:
contrast estimate SE df z.ratio p.value
Related - Unrelated -32.3 3.99 Inf -8.080 <.0001
Group = LO:
contrast estimate SE df z.ratio p.value
Related - Unrelated -27.2 4.10 Inf -6.647 <.0001
Group = Y:
contrast estimate SE df z.ratio p.value
Related - Unrelated -15.5 4.01 Inf -3.854 0.0001
Also, it gave me ALL contrasts for contrast:
$`simple contrasts for contrast`
contrast estimate SE df z.ratio p.value
(HO Related - LO Related) - (HO Related - Y Related) -73.95 25.46 Inf -2.904 0.3865
(HO Related - LO Related) - (HO Related - HO Unrelated) -2.91 25.25 Inf -0.115 1.0000
(HO Related - LO Related) - (HO Related - LO Unrelated) 27.25 4.10 Inf 6.647 <.0001
(HO Related - LO Related) - (HO Related - Y Unrelated) -58.48 25.46 Inf -2.296 1.0000
(HO Related - LO Related) - (LO Related - Y Related) -109.12 43.98 Inf -2.481 1.0000
Could you help me with how to set the contrasts for contrast which are of my interest? Now it is comparing too many contrasts. I am only interested in 3 contrasts of contrast:
(HO Related - HO Unrelated) - (LO Related - LO Related); (HO Related - HO Unrelated) - (Y Related - Y Related); (LO Related - LO Unrelated) - (Y Related - Y Related);
Thank you very much!