calc_haz_psm {psm3mkv} | R Documentation |
Derive pre and post-progression hazards of death under PSM
Description
Derive the hazards of death pre- and post-progression under either simple or complex PSM formulations.
Usage
calc_haz_psm(timevar, ptdata, dpam, psmtype)
Arguments
timevar |
Vector of times at which to calculate the hazards |
ptdata |
Dataset of patient level data. Must be a tibble with columns named:
Survival data for all other endpoints (time to progression, pre-progression death, post-progression survival) are derived from PFS and OS. |
dpam |
List of survival regressions for each endpoint:
|
psmtype |
Either "simple" or "complex" PSM formulation |
Value
List of pre, the pre-progression hazard, and post, the post-progression hazard
Examples
bosonc <- create_dummydata("flexbosms")
fits <- fit_ends_mods_spl(bosonc)
# Pick out best distribution according to min AIC
params <- list(
ppd = find_bestfit(fits$ppd, "aic")$fit,
ttp = find_bestfit(fits$ttp, "aic")$fit,
pfs = find_bestfit(fits$pfs, "aic")$fit,
os = find_bestfit(fits$os, "aic")$fit,
pps_cf = find_bestfit(fits$pps_cf, "aic")$fit,
pps_cr = find_bestfit(fits$pps_cr, "aic")$fit
)
calc_haz_psm(0:10, ptdata=bosonc, dpam=params, psmtype="simple")
calc_haz_psm(0:10, ptdata=bosonc, dpam=params, psmtype="complex")