View source: R/survival_functions.R
fit.fun | R Documentation |
fit.fun
fits multiple survival models to survival data using survHE.
fit.fun(
time,
status,
covariate = F,
rx = NULL,
data,
extrapolate = FALSE,
times,
k = 2,
legend_position = "bottom",
xlow = min(times),
xhigh = max(times),
ylow = 0,
yhigh = 1,
risktable = F,
mods = c("exp", "weibull", "gamma", "lnorm", "llogis", "gompertz", "rps", "gengamma")
)
time |
numeric vector of time to estimate probabilities. |
status |
numeric vector of event status. |
covariate |
logical value indicating whether treatment is being used as a covariate in parameteric survival models. Default = FALSE. |
rx |
character value indicating the treatment variable used as as covariate in parameteric survival models. |
data |
dataframe containing the time and status variables. |
extrapolate |
extrapolate beyond model time horizon. Default = FALSE. |
times |
time horizon the extrapolation is done over. |
k |
number of knots in Royston-Parmar spline model. Default = 2. |
legend_position |
position of the legend. Default = "bottom". |
xlow |
time horizon the extrapolation is done over. Default = min(time). |
xhigh |
time horizon the extrapolation is done over. Default = max(time). |
ylow |
time horizon the extrapolation is done over. Default = 0. |
yhigh |
time horizon the extrapolation is done over. Default = 1. |
risktable |
time horizon the extrapolation is done over. Default = F. |
mods |
a vector of models to fit. Choose from = c("exp", "weibull", "gamma", "lnorm", "llogis", "gompertz", "rps", "gengamma"). |
a list containing all survival model objects.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.