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

Update ci_for_prop.qmd #370

Merged
merged 1 commit into from
Jan 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions R/ci_for_prop.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Code example for Blaker's exact method:\
Code example for Clopper-pearson:\
`binconf(x=<count of successes> , n=<Total>,method="exact",alpha=0.05)`

**The {RBesT} package** produces CIs using the Clopper-Pearson method. In this example (x=36 and n=154), the results match the cardx package. However, as described below, there are 2 cases where the results using RBesT package do not match cardx or Hmisc.
**The {RBesT} package (Prior to Version 1.8-0)** produces CIs using the Clopper-Pearson method. In this example (x=36 and n=154), the results match the cardx package. However, as described below, there are 2 cases where the results using RBesT package do not match cardx or Hmisc.

1) x = 0 (0% responders), in which case the lower limit does not match.
2) x = n (100% responders), in which case the upper limit does not match.
Expand All @@ -101,13 +101,12 @@ RBesT equations are:\
pLow \<- qbeta(Low, r + (r == 0), n - r + 1)\
pHigh \<- qbeta(High, r + 1, n - r + ((n - r) == 0))

If the equations were updated as follows then it would match Hmisc intervals:\
In Version 1.8-0 onwards the equations were updated as follows, which then match the Hmisc intervals:\
pLow \<- qbeta(Low, r, n - r + 1)\
pHigh \<- qbeta(High, r + 1, n - r)

`BinaryExactCI(x=<count of successes> , n=<Total>,alpha=0.05)`

It is currently unclear why the RBesT script has the logical conditions (r==0) and ((n-r)==0. Therefore, we currently do not recommend using this package and suggest cardx or Hmisc is used instead. For updates about this, see the [issue](https://github.com/Novartis/RBesT/issues/21)

**The {ExactCIdiff} package** produces CIs for two dependent proportions (matched pairs) and two independent proportions (unmatched pairs).

Expand Down
Loading