フィルターのクリア

Repeated measures ANOVA post hoc testing Bonferroni correction

26 ビュー (過去 30 日間)
bsriv
bsriv 2023 年 2 月 2 日
回答済み: Koen van der Laan 2023 年 11 月 8 日
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
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')
Error using internal.stats.parseArgs
Wrong number of arguments.

Error in multcompare (line 121)
internal.stats.parseArgs(okargs,defaults,varargin{:});

サインインしてコメントする。

回答 (1 件)

Koen van der Laan
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

カテゴリ

Help Center および File ExchangeAnalysis of Variance and Covariance についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by