post hoc testing Bonferroni correction after a repeated measure ANOVA

36 views (last 30 days)
Hello, I am trying to multicompare set of data with Bonferroni correction after a repeated measure ANOVA. Here is the code i am using.
M = [1 101.05 39.99 1.10;
2 216.14 70.14 1.25;
3 26.53 81.12 1.54;
4 231.18 135.89 0.89;
5 140.40 37.21 0.01];
T = array2table(M(:,2:end));
T.Properties.VariableNames = {'A' 'B' 'C'};
withinDesign = table([1 2 3]','VariableNames',{'Condition'});
withinDesign.Condition = categorical(withinDesign.Condition);
rm = fitrm(T,'A-C ~ 1','WithinDesign',withinDesign);
raov = ranova(rm,'WithinModel','Condition');
result = multcompare(rm,'Condition','CriticalValueType','bonferroni')
however, code results follwoing error. Can anyone help me correctly use Bonferroni correction ?.
Error using internal.stats.parseArgs
Invalid parameter name: CriticalValueType.
Error in RepeatedMeasuresModel/multcompare (line 1132)
internal.stats.parseArgs(okargs,defaults,varargin{:});
Error in new (line 17)
result = multcompare(rm,'Condition','CriticalValueType','bonferroni');
Any help appreciated. Thank you.

Accepted Answer

Rik
Rik on 24 Mar 2023
In R2020a, this parameter was called CType, not CriticalValueType. You can find the release-specific documentation page here.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!