Closed JulianGaviriaL closed 10 months ago
Your installed version of {effectsize}
should have the new repeated_measures_d()
that does just that:
library(effectsize)
r_001 <- read.csv("r_001.csv")
repeated_measures_d(Observations ~ Group | Participant, data = r_001)
#> d (rm) | 95% CI
#> ----------------------
#> 0.05 | [-0.48, 0.57]
#>
#> - Adjusted for small sample bias.
Read the documents for the available types:
repeated_measures_d(Observations ~ Group | Participant, data = r_001, method = "z")
#> d (z) | 95% CI
#> ---------------------
#> 0.03 | [-0.36, 0.43]
#>
#> - Adjusted for small sample bias.
repeated_measures_d(Observations ~ Group | Participant, data = r_001, method = "b")
#> Becker's d | 95% CI
#> --------------------------
#> 0.04 | [-0.49, 0.57]
#>
#> - Adjusted for small sample bias.
And more...
Created on 2023-12-05 with reprex v2.0.2
Thanks @mattansb
Just to report an issue with the syntax for handling NA values:
the function runs fine without misisng values: r_001b.csv
repeated_measures_d(Observations ~ Group | Participant, data = r_001b)
But yields the following error when there are missing values: r_001.csv
repeated_measures_d(Observations ~ Group | Participant, data = r_001)
Error in if (verbose && any(tapply(mf[[1]], mf[3:2], length) > 1L)) { : missing value where TRUE/FALSE needed
Thanks. Should be fixed now.
Describe the bug How can I run the effectsize functions on data with long format? r_001.csv For instance, I get the following error message in:
aae<-cohens_d(Observations ~ Group | Participant, data = r_001)
Error in Group | Participant : operations are possible only for numeric, logical or complex typesI prefer not transforming the data to wide format, since I have multiple (>300) datasets.
Specifiations (please complete the following information):
R
Version [4.3.2 (2023-10-31 ucrt) -- "Eye Holes"]effectsize
Version [0.8.6.3] downloaded from R-universe: