Compute and plot survivor function/cumulative distribution function for given combinations of covariates based on the fitted model.
# S3 method for smoothSurvReg
survfit(formula, cov, logscale.cov, time0 = 0, plot = TRUE, cdf = FALSE,
by, xlim, ylim = c(0, 1), xlab = "t", ylab,
type = "l", lty, main, sub, legend, bty = "n", cex.legend = 1, ...)
A dataframe with columns named x
and y
where x
gives the grid
and y
the values of the survivor/cum. distribution function at that grid.
Object of class smoothSurvReg.
Vector or matrix with covariates values for which the survivor curve/cdf
is to be computed and plotted. It must be a matrix with as many columns as
is the number of covariates (interactions included) or the vector of length
equal to the number of covariates (interactions included). Intercept is not
to be included in cov
. If cov
is missing a survivor curve
for the value of a covariate vector equal to zero is plotted. If there is
only intercept in the model the survivor curve based on the fitted error
distribution is always plotted.
Vector or matrix with covariate values for the expression of log-scale (if this depended on covariates). It can be omitted in the case that log-scale was common for all observations.
Starting time of the follow-up as used in the model. I.e. the model is assumed to be \(\log(T-time0) = x'\beta + \sigma\varepsilon\)
If TRUE
the plot is directly produced, otherwise only a data.frame
with information used for later plotting is returned.
If TRUE
cumulative distribution function is plotted instead of
the survivor function.
Step for a ploting grid. If NULL
it is automatically computed.
Arguments passed to the plot
function.
Arguments passed to the plot
function.
Arguments passed to the plot
function.
Arguments passed to the plot
function.
Argument passed to the plot
function.
argument passed to cex
argument of the
legend
function.
Arguments passed to the plot
function.
Arnošt Komárek arnost.komarek@mff.cuni.cz
smoothSurvReg
, plot