필터 지우기
필터 지우기

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 CenterFile Exchange에서 Statistics 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