-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
resolve conflict when rebasing feature off main
- Loading branch information
1 parent
9fbc3ba
commit d9cc2e3
Showing
4 changed files
with
117 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
## 40 pts trial with interim looks after each 10 pts., | ||
## final efficacy decision if more than 80% probability to be above 20% ORR, | ||
## final futility decision otherwise. | ||
## Interim efficacy decision if more than 90% predictive probability reach this, | ||
## interim futility decision if less than 10% predictive probability. | ||
## Uniform prior (i.e. beta(1, 1)) on the ORR: | ||
# 40 pts trial with interim looks after each 10 pts., | ||
# final efficacy decision if more than 80% probability to be above 20% ORR, | ||
# final futility decision otherwise. | ||
# Interim efficacy decision if more than 90% predictive probability reach this, | ||
# interim futility decision if less than 10% predictive probability. | ||
# Uniform prior (i.e. beta(1, 1)) on the ORR: | ||
boundsPredprob( | ||
nvec = c(10, 20, 30, 40), p = 0.20, tT = 0.80, | ||
phiL = 0.10, phiU = 0.90, a = 1, b = 1 | ||
) | ||
## From this we see e.g. that at the first IA at 10 pts, we would stop for futility | ||
## if no patient responded, and for efficacy if 4 or more pts responded. | ||
# From this we see e.g. that at the first IA at 10 pts, we would stop for futility | ||
# if no patient responded, and for efficacy if 4 or more pts responded. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# boundsPostProb ---- | ||
test_that("boundsPredprob gives correct result and list", { | ||
result <- boundsPredprob( | ||
nvec = c(10, 20, 30, 40), | ||
p0 = 0.2, | ||
tT = 0.80, | ||
phiL = 0.10, | ||
phiU = 0.90, | ||
a = 1, | ||
b = 1 | ||
) | ||
expected <- data.frame( | ||
list( | ||
nvec = c(10, 20, 30, 40), | ||
xL = c(0, 2, 5, 9), | ||
pL = c(0, 0.1, 0.1667, 0.225), | ||
postL = c(0.0859, 0.1787, 0.3931, 0.704), | ||
UciL = c(0.2589, 0.2826, 0.319, 0.3598), | ||
xU = c(4, 7, 9, 10), | ||
pU = c(0.4, 0.35, 0.3, 0.25), | ||
postU = c(0.9496, 0.9569, 0.9254, 0.8177), | ||
LciU = c(0.15, 0.1773, 0.1663, 0.1424) | ||
) | ||
) | ||
expect_equal(result$xL, c(0, 2, 5, 9)) | ||
expect_equal(result$pL, c(0, 0.1, 0.1667, 0.225)) | ||
expect_equal(result$postL, c(0.0859, 0.1787, 0.3931, 0.704)) | ||
expect_equal(result$UciL, c(0.2589, 0.2826, 0.319, 0.3598)) | ||
expect_equal(result$xU, c(4, 7, 9, 10)) | ||
expect_equal(result$pU, c(0.4, 0.35, 0.3, 0.25)) | ||
expect_equal(result$postU, c(0.9496, 0.9569, 0.9254, 0.8177)) | ||
expect_equal(result$LciU, c(0.15, 0.1773, 0.1663, 0.1424)) | ||
}) |