Function to calculate the 'optimal' BPP threshold value
calibrate_BPP_thresholds.RdFunction to calculate the 'optimal' BPP threshold value
Usage
calibrate_BPP_thresholds(
n_c,
n_t,
control_model,
effect_model,
recruitment_model,
IA_model,
analysis_model,
data_generating_model,
n_sims = 100
)Arguments
- n_c
Number of control patients
- n_t
Number of treatment patients
- control_model
A named list specifying the control arm survival distribution:
dist: Distribution type ("Exponential" or "Weibull")parameter_mode: Either "Fixed" or "Distribution"fixed_type: If "Fixed", specify as "Parameters" or "Landmark"lambda,gamma: Scale and shape parameterst1,t2: Landmark timessurv_t1,surv_t2: Survival probabilities at landmarkst1_Beta_a,t1_Beta_b,diff_Beta_a,diff_Beta_b: Beta prior parameters
- effect_model
A named list specifying beliefs about the treatment effect:
delay_SHELF,HR_SHELF: SHELF objects encoding beliefsdelay_dist,HR_dist: Distribution types ("hist" by default)P_S: Probability that survival curves separateP_DTE: Probability of delayed separation, conditional on separation
- recruitment_model
A named list specifying the recruitment process:
method: "power" or "PWC"period,power: Parameters for power modelrate,duration: Comma-separated strings for PWC model
- IA_model
A named list specifying the censoring mechanism for the future data:
events: Number of events which is 100% information fractionIF: The information fraction at which to censor and calculate BPP
- analysis_model
A named list specifying the final analysis and decision rule:
method: e.g."LRT","WLRT", or"MW".alpha: one-sided type I error level.alternative_hypothesis: direction of the alternative (e.g."one.sided").rho,gamma,t_star,s_star: additional parameters for WLRT or MW (if applicable).
- data_generating_model
A named list specifying the data-generating mechanisms
null_model:lambda_cfixed_delay:lambda_c,delay_timeandpost_delay_HRno_delay:lambda_candHR
- n_sims
Number of data sets to simulate (default is 100).