Usage
## S3 method for class 'flexsurvreg':
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,...)
Arguments
newdata
Data frame containing covariate values to produce
fitted values for. See summary.flexsurvreg
.
If there are only factor covariates in the model, then Kaplan-Meier
(or nonparamet X
Alternative way to supply covariate values, as a model
matrix. See summary.flexsurvreg
. newdata
is
an easier way. type
"survival"
for survival, to be plotted against
Kaplan-Meier estimates from plot.survfit
.
"cumhaz"
for cumulative hazard, plotted against transformed
Kfn
Custom function of the parameters to summarise against time. The first two arguments
of the function must be t
representing time, and start
representing left-truncation points, and any remaining arguments
must be
est
Plot fitted curves (TRUE
or FALSE
.)
ci
Plot confidence intervals for fitted curves. By default,
this is TRUE
if one observed/fitted curve is plotted,
and FALSE
if multiple curves are plotted.
B
Number of simulations controlling accuracy of confidence
intervals, as used in summary
. Decrease
for greater speed at the expense of accuracy, or set
B=0
to cl
Width of confidence intervals, by default 0.95 for 95% intervals.
col.obs
Colour of the nonparametric curve.
lty.obs
Line type of the nonparametric curve.
lwd.obs
Line width of the nonparametric curve.
col
Colour of the fitted parametric curve(s).
lty
Line type of the fitted parametric curve(s).
lwd
Line width of the fitted parametric curve(s).
col.ci
Colour of the fitted confidence limits, defaulting to the same
as for the fitted curve.
lty.ci
Line type of the fitted confidence limits.
lwd.ci
Line width of the fitted confidence limits.
ylim
y-axis limits: vector of two elements.
add
If TRUE
, add lines to an existing plot,
otherwise new axes are drawn.
...
Other options to be passed to
plot.survfit
or muhaz
, for
example, to control the smoothness of the nonparametric hazard
estimates. Th