Generate a Survival Report with Kaplan-Meier Estimates
survReport(
formula,
data = NULL,
subset = NULL,
na.action = na.retain,
ylab = NULL,
what = c("S", "1-S"),
conf = c("diffbands", "bands", "bars", "none"),
cause = NULL,
panel = "surv",
subpanel = NULL,
head = NULL,
tail = NULL,
h = 3,
w = 4.5,
multi = FALSE,
markevent = TRUE,
mfrow = NULL,
y.n.risk = 0,
mylim = NULL,
bot = 2,
aehaz = TRUE,
times = NULL,
append = FALSE,
opts = NULL,
...
)
a formula with survival (Surv
) objects on the left hand side and an optional stratification factor on the right (or 1
if none). The survival object component variables should be labeled; these labels are used for graph annotation. If any of the Surv
objects are competing risk objects (see Surv
), event labels come from the factor levels in the variable that was the second argument to Surv
, and the first factor level must correspond to right-censored observations.
data.frame
optional subsetting criteria
function for handling NA
s while creating a data frame
character. Passed to survplot.npsurv
as the ylab
argument. Constructed by default.
"S"
(the default) to plot survival functions or "1-S"
to plot cumulative incidence functions. If any of the survival time objects on the left hand side are competing risk objects, the default is "1-S"
and you may not change it.
character. See survplot.npsurv
.
character vector or list. If a vector, every Surv
term on the left hand side of formula
will have cumulative incidence plotted for all causes that appear in cause
. If a list, the list elements must correspond to the Surv
terms in order, and specify which causes to display from the corresponding Surv
object. When cause
is a list and one of its elements contains more than one character string, or when cause
is a vector and for one Surv
object it matches multiple causes, survReport
produces more plots than there are Surv
objects.
character string. Name of panel, which goes into file base names and figure labels for cross-referencing.
character string. If calling dReport
more than once for the same type of chart (categorical or continuous), specify subpanel
to distinguish the multiple calls. In that case, -subpanel
will be appended to panel
when creating figure labels and cross-references.
character string. Specifies initial text in the figure caption, otherwise a default is used.
optional character string. Specifies final text in the figure caption, e.g., what might have been put in a footnote in an ordinary text page. This appears just before any needles.
numeric. Height of plots.
numeric. Width of plots in inches.
logical. If TRUE
, multiple figures are produced, otherwise a single figure with a matrix of survival plots is made.
logical. Applies only if multi=TRUE
. Specify FALSE
to not put the event label in the extreme upper left of the plot.
numeric 2-vector, used if multi=FALSE
. If not specified, default plot matrix layout will be figured.
used if what="1-S"
, to specify y
coordinate for putting numbers at risk, typically below the x
-axis label
numeric 2-vector. Used to force expansion of computed y-axis limits. See survplot
.
number of spaces to reserve at bottom of plot for numbers at risk, if what="1-S"
logical. Set to FALSE
to not print number of events and hazard rate on plots.
numeric vector. If specified, prints cumulative incidence probabilities at those times on the plots.
logical. If TRUE
output will be appended instead of overwritten.
list. A list specifying arguments to survReport
and startPlot
that override any other arguments. This is useful when making a long series of survReport
calls with the same options, as the options can be defined up front in a list.
ignored