How to peform multiple paired-t tests

23 ビュー (過去 30 日間)
Yuzhen Lu
Yuzhen Lu 2019 年 2 月 18 日
編集済み: Sanush 2024 年 2 月 28 日
To my knowledge
ttest.m
can be used to peform a single parired t test, e.g., ttest(x,y), and the function can also be used for mutiple paired t tests when it is called many times. I wonder if there are some functions for multiple paired ttests, e.g., among x1, x2, x3 and x4, without calling ttest.m many times?

採用された回答

Star Strider
Star Strider 2019 年 2 月 18 日
You need to be very careful doing multiple comparisons. See the documentation for this multcompare (link) function (there are two). It will likely do what you want.
  2 件のコメント
Yuzhen Lu
Yuzhen Lu 2019 年 2 月 18 日
Is multcompare only applicable to unpaired tests?
Star Strider
Star Strider 2019 年 2 月 18 日
That would certainly be appropriate, since paired tests are best used with the repeated measures implementation of multcompare (link). (I missed the fact that you are performing paired tests in your original post.)

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

その他の回答 (1 件)

Sanush
Sanush 2024 年 2 月 28 日
編集済み: Sanush 2024 年 2 月 28 日
Pretty late, but I'll post an answer because I find myself coming here at least once a year to rediscover my own solution :-)
  1. Do paired t-tests and a Bonferroni Correction (file-exchange: https://au.mathworks.com/matlabcentral/fileexchange/4114-t-test-with-bonferroni-correction or multcompare)
  2. ANOVA (not perfect but appropriate for some problems)
  3. Ask yourself if multiple comparisons are necessary. If you can select one "master" set of measurements, you can just do a pairwise comparisons between this master set and the other sets.
Cheers to my future self and anyone who find this useful!
DISCLAIMER: Bonferroni Correction reduces type I error but increases type II error. Other more conservative corrections are avaiable in literature.

カテゴリ

Help Center および File ExchangeHypothesis Tests についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by