Hi everyone!
I am having troubles understanding how to perform the correct anova test on my data. I have 16 subjects who are being treated with 2 different treatments. For each subject and each treatment measures are taken at 6 different time points (attached is the excel file). Is repeated measures anova the best way to go? If so, what is the most apporpriate command to use?
Here is the code I have so far. The results are kind of strange so I am not sure if it is wrong or I am just interpreting it the wrong way.
Thanks,
Giulia
Q2 = xlsread('Q2.xls'); Treatment = categorical(Q2(:,2)); ID = Q2(:,1); t = table(Treatment, Q2(:,3),Q2(:,4),Q2(:,5),Q2(:,6),Q2(:,7), Q2(:,8),'VariableNames', {'Treatment', 't1', 't2', 't3', 't4', 't5', 't6'}); Time = [1 2 3 4 5 6]'; rm = fitrm( t, 't1-t6~Treatment', 'WithinDesign', Time); ranovatbl = ranova(rm); disp(ranovatbl); multcompare(rm, 'Time', 'By', 'Treatment')
Best Answer