ACCLAB / dabestr

Data Analysis with Bootstrap Estimation in R
https://acclab.github.io/dabestr
Apache License 2.0
215 stars 34 forks source link

Error with different sample sizes for independent samples #162

Closed gra-minardi closed 8 months ago

gra-minardi commented 8 months ago

Hi! I'm testing the functionality of the latest version of dabestr by adapting an example from the tutorial. Simply changing the size of one of the samples throws error. This is the example:

library(dabestr) library(tidyverse)

data("non_proportional_data")

non_prop <- non_proportional_data %>% filter(Group %in% c("Control 1", "Test 1"))

non_prop <- non_prop[1:36,] #Control 1 has 20 obs, Test 1 has 16 obs

dabest_obj.mean_diff <- load( data = non_prop, x = Group, y = Measurement, idx = c("Control 1", "Test 1")) %>% mean_diff()

Which generates the following error: Error in PermutationTest(ctrl_measurement, test_measurement, effect_size = effect_size_type, : The two arrays do not have the same length.

I would appreciate suggestions! Thank you!

sunroofgod commented 8 months ago

Hi @gra-minardi!

This issue has been addressed previously and resolved in the latest version that is available on the development branch.

You may update your version of dabestr to the development version via:

devtools::install_github(repo = "ACCLAB/dabestr", ref = "dev")

You may also see the issue thread regarding the same issue here: https://github.com/ACCLAB/dabestr/issues/154.

Hope this helps :)

gra-minardi commented 8 months ago

Its works fine! Thanks a lot!