Plot.surv.int.multiyears | R Documentation |
A function that returns a plot for Cumulative Survival by Interval supporting multiple selected years.
Plot.surv.int.multiyears(plotdata, fit, nJP, yearvar,
obscumvar = "Relative_Survival_Cum",
predcumvar = "Predicted_Survival_Cum",
interval = "Interval", year.select = NULL)
plotdata |
Either of the following data set would work. 1) the graph data returned by function download.data with downloadtype="graph" and all intervals needed for int.col. 2) the full data returned by function download.data with downloadtype="full". |
fit |
The joinpoint object containing the model output. |
nJP |
The number of joinpoints in the model. |
yearvar |
The variable name for year of diagnosis used in argument 'year' of the function joinpoint. |
obscumvar |
The variable name for observed relative cumulative survival. The default is "Relative_Survival_Cum" for relative survival data. For cause-specific data, it needs to be changed accordingly. |
predcumvar |
The variable name for predicted cumulative survival. The default is "Predicted_Survival_Cum". |
interval |
The variable name for year since diagnosis. The default is 'Interval'. |
year.select |
The year values selected for the plot. The default is NULL. |
An object of class ggplot
containing the plot.
Fanni Zhang <zhangf@imsweb.com>
download.data
,Plot.dying.year.annotate
,
Plot.surv.year.annotate
.
data("breast.example", package="JPSurv")
data("fit3", package="JPSurv")
yearvar<-"Year_of_diagnosis_1975"
obscumvar<-"Relative_Survival_Cum"
predcumvar<-"Predicted_Survival_Cum"
interval<-"Interval"
nJP<-2
data.full<-download.data(breast.example,fit3,nJP,yearvar,"full",
subsetStr3,interval="Interval")
plot<-Plot.surv.int.multiyears(data.full,fit3,nJP,yearvar,obscumvar,
predcumvar,interval,year.select=c(1985,1990))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.