plot.survextrap {survextrap} | R Documentation |
Plot method for survextrap model objects
Description
Intended as a quick check of the results of a model fit. See
plot_survival
and plot_hazard
for
the functions behind each panel, and survival
and hazard
to extract the data being plotted here
to enable custom plots like these.
Usage
## S3 method for class 'survextrap'
plot(x, type = "hazsurv", newdata = NULL, ...)
Arguments
x |
A fitted model object as returned by |
type |
|
newdata |
Data frame of covariate values to compute the output for. If there are covariates in the model and this is not supplied, the following default is used: (a) if the only covariate is one factor variable, then the output is computed for each level of this factor. (b) if there are multiple covariates, or any numeric covariates, then the output is computed at the mean of each numeric covariate in the original data, and at the baseline level of each factor covariate. Note: caution is required about how treatment groups (for example)
are stored in your data. If these are coded as numeric (0/1),
then if |
... |
Additional arguments, passed on to |
Value
A ggplot2
plot object.