Usage
## S3 method for class 'survfit':
autoplot(object, ..., xLab = "Time", yLab = "Survival",
title = "Marks show times with censoring", titleSize = 15,
axisTitleSize = 15, axisLabSize = 10, survLineSize = 0.5,
type = c("single", "CI", "fill"), palette = c("Dark2", "Set2", "Accent",
"Paired", "Pastel1", "Pastel2", "Set1", "Set3"), jitter = c("none",
"noEvents", "all"), censShape = 3, censSize = 5, legend = TRUE,
legLabs = NULL, legTitle = "Strata", legTitleSize = 10,
legLabSize = 10, alpha = 0.05, CIline = 10, fillLineSize = 0.05,
pVal = FALSE, sigP = 1, pX = 0.1, pY = 0.1, timeTicks = c("major",
"minor"), tabTitle = "Number at risk by time", tabTitleSize = 15,
tabLabSize = 5, nRiskSize = 5)
Arguments
object
An object of class survfit
...
Additional arguments (not implemented)
xLab
Label for $x$ axis on survival plot
yLab
Label for $y$ axis on survival plot
title
Title for survival plot
titleSize
Title size for survival plot
axisTitleSize
Title size for axes
axisLabSize
Title size for label axes
survLineSize
Survival line size
type
Type of plot. The default, type="single"
, plots single lines.
- If
type="CI"
will add lines indicating
confidence intervals (taken fromupper
andlower
values ofsurvfit
object).
Highe
palette
Options are taken from
http://colorbrewer2.org/{color_brewer}.
palette="Dark2"
(the default) is recommended forsingle
orCI
plots.palette="Set2"
is recommended forfill
jitter
By default, jitter="none"
.
- If
jitter="noEvents"
, adds some random, positive noise
to survival lines with no events (i.e. all observations censored).
This will bring them just above 1 on the y-axis, making them easier to se
legend
If legend=FALSE
, no legends will be produced
for the plot or table
legLabs
These can be used to replace the names
of the strata from the fit. Should be given in the same
order as those strata
legTitleSize
Title size for legend
legLabSize
Legend labels width and height
alpha
Alpha, transparency of lines indicating confidence intervals
or filled rectangles. Should be in range $0-1$.
Larger values e.g. alpha=0.7
are recommended for confidence
intervals
censShape
Shape of marks to indicate censored onservations.
Default is 3
which gives vertical ticks.
Use censShape=10
for circular marks.
censSize
Size of marks to indicate censored onservations
CIline
Confidence interval line type
fillLineSize
Line size surrouding filled boxes
pVal
If pVal=TRUE
, adds $p$ value from
log-rank test to plot
sigP
No. of significant digits to display in $p$ value.
Typically $1$ to $3$.
pX
Location of $p$ value on $x$ axis.
Should be in the range of $0 - 1$,
where value is to be placed relative to the maximum observed
time.
E.g. pX = 0.5
will place it half-way along $x$-axis
pY
Location of $p$ value on $y$ axis.
Should be in the range of $0 - 1$, as above
timeTicks
Numbers to mark on the survival plot and table.
- If
timeTicks="major"
(the default)
only the major$x$-axis (time) marks from the
survival plot are are labelled on the plot and table. - If
timeTicks="minor"
tabTitleSize
Table title text size
tabLabSize
Table legend text size
nRiskSize
Number at risk - text size