Make cell arrays the same size for ttest

4 ビュー (過去 30 日間)
Alexander Guillen
Alexander Guillen 2023 年 4 月 3 日
編集済み: Alexander Guillen 2023 年 4 月 4 日
I have this cell array called Th. But the columns are not the same size. I want to conduct the ttest on this data. The first 4 columns is one group and the second 4 columns is the other group. I was thinking that perhaps I could look at the column with the lowest size which is 88276 X 1(4th column), and make the oher columns that size. Is this a good approach? I tried zeropadding ( look at the max and zeropad the rest of the columns to match the max size) but I dont think that's correct?

採用された回答

Star Strider
Star Strider 2023 年 4 月 3 日
An acceptable alternative for unpaired data, (and the two vectors having unequal lengths would suggest this), that does not require the two vectors to have the same lengths is the Wilcoxon ranksum test. The advantage is that ranksum assumes that the two vectors have the same distribution, although the actual distribution is irrelevant. The ttest2 function for unpaired data requires that the arguments have the same lengths as well.
Generating multiple comparisions between the two groups could be a problem. I am not certain what to suggest with respect to that.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStatistics and Machine Learning Toolbox についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by