Borrar filtros
Borrar filtros

Repeated measures ANOVA post hoc testing Bonferroni correction

26 visualizaciones (últimos 30 días)
bsriv
bsriv el 2 de Feb. de 2023
Respondida: Koen van der Laan el 8 de Nov. de 2023
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 comentario
Rik
Rik el 2 de Feb. de 2023
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{:});

Iniciar sesión para comentar.

Respuestas (1)

Koen van der Laan
Koen van der Laan el 8 de Nov. de 2023
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

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by