kassambara / rstatix

Pipe-friendly Framework for Basic Statistical Tests in R
https://rpkgs.datanovia.com/rstatix/
432 stars 51 forks source link

Paired T test function does not work on multiple group comparisons if sample sizes are unequal (if some observations are missing) #192

Open turalu4 opened 11 months ago

turalu4 commented 11 months ago

Hi, Rstatix is very user friendly package. I don’t see any problem in paired T test function if you have two groups like before and after. However, paired t-test function does not work on multiple group comparisons if sample sizes are unequal (if some observations are missing in different time points). It needs missing observations to be determined by the user. But it is very time consuming due to many groups to compare (And I don’t want use drop.na). Missing observations are randomly distributed in my big dataset at 5 consecutive measurements. As you know, spss can easily perform pairwise deletion. So, you don’t need to delete all observations if it is missing at only one observation in spss (One comparison maybe based on 34 pairs while other maybe 36). In this scanario, rstatix produce complete.cases(x,y) warning. Force the user to establish equal sample sizes for all comparisons. Is there a solution to perform paired T test in different N of pairs. Let say 39 pairs while comparing time 1 and 2, and 33 pairs while comparing time 3 and 4 at once? I would like to hear your recommendations. Thank you, Umit