Closed qpmnguyen closed 1 year ago
Thanks for the thoughtful PR.
For cases like this though, one would use prec_mean
instead of prec_meandiff
, which implements essentially exactly the formula you have implemented. We feel that modifying the documentation (and shiny app) to point the user to prec_mean
in this case is probably sufficient.
Ah, that totally makes sense.
Thank you for adding documentation. I can close out this PR.
Thanks!
Summary: This pull request is for simple support for paired t-tests in
prec_meandiff
. In this case, a paired t-test of difference-in-means would compute the confidence interval around the mean (paired) differences using the standard deviation of the (paired) differences. This value would be specified insd1
. As such, we do not usesd2
and expectn1
andn2
to be equal (r
= 1). A source for the equation is here.$$ \bar{d} = t{\alpha/2, n - 1} \cdot \frac{SD{\bar{d}}}{\sqrt{n}} $$
I attempted to affect the code base minimally by specifying this "paired" option as part of the
variance
argument. This is because there isn't really a paired t-test with unequal variances since the test is concerned with the variance of differences. As such, it makes sense forpaired
to be a separate option toequal
andunequal
.Note: I did not update anything related to
pkgdown
.A couple of reminders: