"plot"(x, newdata=NULL, X=NULL, type="survival", fn=NULL, t=NULL, start=NULL, est=TRUE, ci=NULL, B=1000, cl=0.95, col.obs="black", lty.obs=1, lwd.obs=1, col="red", lty=1, lwd=2, col.ci=NULL, lty.ci=2, lwd.ci=1, ylim=NULL, add=FALSE,...)flexsurvreg or flexsurvspline, representing a fitted
survival model object.summary.flexsurvreg. If there are only factor covariates in the model, then Kaplan-Meier
(or nonparametric hazard...)
curves are plotted for all distinct groups, and by default, fitted
curves are also plotted for these groups. To plot Kaplan-Meier and
fitted curves for only a subset of groups, use plot(survfit())
followed by lines.flexsurvreg().
If there are any continuous covariates, then a single population Kaplan-Meier curve is drawn. By default, a single fitted curve is drawn with the covariates set to their mean values in the data - for categorical covariates, the means of the 0/1 indicator variables are taken.
summary.flexsurvreg. newdata is
an easier way.
"survival" for survival, to be plotted against
Kaplan-Meier estimates from plot.survfit. "cumhaz" for cumulative hazard, plotted against transformed
Kaplan-Meier estimates from plot.survfit.
"hazard" for hazard, to be plotted against smooth nonparametric
estimates from muhaz. The nonparametric
estimates tend to be unstable, and these plots are intended just to
roughly indicate the shape of the hazards through time. The min.time and max.time
options to muhaz may sometimes need to be
passed as arguments to plot.flexsurvreg to avoid an
error here.
Ignored if "fn" is specified.
t representing time, and start
representing left-truncation points, and any remaining arguments
must be parameters of the distribution. It
should return a vector of the same length as t.
summary.flexsurvreg. summary.flexsurvreg. TRUE or FALSE.)TRUE if one observed/fitted curve is plotted,
and FALSE if multiple curves are plotted.summary. Decrease
for greater speed at the expense of accuracy, or set
B=0 to turn off calculation of CIs.
TRUE, add lines to an existing plot,
otherwise new axes are drawn.plot.survfit or muhaz, for
example, to control the smoothness of the nonparametric hazard
estimates. The min.time and max.time
options to muhaz may sometimes need to be
changed from the defaults.flexsurvreg