Closed mfarrant closed 4 years ago
In the printed output of the dabest test, the n numbers for the control and test groups are reversed.
dabest
control
test
Examination of the output using str() shows the correct values, e.g. 9 control and 15 test in my example:
str()
..$ control_group: chr "control" ..$ test_group : chr "test" ..$ control_size : int 9 ..$ test_size : int 15
However, the printed output shows the control and test n numbers reversed:
DABEST (Data Analysis with Bootstrap Estimation) v0.2.4 Variable: value Unpaired mean difference of test (n=9) minus control (n=15) -18.7 [95CI -23.2; -13.9] 5000 bootstrap resamples. All confidence intervals are bias-corrected and accelerated.
Variable: value
Unpaired mean difference of test (n=9) minus control (n=15) -18.7 [95CI -23.2; -13.9]
5000 bootstrap resamples. All confidence intervals are bias-corrected and accelerated.
Examination of the R code seems to suggest that two lines in print row_dabest are swapped:
print row_dabest
printrow_dabest <- function(my.row, sigdig = 3) { if (identical(my.row$paired, TRUE)) p <- "Paired" else p <- "Unpaired" ffunc <- my.row$func line1 <- stringr::str_interp( c( "${p} ${ffunc} difference of ", "${my.row$test_group} ", "(n=${my.row$control_size}) ", "minus ${my.row$control_group} ", "(n=${my.row$test_size})\n" ) )
Thanks for this bug report and detailed autopsy! This should be fixed in the upcoming release, which is slated for CRAN submission soon.
Resolved with v0.2.5 (PR #77)
In the printed output of the
dabest
test, the n numbers for thecontrol
andtest
groups are reversed.Examination of the output using
str()
shows the correct values, e.g. 9control
and 15test
in my example:However, the printed output shows the
control
andtest
n numbers reversed:Examination of the R code seems to suggest that two lines in
print row_dabest
are swapped: