Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
audreyyeoCH committed Sep 27, 2024
1 parent 601c844 commit ca82fc1
Show file tree
Hide file tree
Showing 8 changed files with 139 additions and 57 deletions.
2 changes: 1 addition & 1 deletion R/boundsPostprob.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#'
#' @example examples/boundsPostprob.R
#' @export
boundsPostprob <- function(looks, p0, p1 = p0, tL, tU, parE, weights) {
boundsPostprob <- function(looks, p0, p1 = p0, tL, tU, parE = c(1, 1), weights) {
assert_numeric(looks)
assert_number(p0, lower = 0, upper = 1)
assert_number(p1, lower = 0, upper = 1)
Expand Down
12 changes: 8 additions & 4 deletions examples/ocPredprobDist.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,14 @@ result$oc
# True response rate or truep of the treatment group = 40%
# Desired difference to Standard of Care for Efficacy and Futility = 50%
# Delta calculation is absolute case. The following are the Final Stop rules respectively :
# - Final look for Efficacy: Pr( response rate + deltaE > 25% ) > 60% or P(response rate + deltaE > p0) > tT
# - Final look for Futility: Pr( response rate + deltaF < 25% ) < 60% or P(response rate + deltaF > p0) < tT
# - Interim look for Efficacy: Pr( success at final ) > 80% or P(success at final) > phiU
# - Interim look for Futility: Pr( failure at final ) < 20% or P(success at final) < phiL
# - Final look for Efficacy: Pr( response rate + deltaE > 25% ) > 60% or
# P(response rate + deltaE > p0) > tT
# - Final look for Futility: Pr( response rate + deltaF < 25% ) < 60% or
# P(response rate + deltaF > p0) < tT
# - Interim look for Efficacy: Pr( success at final ) > 80% or
# P(success at final) > phiU
# - Interim look for Futility: Pr( failure at final ) < 20% or
# P(success at final) < phiL
# We assume a prior of treatment arm parE = Beta(1,1), unless otherwise indicated.

set.seed(20)
Expand Down
7 changes: 0 additions & 7 deletions examples/plotBounds.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,3 @@ plotBounds(boundsPredprob(
nvec = c(10, 20, 30, 40), p = 0.20, tT = 0.80,
phiL = 0.10, phiU = 0.90, a = 1, b = 1
), yt = "p")
plotBounds(
boundsPostprob(
nvec = c(10, 20, 30, 40), p0 = 0.20,
tL = 0.10, tU = 0.90, a = 1, b = 1
),
yt = "p", add = TRUE
)
2 changes: 1 addition & 1 deletion man/boundsPostprob.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

121 changes: 121 additions & 0 deletions man/ocPredprob.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions man/ocPredprobDist.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions man/plotBounds.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 0 additions & 33 deletions tests/testthat/test-boundsPredprob.R

This file was deleted.

0 comments on commit ca82fc1

Please sign in to comment.