Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions R/gs_cp.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,17 @@
#' info_scale = "h0_h1_info") |> to_integer()
#'
#' # calculate conditional power
#' # case 1: currently at IA1, compute conditional power at IA2, IA3 and FA, with default theta = NULL
#' gs_cp(x = x, i = 1, zi = -gsDesign::hrn2z(hr = 0.8, n = 150+180, ratio = 1))
#' # case 1: currently at IA1, compute conditional power at IA2, IA3 and FA,
#' # with default theta = NULL
#' gs_cp(x = x, i = 1,
#' zi = -gsDesign::hrn2z(hr = 0.8, n = 150+180, ratio = 1))
#'
#' # case 2: currently at IA1, compute conditional power at IA2, IA3 and FA, with user-input theta
#' gs_cp(x = x, theta = c(0.15, 0.2, 0.25, 0.3), i = 1, zi = -gsDesign::hrn2z(hr = 0.8, n = 150+180, ratio = 1))
#' # case 2: currently at IA1, compute conditional power at IA2, IA3 and FA,
#' # with user-input theta
#' gs_cp(x = x,
#' theta = c(0.15, 0.2, 0.25, 0.3),
#' i = 1,
#' zi = -gsDesign::hrn2z(hr = 0.8, n = 150+180, ratio = 1))
#'
gs_cp <- function(x = NULL, theta = NULL, i = 1, zi = NULL){
# ------------------------------ #
Expand Down
3 changes: 2 additions & 1 deletion R/gs_cp_simple.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
#' @examples
#' library(gsDesign2)
#' library(gsDesign)
#' # Calculate conditional power with optional user-input theta (if NULL, will come from the input design)
#' # Calculate conditional power with optional user-input theta
#' # (if NULL, will come from the input design)
#' alpha <- 0.025
#' beta <- 0.1
#' ratio <- 1
Expand Down
14 changes: 10 additions & 4 deletions man/gs_cp.Rd

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

3 changes: 2 additions & 1 deletion man/gs_cp_simple.Rd

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

Loading