Enquire about "Error in PermutationTest(ctrl_measurement, test_measurement, effect_size = effect_size_type, : The two arrays do not have the same length"

66 views
Skip to first unread message

Alejandro Martin Sanchez

unread,
Jul 7, 2024, 11:30:12 AM7/7/24
to estimationstats

Dear developers,

A question has arisen regarding the use of the mean_diff() function from the R version of your dabest package. A few months ago, before the update to version 2023.9.12, I was able to execute this function without requiring the two groups to be compared (unpaired groups) to have the same size (n). I have a sample consisting of a total of 72 individuals, of which 32 are men and 40 are women. I wanted to use your package, as I did months ago with a similar sample, to check for significant differences between the two sex groups regarding different variables. The issue is that when I run the code, I get the error mentioned in the header of this entry. In case it's helpful, here is the code I am using:

two.group.unpaired <- load(biomech, x = Sex, y = Right_SOLID_EstJ, idx = c("Male", "Female") ) 
two.group.unpaired.mean.diff <- mean_diff(two.group.unpaired)"

My question is why it was possible to compare two unpaired groups of different sizes before the update, but not now. Has something changed in the code? Perhaps I am missing something important regarding the code, or maybe a few months ago I shouldn't have used this type of analysis to compare two groups of different sizes, even though the package allowed it. Either way, I would appreciate any help in clarifying this. 
Thank you very much for your time and for your assistance.
Best regards,
Alex

Andy A.

unread,
Jul 8, 2024, 10:31:27 AM7/8/24
to estimationstats
Alex, I am not a dev but am a user of the dabestR package - I had a similar problem and found a github issue thread indicating that it's a bug in that version of the package and suggesting installing the development branch in which the bug has been fixed - I did this and it resolved the error.

good luck!
Andy
Reply all
Reply to author
Forward
0 new messages