Functions to extract raw simulated samples
Usage
extract_sim(sim)
extract_hr(hr.pi)
extract_km_obs(km.pi)
extract_medsurv(km.pi)
extract_medsurv_delta(km.pi)
Arguments
- sim
A
survparamsim
class object generated bysurv_param_sim()
function.- hr.pi
a return object from
calc_hr_pi()
function.- km.pi
A return object from
calc_km_pi()
function.
Details
extract_sim()
extracts raw survival time & event status for all simulated subjects.
extract_hr()
extracts simulated HR for all repeated simulations.
If HR was calculated based on simulated survival times with
calc_hr_pi()
function, it also returns p values for Cox regression
fits, one for each group
based on Wald test and another for the overall significance of the
coefficient based on logrank test. The latter has the same values
across treatment groups when >2 levels in treatment
extract_km_obs()
extracts observed Kaplan-Meier curves.
extract_medsurv()
extracts simulated median survival times for all repeated simulations
extract_medsurv_delta()
extracts delta of median survival times between treatment groups