-
Notifications
You must be signed in to change notification settings - Fork 34
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
Issue in mean_diff(p) - wrong degrees of freedom & the CI #106
Comments
Paired computations bug is reported previously in #94 , thanks for bumping this up. At first pass, I don't think this is a degree of freedom problem, but how the paired bootstrap is computed. |
Yes. Initially I thought it's calculated traditionally. Then I found it's done via bootstrap, so it's not the DF fault. Today morning my work was rejected by a statistical reviewer at my client due to this issue, as they used SAS to validate the outcome. |
That's a bummer! I apologise. We do have an intern who will be working on this. |
@josesho |
Hi @Generalized , It's not on CRAN yet but you can install the dev branch from Github with devtools::install_github("ACCLAB/[email protected]") |
It seems the mean_diff takes incorrect degrees of freedom: n rather than n-1 to calculate the quantile of t.
Data:
There are 12 rows.
Paired t: 11 rows (n-1)
t on change (equivalent to the above)
Now, dabestr: n=12 (that's fine for the mean itself, but the qt needs 11), the confidence interval does not match.
And the plot is wrong:
Also I checked the bootstrapped version, because you use bootstrap, and the CI differs and definitely does not cover zero. I used the same seed: 12345.
It's understandable, that results of those calculation may fluctuate a bit, but the current one goes too far and it will be rather difficult to justify it against statistical reviewers, when publishing it.
I use version 0.3.0.
The text was updated successfully, but these errors were encountered: