|
16 | 16 | # You should have received a copy of the GNU General Public License
|
17 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>.
|
18 | 18 |
|
19 |
| -#' Calculate sample size and bounds given the power in group sequential design using average hazard ratio under non-proportional hazards |
| 19 | +#' Calculate sample size and bounds given targeted power and Type I error in group sequential design using average hazard ratio under non-proportional hazards |
20 | 20 | #'
|
21 | 21 | #' @param enroll_rate Enrollment rates defined by \code{define_enroll_rate()}.
|
22 | 22 | #' @param fail_rate Failure and dropout rates defined by \code{define_fail_rate()}.
|
23 | 23 | #' @param ratio Experimental:Control randomization ratio.
|
24 | 24 | #' @param alpha One-sided Type I error.
|
25 | 25 | #' @param beta Type II error.
|
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. |
| 26 | +#' @param info_frac Targeted information fraction for analyses. See details. |
| 27 | +#' @param analysis_time Targeted calendar timing of analyses. See details. |
28 | 28 | #' @param binding Indicator of whether futility bound is binding;
|
29 | 29 | #' default of `FALSE` is recommended.
|
30 | 30 | #' @param upper Function to compute upper bound.
|
|
36 | 36 | #' - `sf` for the spending function family.
|
37 | 37 | #' - `total_spend` for total alpha spend.
|
38 | 38 | #' - `param` for the parameter of the spending function.
|
39 |
| -#' - `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`. More details can be find in [this vignette](https://merck.github.io/gsDesign2/articles/story-seven-test-types.html). |
| 39 | +#' - `timing` specifies spending time if different from information-based spending; see details. |
| 40 | +#' @param lower Function to compute lower bound, which can be set up similarly as `upper`. |
| 41 | +#' See [this vignette](https://merck.github.io/gsDesign2/articles/story-seven-test-types.html). |
41 | 42 | #' @param lpar Parameters passed to `lower`, which can be set up similarly as `upar.`
|
42 | 43 | #' @param info_scale Information scale for calculation. Options are:
|
43 | 44 | #' - `"h0_h1_info"` (default): variance under both null and alternative hypotheses is used.
|
|
46 | 47 | #' @param h1_spending Indicator that lower bound to be set by spending
|
47 | 48 | #' under alternate hypothesis (input `fail_rate`)
|
48 | 49 | #' if spending is used for lower bound.
|
| 50 | +#' If this is `FALSE`, then the lower bound spending is under the null hypothesis. |
| 51 | +#' This is for two-sided symmetric or asymmetric testing under the null hypothesis; |
| 52 | +#' See [this vignette](https://merck.github.io/gsDesign2/articles/story-seven-test-types.html). |
49 | 53 | #' @param test_upper Indicator of which analyses should include an upper
|
50 | 54 | #' (efficacy) bound; single value of `TRUE` (default) indicates all analyses;
|
51 | 55 | #' otherwise, a logical vector of the same length as `info` should indicate
|
|
59 | 63 | #' Jennison and Turnbull (2000); default is 18, range is 1 to 80.
|
60 | 64 | #' Larger values provide larger number of grid points and greater accuracy.
|
61 | 65 | #' Normally, `r` will not be changed by the user.
|
62 |
| -#' @param tol Tolerance parameter for boundary convergence (on Z-scale). |
63 |
| -#' @param interval An interval that is presumed to include the time at which |
| 66 | +#' @param tol Tolerance parameter for boundary convergence (on Z-scale); normally not changed by the user. |
| 67 | +#' @param interval An interval presumed to include the times at which |
64 | 68 | #' expected event count is equal to targeted event.
|
| 69 | +#' Normally, this can be ignored by the user as it is set to `c(.01, 1000)`. |
65 | 70 | #'
|
66 | 71 | #' @return A list with input parameters, enrollment rate, analysis, and bound.
|
67 | 72 | #' - The `$input` is a list including `alpha`, `beta`, `ratio`, etc.
|
|
73 | 78 | #'
|
74 | 79 | #' @details
|
75 | 80 | #' 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, |
| 81 | +#' - If the interim analysis is determined by targeted information fraction and the study duration is known, |
77 | 82 | #' then `info_frac` is a numerical vector where each element (greater than 0 and less than or equal to 1)
|
78 | 83 | #' represents the information fraction for each analysis.
|
79 | 84 | #' 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, |
| 85 | +#' - If interim analyses are determined solely by the targeted calendar analysis timing from start of study, |
81 | 86 | #' 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. |
| 87 | +#' - If both the targeted analysis time and the targeted information fraction are utilized for a given analysis, |
| 88 | +#' then timing will be the maximum of the two with both `info_frac` and `analysis_time` provided as vectors. |
84 | 89 | #'
|
85 | 90 | #' @examples
|
86 | 91 | #' library(gsDesign)
|
|
0 commit comments