This routine takes the entries from a 2x2 table as the arguments and returns the estimate for the difference of the probabilities p_A-p_B along with the Wilson-CI. It also finds a p-value dual to the Wilson method. For more details, see the paper "A simple blinding index for randomized controlled trials" by Petroff, Bacak, Dagres, Dilk and Wachter, which has been submitted for publication.
BlindingIndex(
n_AA,
n_BA,
n_AB,
n_BB,
tolerance = 1e-12,
switch_point = 1e-12,
conf.level = 0.95
)
Estimate
Lower end of CI
Upper end of CI
p-value dual to the Wilson CI method
z-value corresponding to the p-value
Number of patients in Group A guessing that they are in Group A. A non-negative number, usually an integer.
Number of patients in Group A guessing that they are in Group B. A non-negative number, usually an integer.
Number of patients in Group B guessing that they are in Group A. A non-negative number, usually an integer.
Number of patients in Group B guessing that they are in Group B. A non-negative number, usually an integer.
Alternatively, one can pass the first four arguments as a single 2x2 table, that is, as.table(cbind(c(n_AA, n_BA), c(n_AB, n_BB))).
Tolerance for the `stats::uniroot' function.
A technical detail. A (very small) positive number.
confidence level.