Skip to content

Commit 4b00a78

Browse files
committed
minor revision based on Keaven's comments
1 parent 81aa1c4 commit 4b00a78

8 files changed

+65
-23
lines changed

R/gs_design_ahr.R

+15-4
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,21 @@
2323
#' @param ratio Experimental:Control randomization ratio.
2424
#' @param alpha One-sided Type I error.
2525
#' @param beta Type II error.
26-
#' @param info_frac Targeted information fraction at each analysis.
27-
#' @param analysis_time Minimum time of analysis.
26+
#' @param info_frac Targeted information fraction at each analysis. See details for properly set it up.
27+
#' @param analysis_time Targeted time of analysis. See details for properly set it up.
2828
#' @param binding Indicator of whether futility bound is binding;
2929
#' default of `FALSE` is recommended.
3030
#' @param upper Function to compute upper bound.
31-
#' - \code{gs_b()}: fixed efficacy bounds.
3231
#' - \code{gs_spending_bound()}: alpha-spending efficacy bounds.
32+
#' - \code{gs_b()}: fixed efficacy bounds.
3333
#' @param upar Parameters passed to `upper`.
3434
#' - If `upper = gs_b`, then `upar` is a numerical vector specifying the fixed efficacy bounds per analysis.
3535
#' - If `upper = gs_spending_bound`, then `upar` is a list including
3636
#' - `sf` for the spending function family.
3737
#' - `total_spend` for total alpha spend.
3838
#' - `param` for the parameter of the spending function.
3939
#' - `timing` (not required for information-based spending) for the spending time if different from information-based spending.
40-
#' @param lower Function to compute lower bound, which can be set up similarly as `upper.`
40+
#' @param lower Function to compute lower bound, which can be set up similarly as `upper`. More details can be find in [this vignette](https://merck.github.io/gsDesign2/articles/story-seven-test-types.html).
4141
#' @param lpar Parameters passed to `lower`, which can be set up similarly as `upar.`
4242
#' @param info_scale Information scale for calculation. Options are:
4343
#' - `"h0_h1_info"` (default): variance under both null and alternative hypotheses is used.
@@ -71,6 +71,17 @@
7171
#' - The `analysis` is a table summarizing the analysis time, sample size, events, average HR, treatment effect and statistical information per analysis.
7272
#' @export
7373
#'
74+
#' @details
75+
#' The parameters `info_frac` and `analysis_time` are used to determine the timing for interim and final analyses.
76+
#' - If the interim analysis is decided by targeted information fraction and the study duration is known,
77+
#' then `info_frac` is a numerical vector where each element (greater than 0 and less than or equal to 1)
78+
#' represents the information fraction for each analysis.
79+
#' The `analysis_time`, which defaults to 36, indicates the time for the final analysis.
80+
#' - If the interim analysis is determined solely by the targeted analysis timing,
81+
#' then `analysis_time` will be a vector specifying the time for each analysis.
82+
#' - If both the targeted analysis time and the targeted information fraction are utilized, which arrives latter,
83+
#' then both `info_frac` and `analysis_time` should be provided as vectors.
84+
#'
7485
#' @examples
7586
#' library(gsDesign)
7687
#' library(gsDesign2)

R/gs_power_ahr.R

+9-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#' non-proportional hazards.
2424
#'
2525
#' @inheritParams gs_design_ahr
26-
#' @param event A numerical vector specifying the targeted event at each analysis.
26+
#' @param event A numerical vector specifying the targeted event at each analysis. See details for properly set it up.
2727
#' @param integer Logical value integer whether it is an integer design
2828
#' (i.e., integer sample size and events) or not. This argument is commonly
2929
#' used when creating integer design via [to_integer()].
@@ -43,6 +43,14 @@
4343
#' targeted `analysis_time`.
4444
#'
4545
#' @export
46+
#' @details
47+
#' The parameters `event` and `analysis_time` are used to determine the timing for interim and final analyses.
48+
#' - If the interim analysis is decided by targeted event,
49+
#' then `event` is a numerical vector where each element represents the targeted events for each analysis.
50+
#' - If the interim analysis is determined solely by the targeted analysis timing,
51+
#' then `analysis_time` will be a vector specifying the time for each analysis.
52+
#' - If both the targeted analysis time and the targeted event are utilized, which arrives latter,
53+
#' then both `event` and `analysis_time` should be provided as vectors.
4654
#'
4755
#' @examples
4856
#' library(gsDesign2)

man/gs_design_ahr.Rd

+17-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/gs_design_combo.Rd

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/gs_design_wlr.Rd

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/gs_power_ahr.Rd

+13-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/gs_power_combo.Rd

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/gs_power_wlr.Rd

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)