Skip to content

Commit 2d1ed94

Browse files
committed
clean
1 parent 17fbce4 commit 2d1ed94

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

R/boundsPredprob.R

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
#' - `pL` : response rate corresponding to `xL`.
1313
#' - `predL` : predictive probability corresponding to `xL`
1414
#' - `postL`: posterior probability corresponding to `xL`.
15-
#' - `Ucil` : upper bound of one sided 95% CI for the response rate based on an
15+
#' - `pL_upper_ci` : upper bound of one sided 95% CI for the response rate based on an
1616
#' exact binomial test.
1717
#' - `xU` : the minimal number of responses that meet the efficacy threshold.
1818
#' - `pU` : response rate corresponding to `xU`.
1919
#' - `predU` : predictive probability corresponding to `xU`
2020
#' - `postU`: posterior probability corresponding to `xU`.
21-
#' - `LciU` : lower bound of one sided 95% CI for the response rate based on exact
21+
#' - `pU_lower_ci` : lower bound of one sided 95% CI for the response rate based on exact
2222
#' binomial test.
2323
#'
2424
#' @importFrom stats binom.test
@@ -37,6 +37,8 @@ boundsPredprob <- function(looks, Nmax = max(looks), p0, tT, phiL, phiU, parE =
3737
assert_numeric(looks)
3838
assert_number(p0, lower = 0, upper = 1)
3939
assert_number(tT, lower = 0, upper = 1)
40+
assert_number(phiU, lower = 0, upper = 1)
41+
assert_number(phiL, lower = 0, upper = 1)
4042
assert_numeric(parE, min.len = 2, any.missing = FALSE)
4143
znames <- c(
4244
"xL", "pL", "predL", "postL", "UciL",
@@ -52,11 +54,11 @@ boundsPredprob <- function(looks, Nmax = max(looks), p0, tT, phiL, phiU, parE =
5254
xU <- NA
5355
for (x in 0:n) {
5456
predprob <- predprob(x = x, n = n, Nmax = max(looks), p = p0, thetaT = tT, parE = parE, weights = weights)$result
55-
if (predprob <= phiL) { # Futility look, Rule Pr(Pr(P > p0 | x, Y, a, b) >= tT | x) =< phiL
57+
if (predprob <= phiL) { # Futility look, Rule Pr(Pr( RR > p0 | x, Y) >= tT | x) =< phiL
5658
xL <- x
5759
predL <- predprob
5860
}
59-
if (predprob >= phiU) { # Efficacy look, Rule Pr(Pr(P > p0 | x, Y, a, b) >= tT | x) >= phiU,
61+
if (predprob >= phiU) { # Efficacy look, Rule Pr(Pr( RR > p0 | x, Y) >= tT | x) >= phiU,
6062
xU <- x
6163
predU <- predprob
6264
break

man/boundsPredprob.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)