Effacer les filtres
Effacer les filtres

Make cell arrays the same size for ttest

4 vues (au cours des 30 derniers jours)
Alexander Guillen
Alexander Guillen le 3 Avr 2023
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?

Réponse acceptée

Star Strider
Star Strider le 3 Avr 2023
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.

Plus de réponses (0)

Catégories

En savoir plus sur Statistics and Machine Learning Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by