R: Two-Way Repeated-Measure Robust ANOVA| Different Conditions
Dear community,
I have a data frame, that looks something like this:
participant_nr condition side value_1 value_2
01 B left 13 77
01 C left 20 93
01 A left 9 60
01 C right 23 100
01 A right 11 70
01 B right 17 85
02 C left 18 79
02 A left 7 58
02 B left 12 79
02 A right 11 74
02 B right 15 90
02 C right 20 105
This is a within subject design. My experimental design measured the 2 different dependent variable (value_1 and value_2) in different conditions. The conditions depend on the experimental manipulations (A,B,C). These manipulations were applied for the left and the right side. I would like to conduct a repeated-measures ANOVA in order to investigate the effect of the condition (A, B or C), side (right or left) and the interaction of condition and side on the mean values of the 2 dependent varibales. I already checked the ANOVA-Assumptions and decided to go with a robust ANOVA. Also, I reshaped the data-frame from long format to wide format. Now the data frame looks something like this:
participant_nr condition side value_1 value_2 condition side value_1 value_2 condition side value_1 value_2 condition side value_1 value_2 condition side value_1 value_2 condition side value_1 value_2
01 B left 13 77 C left 20 93 A left 9 60 C right 23 100 A right 11 70 B right 17 85
02 C left 18 79 A left 7 58 B left 12 79 A right 11 74 B right 15 90 C right 20 105
As you can see, the order in which I tested the conditions were randomized. Usually, I would use anova_test() or the aov() function in order to perform the two-way ANOVA. I never worked with an within-subject design before. And since the data are counterbalanced, I don't have an idea how I should tell my code how to match the correct values from the dependent variables with the correct information from the trials.
Thank you in advance!