Apply a design rule to paired replicate output
apply_design_rule.RdTurns the output of run_paired_scenario into the decisions
of one design, post hoc. The efficacy look is only checked if the trial
was not stopped at the futility look. A missing test statistic never
crosses a boundary (as in apply_GSD_to_trial).
Arguments
- raw
The
rawelement returned byrun_paired_scenario.- rule
A list with
type("D1"to"D5") and the rule's parameters:crit_final(D1);crit_eff,crit_fin(D2-D5);kappa(D3);z_fut(D4, D5);mw_t_star(D5).
Value
A data frame with one row per replicate and columns
decision ("Stop for efficacy", "Stop for futility",
"Successful at final" or "Unsuccessful at final"),
success, early_fut, early_eff, sample_size
and duration. Rows for failed replicates (non-missing
error) are NA.
Details
- D1
Fixed design: success iff
Z_fin_LRT > crit_final.- D2
Efficacy look then final:
"Stop for efficacy"ifZ_eff_LRT > crit_eff, otherwise the final analysis withZ_fin_LRT > crit_fin.- D3
D2 plus PP futility:
"Stop for futility"ifPP_val < kappa. Stops with an error ifPP_valisNAfor any replicate that did not fail (e.g. output fromcompute_PP = FALSE).- D4
D2 plus Z futility:
"Stop for futility"ifZ_int_LRT < z_fut.- D5
As D4 with the modestly weighted statistics
Z_int_MW_t<t>,Z_eff_MW_t<t>,Z_fin_MW_t<t>fort = mw_t_star.
D1, D2, D4 and D5 do not use PP_val, so they also work on output
from run_paired_scenario(compute_PP = FALSE).