herosurv is a grammar of survival modeling for use in health economic modeling. It provides a series of verbs that help you define, combine, and modify survival distributions.
# Install latest version from github
install_github("PolicyAnalysisInc/herosurv")
- Parametric distributions with specified parameter values:
define_surv_param()
- Parametric mixture & non-mixture cure models with specified parameter values:
define_surv_cure()
- Royston & Parmar spline models with specified parameter values:
define_surv_spline()
- Life-tables:
define_surv_lifetable()
- Kaplan-Meiers based on product-limit table:
define_surv_km()
- Custom Functions:
define_surv_func()
- Full support for models estimated using flexsurv package
- Partial support for KMs & Cox Models estimated using survival package
- Apply hazard ratio:
apply_hr()
- Apply odds ratio:
apply_or()
- Apply acceleration factor:
apply_af()
- Apply shift in time:
apply_shift()
- Set covariate levels of models with covariates:
set_covariates()
- Join survival distributions together at specified times:
join()
- Mix together survival distributions with specified weights:
mix()
- Combine distributions as independent risks:
add_hazards()
- Generate survival probabilities:
surv_prob()
- Generate event probabilities:
event_prob()