Description Usage Arguments Details Value
Title Get survival analysis curves from data
1 2 3 4 5 | survival_from_data(location, survival_specs, dists = dists,
save_fits = TRUE, just_load = FALSE,
set_definitions = "set_definitions.csv",
report_file_name = "survival_report", write_report = FALSE,
write_excel = write_report, report_template)
|
location |
base directory for the analysis. |
survival_specs |
a data.frame containing information on how to perform each fit - see @details. |
dists |
the distributions to use to fit the survival function |
save_fits |
should fits be saved to disk? Can be useful for testing. |
just_load |
If TRUE, data files are ignored in favor of loading fits
from |
set_definitions |
definitions of different subsets to fit |
report_file_name |
base name for survival output - Excel and the diagnostic tables and plots on the fits. |
write_report |
should the call produce an html report with diagnostic tables and plots on the fits? |
write_excel |
should the call produce a csv file summarizing fits? |
report_template |
If |
By default, the function fits with seven different distribution functions: exponential, Weibull, lognormal, log-logistic, Gompertz, gamma, and generalized gamma.
write_report
and write_excel
are ignored if just_load = TRUE
.
survival_specs contains information about how to create the fits:
the directory (or directories) in which
files are located, the file names, the names of the columns
that should be used for time, events, and censorship status,
and where and under what names to save the fits.
If data_files is NULL and fit files exists, then fit_files
should have the names of files in which survival models are kept.
If data_files is not NULL, then survival models will be fit from
the data in data_files (using the flexsurvreg
package), and if fit_files
is also not NULL, the survival models will be saved in fit_files.
If data_directory
begins with "\", with the platform file separator
(.Platform$file.sep
) or with a letter and a colon (to accomodate Windows),
it's considered absolute and not appended to location
.
a tibble with columns type
, treatment
, set_name
,
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.