Skip to content

Commit

Permalink
Merge branch '49_Design-doc_ocPostprob.R' of https://github.com/Genen…
Browse files Browse the repository at this point in the history
…tech/phase1b into 49_Design-doc_ocPostprob.R
  • Loading branch information
audreyyeoCH committed Jan 15, 2024
2 parents dbb53f4 + 4aca5f8 commit 658ac71
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions design/design-doc_ocPredprob.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ h_get_decision_one_predprob <- function(nnr, truep, p0, p1, parE = c(1, 1), nnE,
n = size_look,
Nmax = nnE[length(nnE)],
p = p0,
thetaT = tT, # the code says : P(truep > p0) > tT
thetaT = tT, # the code says : P(truep > p0) > tT
parE = parE
)$result
assert_number(qU, lower = 0, upper = 1)
Expand Down Expand Up @@ -127,7 +127,7 @@ h_get_decision_oneb_predprob <- function(nnr, truep, p0, p1, parE = c(1, 1), nnE
n = size_look,
Nmax = nnE[length(nnE)],
p = p0,
thetaT = tT, # the code says : P(truep > p0) > tT
thetaT = tT, # the code says : P(truep > p0) > tT
parE = parE
)$result
assert_number(qU, lower = 0, upper = 1)
Expand All @@ -139,22 +139,22 @@ h_get_decision_oneb_predprob <- function(nnr, truep, p0, p1, parE = c(1, 1), nnE
n = size_look,
Nmax = nnE[length(nnE)],
p = p0,
thetaT = tT, # the code says : P(truep > p0) > tT
thetaT = tT, # the code says : P(truep > p0) > tT
parE = parE
)$result
assert_number(qU, lower = 0, upper = 1)
decision <- ifelse(qU > tT, TRUE, FALSE) # grandma : ifelse(qU < tU, decision, TRUE)
} else { # interim decision where index_look != length(nnr)
} else { # interim decision where index_look != length(nnr)
if (size_look %in% nnE) { # for efficacy looks
qU <- something()
assert_number(qU, lower = 0, upper = 1)
decision <- ifelse(qU > phiU, TRUE, decision)
}
decision <- ifelse(qU > phiU, TRUE, decision)
}
if (size_look %in% nnF) { # for futility looks
qU <- something()
assert_number(qU, lower = 0, upper = 1)
decision <- ifelse(qU < phiL, FALSE, decision)
decision <- ifelse(qU < phiL, FALSE, decision)
}
}
all_sizes <- size_look
Expand Down Expand Up @@ -195,7 +195,7 @@ h_get_decision_two_predprob <- function(nnr, truep, p0, p1, parE = c(1, 1), nnE,
)$result
assert_number(qU, lower = 0, upper = 1)
decision <- ifelse(qU > tF, decision, FALSE) # grandma : ifelse(qU < tU, decision, TRUE)
}
}
if (size_look %in% nnF) {
qU <- 1 - predprob(
x = sum(x = response[1:size_look]),
Expand Down Expand Up @@ -267,13 +267,13 @@ h_get_decision_two_predprob <- function(nnr, truep, p0, p1, parE = c(1, 1), nnE,
if (size_look %in% nnE) { # for efficacy looks
qU <- something()
assert_number(qU, lower = 0, upper = 1)
decision <- ifelse(qU > phiU, FALSE, decision)
}
decision <- ifelse(qU > phiU, FALSE, decision)
}
if (size_look %in% nnF) { # for futility looks
qU <- something()
assert_number(qU, lower = 0, upper = 1)
decision <- ifelse(qU < phiL, TRUE, decision)
decision <- ifelse(qU < phiL, TRUE, decision)
}
}
list(
Expand Down

0 comments on commit 658ac71

Please sign in to comment.