jp.plot.cond.year: Plot of conditional survival versus year at diagnosis

View source: R/source_plot.R

jp.plot.cond.yearR Documentation

Plot of conditional survival versus year at diagnosis

Description

Plot of conditional survival versus year at diagnosis

Usage

jp.plot.cond.year(fit.cond, start.interval=NULL, end.interval=NULL,
                 year.col="Year", interval.col="Interval", 
                 relSurvInt.col="Relative_Survival_Interval", addToYear=0,
                 ylim=NULL)

Arguments

fit.cond

Object returned from joinpoint.conditional.

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 fit.cond. The default is "Year".

interval.col

The name of the interval column in fit.cond. The default is "Interval".

relSurvInt.col

The name of the relative survival interval column in fit.cond. The default is "Relative_Survival_Interval".

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.

Details

The lines on the plot use the pred_cum column in fit.cond, while the points are from the relSurvInt.col column.

Value

NULL

See Also

joinpoint, joinpoint.conditional

Examples

#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.cond.year(ret, year.col="Year_of_diagnosis_1975")

JPSurv documentation built on June 8, 2025, 12:11 p.m.