jp.plot.surv | R Documentation |
Plot of conditional survival versus interval
jp.plot.surv(fit.uncond, fit.cond, start.interval=NULL, end.interval=NULL,
year.col="Year", interval.col="Interval",
relSurvInt.col="Relative_Survival_Interval", addToYear=0,
ylim=NULL, yearsToPlot=NULL, legend.pos="bottom")
fit.uncond |
Object returned from |
fit.cond |
Object returned from |
start.interval |
NULL or the starting interval. If NULL, then the smallest starting interval will be chosen. |
end.interval |
NULL or the ending interval. If NULL, then the largest interval will be chosen. |
year.col |
The name of the year at diagnosis column in |
interval.col |
The name of the interval column in |
relSurvInt.col |
The name of the relative survival interval column in |
addToYear |
Integer to add to the year at diagnosis column to give the correct years at diagnosis for displaying. The default is 0. |
ylim |
NULL or the y-axis limits of the plot. If NULL, then the limits will be determined from the data. |
yearsToPlot |
NULL or the years at diagnosis to display in the plot. If NULL, then no more than five years will be selected for the plot. |
legend.pos |
Character string to give the legend position in the plot. The default is "bottom". |
The lines on the plot use the pred_cum
column in fit.cond
,
while the points are from the relSurvInt.col
column.
NULL
joinpoint
, joinpoint.conditional
#Load the provided SEER 18 breast cancer example data.
data("breast.example", package="JPSurv")
# Subset of observations to use
subset <- "Age_groups == '00-49' & Breast_stage == 'Localized'"
# Fit the unconditional survival join point model
fit <- joinpoint(breast.example, subset,
year="Year_of_diagnosis_1975",
model.form=NULL, maxnum.jp=0)
# Compute conditional survival S(10 | 5) = P(T>10 | T>5)
ret <- joinpoint.conditional(fit, 5, 10)
jp.plot.surv(fit, ret, year.col="Year_of_diagnosis_1975")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.