ANOVAN main effects versus t-test for a 2 way anova

5 ビュー (過去 30 日間)
Jessica Benady-Chorney
Jessica Benady-Chorney 2017 年 2 月 27 日
コメント済み: Star Strider 2017 年 2 月 27 日
I have run a two way anova using the anovan function, which gives as outputs main effects. To my knowledge, the test of main effects within one factor in a 2 way anova should be the same as doing a ttest (independent samples). However, I do not get the same result when I run ttest2 on one factor at a time.
Is there a reason for this?
Thank you

回答 (1 件)

Star Strider
Star Strider 2017 年 2 月 27 日
The multcompare (link) function is the correct approach. It automatically adjusts the t-statistics for multiple comparisons.
  2 件のコメント
Jessica Benady-Chorney
Jessica Benady-Chorney 2017 年 2 月 27 日
Sorry, this function is the correct approach as compared to which approach? My use of anovan or my use of ttest2?
Star Strider
Star Strider 2017 年 2 月 27 日
Your use of ttest2.
If anovan is giving you the results that you believe are appropriate, then it’s likely correct.
The ttest2 function compares two independent data vectors, assuming they are your only data.
The multcompare function does the appropriate corrections for multiple comparisons because it takes into account the number of two-way comparisons necessary.

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

カテゴリ

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