フィルターのクリア

n-way anova produces the same p-value for all groups

2 ビュー (過去 30 日間)
AbioEngineer
AbioEngineer 2021 年 6 月 30 日
回答済み: AbioEngineer 2022 年 6 月 5 日
I have 6 vectors of values. These are split into groups i and m. There are 3 i groups and 2 m groups, which yields a combination of 6 total groups. Supposedly, my data should indicate that the data I have are grouped better according to 'Hm' vs 'Rm' than 'Li' vs 'Ri' vs 'Hi'. When I run the ANOVA using anovan() I get the same P-value for the i grouping, the m grouping and i*m interaction. When I plot the distributions using a boxplot they are clearly more separable along the m dimension.
All necessary files are attached. I'm using R2021a
I am running:
mdacdlcdp=[cdlcdpLiRm;cdlcdpLiHm;cdlcdpRiRm;cdlcdpRiHm;cdlcdpHiRm;cdlcdpHiHm];
p=anovan(mdacdlcdp,{igroup,mgroup},'model','interaction','varnames',{'i','m'})
But the results shown below are not consistent with my expectations.
Source Sum Sq. d.f. Mean Sq. F Prob>F
-----------------------------------------------------------------
i 0.4867 2 0.24335 2.98 0.054
m 1.2762 1 1.27619 15.62 0.054
i*m 0.2255 2 0.11276 1.38 0.054
Error 11.7664 144 0.08171
Total 13.7548 149
  2 件のコメント
Megumi Fukuda
Megumi Fukuda 2021 年 7 月 1 日
I ran these codes with my computer (WIndows, MATLAB 2021a)
load('anovadata.mat')
load('igroup.mat')
load('mgroup.mat')
mdacdlcdp=[cdlcdpLiRm;cdlcdpLiHm;cdlcdpRiRm;cdlcdpRiHm;cdlcdpHiRm;cdlcdpHiHm];
p=anovan(mdacdlcdp,{igroup,mgroup},'model','interaction','varnames',{'i','m'})
and got these results. Could you confirm you run your code correctly?
Source Sum Sq. d.f. Mean Sq. F Prob>F
-----------------------------------------------------
i 0.4867 2 0.24335 2.98 0.054
m 1.2762 1 1.27619 15.62 0.0001
i*m 0.2255 2 0.11276 1.38 0.2549
Error 11.7664 144 0.08171
Total 13.7548 149
AbioEngineer
AbioEngineer 2021 年 7 月 1 日
Thank you for your reply. I ran the exact same code as you, copied and pasted from your response, but got the same results as before. Is there a low level problem with my computer? I also have 2020b installed, but it gives me the same results as 2021a. I have rebooted my PC too, but no luck.

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

回答 (1 件)

AbioEngineer
AbioEngineer 2022 年 6 月 5 日
One of the toolboxes I permanently added to my startup path was causing the problem. I muted all the starup addpaths and it worked like normal. Sorry for all the fuss

カテゴリ

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

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by