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

Error in reporting n numbers in printed output #73

Closed
mfarrant opened this issue Apr 13, 2020 · 2 comments
Closed

Error in reporting n numbers in printed output #73

mfarrant opened this issue Apr 13, 2020 · 2 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@mfarrant
Copy link

In the printed output of the dabest test, the n numbers for the control and test groups are reversed.

Examination of the output using str() shows the correct values, e.g. 9 control and 15 test in my example:

..$ 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.

Examination of the R code seems to suggest that two lines in print row_dabest are swapped:

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"
    )
  )
@josesho josesho self-assigned this Apr 14, 2020
@josesho josesho added the bug Something isn't working label Apr 14, 2020
@josesho josesho added this to the v0.2.4 milestone Apr 14, 2020
@josesho
Copy link
Member

josesho commented Apr 14, 2020

Thanks for this bug report and detailed autopsy! This should be fixed in the upcoming release, which is slated for CRAN submission soon.

@josesho josesho mentioned this issue Apr 21, 2020
@josesho
Copy link
Member

josesho commented Apr 21, 2020

Resolved with v0.2.5 (PR #77)

@josesho josesho closed this as completed Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants