Problem when using fitrm() function for ANOVA and getting an incomplete output

6 ビュー (過去 30 日間)
lil brain
lil brain 2022 年 5 月 9 日
回答済み: Jeff Miller 2022 年 5 月 9 日
Hi,
for clarity, I have a data set with 36 participants in two conditions called "high and low (18 per condition).
In each condition the participants repeated the task in 5 different scenarios called "phases" ('pre','balls','btw','basket','post').
Hence, there are two factors, namely, 1) the 2 conditions high and low, which are independent, and 2) the 5 phases which are dependent.
I would like to run a mixed factorial RM ANOVA on this data set using the following code:
high = importdata('comptable_high.mat'); % this is the data for the high condition
low = importdata('comptable_low.mat'); % this is the data for the low condition
comptable_high_low = [high;low]; % table including both conditions
condition = ... % specifying the group membership of each participant
['H' 'H' 'H' 'H' 'H' 'H' 'H' 'H' 'H' 'H' 'H' 'H' 'H' 'H' 'H' 'H' 'H' 'H' ...
'L' 'L' 'L' 'L' 'L' 'L' 'L' 'L' 'L' 'L' 'L' 'L' 'L' 'L' 'L' 'L' 'L' 'L' ]';
between = table...
(condition, comptable_high_low(:,1),...
comptable_high_low(:,2),comptable_high_low(:,3),...
comptable_high_low(:,4),comptable_high_low(:,5),...
'VariableNames',{'condition','pre','balls','btw','basket','post'});
within = table...
([1 2 3 4 5]','VariableNames',{'Phases'});
rm = fitrm(between,'pre-post ~ condition','WithinDesign',within);
ranovatbl = ranova(rm);
My issue is that when I run the code I get a ranova table that only includes the within group effect for the 5 phases as well the interaction effect between phases and the 2 conditons, but not the effect of the conditons alone.
I thought that this was guaranteed by specifying the between and the within table when calling:
rm = fitrm(between,'pre-post ~ condition','WithinDesign',within);
But it seems like this doesnt produce the full ranova table.
Could anyone explain to me how I can get the between group effect?
Thanks!

回答 (1 件)

Jeff Miller
Jeff Miller 2022 年 5 月 9 日
I can't check it at the moment, but I think maybe your last line should be
ranovatbl = ranova(rm,'WithinModel','Phases')

カテゴリ

Help Center および File ExchangeRepeated Measures and MANOVA についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by