Add fitted survival (or hazard or cumulative hazard) curves from a
flexsurvreg
model fit to an existing plot.
# S3 method for flexsurvreg
lines(x, newdata = NULL, X = NULL,
type = "survival", t = NULL, est = TRUE, ci = NULL, B = 1000,
cl = 0.95, col = "red", lty = 1, lwd = 2, col.ci = NULL,
lty.ci = 2, lwd.ci = 1, ...)
Output from flexsurvreg
, representing a fitted
survival model object.
Covariate values to produce fitted curves for, as a data
frame, as described in plot.flexsurvreg
.
Covariate values to produce fitted curves for, as a matrix, as
described in plot.flexsurvreg
.
"survival"
for survival, "cumhaz"
for cumulative
hazard, or "hazard"
for hazard, as in
plot.flexsurvreg
.
Vector of times to plot fitted values for.
Plot fitted curves (TRUE
or FALSE
.)
Plot confidence intervals for fitted curves.
Number of simulations controlling accuracy of confidence
intervals, as used in summary
.
Width of confidence intervals, by default 0.95 for 95% intervals.
Colour of the fitted curve(s).
Line type of the fitted curve(s).
Line width of the fitted curve(s).
Colour of the confidence limits, defaulting to the same as for the fitted curve.
Line type of the confidence limits.
Line width of the confidence limits, defaulting to the same as for the fitted curve.
Equivalent to plot.flexsurvreg(...,add=TRUE)
.