필터 지우기
필터 지우기

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 CenterFile Exchange에서 Analysis 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