| ms_size | R Documentation |
Solves for one design parameter so that the design of
ms_power has the target power, with the other parameters
fixed.
ms_size(
scenario,
looks,
test,
power = 0.9,
solve_for = c("events", "n", "accrual_duration", "followup"),
n = NULL,
followup = NULL,
interval = NULL,
round_up = TRUE,
target = c("first", "each", "both", "any"),
null_scenarios = NULL
)
scenario |
An |
looks |
An |
test |
An |
power |
Target power. |
solve_for |
|
n |
Total sample size (fixed for |
followup |
Time from the end of accrual to the final analysis
(fixed for |
interval |
Optional search interval for the unknown (for
|
round_up |
Whether to round the number of events or the sample size up to an integer. |
target |
For two endpoints, |
null_scenarios |
For two endpoints, null scenarios for the familywise
error rate of the solved design (see |
The unknown is one of
"events": the final number of events of the trigger
endpoint, with n and the accrual fixed (event-driven looks);
"followup": the time from the end of accrual to the final
analysis, with n and the accrual fixed (event-driven looks);
"n": the sample size, with the accrual rates (or, for an
accrual given by proportions, the accrual duration) fixed and the
final analysis at followup after the end of accrual
(event-driven looks) or at the calendar times of the looks;
"accrual_duration": the accrual duration of an accrual
given by proportions, with n fixed and the final analysis at
followup after the end of accrual (event-driven looks) or at
the calendar times of the looks.
For "events" and "followup" the search is over the calendar
time of the final analysis, so that the two give the same design (before
rounding). The search doubles or halves the unknown until the power
brackets the target, evaluates the power on a grid within the bracket
(or within interval) and refines the first grid interval in which
the target is reached, so that the smallest solution is returned when the
power is not monotone. Beta spending uses one minus power as the
total type II error.
When the looks are driven by the events of two endpoints, the final
numbers of events of both are their expected numbers at the final
analysis (see ms_power), so that the looks driven by the
endpoint other than that of the final look need fractions below 1. With
"events" the solution then has the final numbers of events of both
trigger endpoints, each rounded up with round_up = TRUE.
With two endpoints, target chooses the quantity that reaches
power: the power of the first endpoint ("first"), the
smaller of the powers of the two endpoints ("each"), the
probability of rejecting both hypotheses ("both") or that of
rejecting at least one ("any"), all under the multiple testing
procedure of test.
An object of class c("ms_size", "ms_power"): the result of
ms_power for the solved design, with solve_for,
the unrounded solution (named by endpoint for the final numbers
of events of two trigger endpoints), the target_power and, for
two endpoints, the target.
ms_power
ctl <- ms_model(death = log(2) / 12)
trt <- ms_model(death = 0.7 * log(2) / 12)
scn <- ms_scenario(ctl, trt, accrual = ms_accrual(rate = 20))
ms_size(scn, looks = ms_looks("os", fraction = c(0.5, 1)),
test = ms_test(), power = 0.9, solve_for = "events", n = 500)
# Sample size for a power of 80 per cent for both PFS and OS, tested in
# this order at one analysis 12 months after the end of accrual
fl <- ms_scenario(ms_fleischer(4, 12), ms_fleischer(6, 16),
accrual = ms_accrual(rate = 25))
ms_size(fl, looks = ms_looks("os"),
test = ms_test(endpoints = c("pfs", "os"), mtp = "fixed_sequence"),
power = 0.8, solve_for = "n", followup = 12, target = "each")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.