one_simulation <- merge(
assumptions_crossing_hazards(),
design_fixed_followup(),
by=NULL
) |>
head(1) |>
generate_crossing_hazards()
head(one_simulation)
tail(one_simulation)
Design <- assumptions_crossing_hazards()
Design
my_design <- merge(
assumptions_crossing_hazards(),
design_fixed_followup(),
by=NULL
)
my_design$final_events <- ceiling((my_design$n_trt + my_design$n_ctrl)*0.75)
my_design$hazard_trt <- NA
my_design <- hr_after_crossing_from_PH_effect_size(my_design, target_power_ph=0.9)
my_design
design <- data.frame(
crossing = c(2, 4, 6),
hazard_ctrl = c(0.05, 0.05, 0.05),
hazard_trt_before = c(0.025, 0.025, 0.025),
hazard_trt_after = c(0.1, 0.1, 0.1),
censoring_prop = c(0.1, 0.3, 0.2),
n_trt = c(50, 50, 50),
n_ctrl = c(50, 50, 50),
followup = c(200, 200, 200),
recruitment = c(50, 50, 50)
)
cen_rate_from_cen_prop_crossing_hazards(design)
my_design <- merge(
assumptions_crossing_hazards(),
design_fixed_followup(),
by=NULL
)
my_design$follwup <- 15
my_design <- true_summary_statistics_crossing_hazards(my_design)
my_design
Run the code above in your browser using DataLab