ALPHA must be a scalar between 0 and 1, exclusive.

8 ビュー (過去 30 日間)
João Lima
João Lima 2016 年 12 月 10 日
回答済み: Brendan Hamm 2016 年 12 月 11 日
Can anybody help me?
I had this exception in my code.
The error is indicated in this line:
saida_multcompare, tabela_multcompare, stats_multcompare] = multcompare(stats_ANOVA, [1 2],'display','off');
Thanks
  2 件のコメント
Image Analyst
Image Analyst 2016 年 12 月 10 日
What is the value of stats_ANOVA or how did you get it?
Star Strider
Star Strider 2016 年 12 月 10 日
There are two different multcompare functions, each with different argument lists and different outputs.
Which one are you using?
What version of MATLAB are you using?
Your code does not match the documentation for either function that I have in R2016b.

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

回答 (1 件)

Brendan Hamm
Brendan Hamm 2016 年 12 月 11 日
Older versions of MATLAB did have a slightly different syntax for the multcompare function which was:
multcompare(stats,alpha,...)
This has been changed in later releases to:
multcompare(stats,'Alpha',alpha,...)
but the latter is backwards compatible ... that is the former statement works in any version of MATLAB.
That being said you are passing in a vector containing 2 values, 1 and 2. Now alpha represents the significance level used in the hypothesis test. We can only perform the test at a single significance level, so you cannot pass in a vector as you do. Furthermore, it makes no sense to perform a hypothesis test at a significance level of 0 or 1, so the allowed range of value is (0,1).
Maybe try a reasonable significance level:
[
saida_multcompare, tabela_multcompare, stats_multcompare] = multcompare(stats_ANOVA, 0.05,'display','off');
If this was not what you intended, you will have to explain what you were trying to do with that function call above? What does [1,2] represent?

カテゴリ

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