Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Effectsize measurement with unbalaced data #166

Open
Merlin31415 opened this issue Feb 19, 2024 · 9 comments
Open

Effectsize measurement with unbalaced data #166

Merlin31415 opened this issue Feb 19, 2024 · 9 comments

Comments

@Merlin31415
Copy link

Merlin31415 commented Feb 19, 2024

Hello,

I tried to run a script i have written last year and found that i am no longer able to calculate effectsize with dabestR with unbalanced data. I used to be able to get results regardless of the sampe size in each group.

Here an example with the data provided from dabest but removing one data point.

data(non_proportional_data)
test <- non_proportional_data
test <- test %>%
  slice(-5)

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

This leads to Error in PermutationTest(ctrl_measurement, test_measurement, effect_size = effect_size_type, : The two arrays do not have the same length.

Is it possible that that this is no longer supported or am I missing something?

Best,
Merlin

@sunroofgod
Copy link
Collaborator

Hi @Merlin31415, sorry for the late reply!

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: #154.

Hope this helps :)

@Jacobluke-
Copy link
Collaborator

Issue closed with no response for a long time

@mz555
Copy link

mz555 commented Aug 4, 2024

This issue persists. If i try the mean_diff() or the cliff_delta() I get an error:

Error in `vec_slice()`:
! Can't subset elements past the end.
ℹ Locations 38 and 38 don't exist.
ℹ There are only 37 elements.

@Lucas1213WZY
Copy link
Collaborator

Hi @mz555 ,

May I ask which version of dabestr you are using? If you are using version 2023.9.12, the issue might persist. We have addressed this problem in the latest version which is on our development branch.

If this is the case, please update your version of dabestr to the development version by running:

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

After updating, reload the library with:

library(dabestr)

and rerun your code.

If you are already using the development version and still encountering issues, could you provide us with your code snippet, the dataset, or a more detailed error message if one exists after running your code? This will help us reproduce the error and determine which part is causing the problem.

Thank you!

@Jacobluke-
Copy link
Collaborator

Hi @mz555 ,

We've checked that this error has been resolved in the dev branch.

According to your description, it's vec_slice() function that is generating errors, and it's closely related to slice() method in dplyr from this part of the code:

test <- test %>%
  slice(-5)

Can you try updating both dplyr and it's dependencies to see if such problem persists?

@mz555
Copy link

mz555 commented Aug 7, 2024 via email

@Lucas1213WZY
Copy link
Collaborator

Lucas1213WZY commented Aug 10, 2024

Hi @mz555 Mircea,

Thank you for the feedback! May I know how the website crash occurred or a more detailed explanation of how the data looks like and what the experimental design is? For example, when using the cliffs delta's anova functionality, was it 2x2 or some other experimental design, as of now we can only carry out 2x2 experimental designs (2x3 or more complex designs are not supported).

@Lucas1213WZY Lucas1213WZY reopened this Aug 10, 2024
@mz555
Copy link

mz555 commented Aug 10, 2024 via email

@Lucas1213WZY
Copy link
Collaborator

Hi @mz555 Mircea,

Thank you for providing us with the details regarding the issue on the website, I'll report to my team and my colleague in charge of the web application. I hope this issue can be resolved as soon as possible.

Best,
Lucas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants