Repeated measures ANOVA post hoc testing Bonferroni correction
31 次查看(过去 30 天)
显示 更早的评论
Hi, I am using a repeated measures ANOVA, and I would like to use the multcompare function to do Bonferroni correction.
When I use the default Tukey's HSD it works
multcompare(rm,'instruction')
ans =
2×7 table
instruction_1 instruction_2 Difference StdErr pValue Lower Upper
_____________ _____________ __________ _______ ________ _______ ________
1 2 2.0082 0.85855 0.029293 0.22279 3.7937
2 1 -2.0082 0.85855 0.029293 -3.7937 -0.22279
But when I try to use the bonferroni correction it doesn't
multcompare(rm,'instruction',"CriticalValueType","bonferroni")
Error using internal.stats.parseArgs
Invalid parameter name: CriticalValueType.
Error in RepeatedMeasuresModel/multcompare (line 1132)
internal.stats.parseArgs(okargs,defaults,varargin{:});
I'm not sure what the issue with my syntax is- please help!
1 个评论
Rik
2023-2-2
Well, your original code already results in an error for me. Without your initial code working, it is not possible to say why your second doesn't work.
load carsmall
[p,t,stats] = anova1(MPG,Origin);clc,close all
multcompare(stats,'instruction')
回答(1 个)
Koen van der Laan
2023-11-8
Hello,
I recently experienced the same problem and found a answer. you need to use 'ComparisonType' to set the correction method when using a repeated measures model as input for 'multcompare'.
see this page:
https://nl.mathworks.com/help/stats/repeatedmeasuresmodel.multcompare.html#namevaluepairarguments
0 个评论
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!