f_fit_survival_models: Fit survival models using different distributions

Description Usage Arguments Details Value

View source: R/survival_fit.R

Description

Fit survival models using different distributions

Usage

1
2
3
f_fit_survival_models(survdata, dists = allowed_fit_distributions,
  time_col_name, censor_col_name, treatment_col_name,
  covariate_col_names = NULL, fit_indiv_groups = TRUE)

Arguments

survdata

Survival data to be used.

dists

Distributional forms to be considered in fitting using flexsurvreg. By default, includes exponential, Weibull, lognormal, log-logistic, gamma, gompertz, and generalized gamma. Kaplan-Meier curves will also be stored automatically, with distribution name "km".

time_col_name

Name of the column in survdata with event times.

censor_col_name

Name of the column in survdata with censorship indicators.

treatment_col_name

Name of the column in survdata that holds the treatment group names (for example "control", "treatment", "dose1", and so on).

covariate_col_names

Not yet implemented

fit_indiv_groups

Should groups be fit individually? Default TRUE.

Details

survdata should be a data frame of the form required for flexsurv::flexsurvreg(). In the column specified by censor_col_name in the data itself, 1 means that an event (frequently death or disease progression, depending on context) was observed, while 0 means the event was censored. So the Kaplan-Meier plot will have a drop anywhere the censor column contains a 1, and will not contain a drop when the censor column contains a 0.

Value

a matrix (with dimnames) of flexsurvreg objects, with rows corresponding to the distributions, and columns corresponding to groups.


MattWiener/heemodFits documentation built on May 19, 2019, 8:21 a.m.