Hi all!
My question may be simple but I don't get to perform Bonferroni correction on ttest2 comparison of two random independent samples with equal column number but different row number.
I want to perform ttest2 comparison between each column of my two samples, therefore getting 10 p-values (see example below). But i get the following error "Index in position 1 is invalid. Array indices must be positive integers or logical values".
Once I overcome this error, I would like to perform Bonferroni correction on ttest2 comparison.
So many thanks!!! I'm using Matlab R2022b
[h,p,ci,stats] = ttest2(r1(i,:),r2(i,:));
results = multcompare(stats,"CriticalValueType","bonferroni")