download.data {JPSurv} | R Documentation |
Combine inputs and outputs
Description
A function that returns a merged data set including the selected cohort input data and the accompanying data for plot.surv.year/plot.dying.year for the download feature in the JPSurv web app.
Usage
download.data(input, fit, nJP, yearvar, downloadtype, subset = NULL,
interval = "Interval", int.select = NULL)
Arguments
input |
The input dataset read in by function joinpoint.seerdata. |
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. |
downloadtype |
Either "graph" for graph data or "full" for full data. |
subset |
An optional string specifying a subset of observations used in the fitting process. |
interval |
The variable name for year since diagnosis. The default is 'Interval'. |
int.select |
The interval values selected for the plot if the downloadtype="graph". The default is NULL. |
Value
A data frame containing the selected cohort input data and the below predicted columns.
Predicted_Survival_Int |
The predicted interval survival. |
Predicted_ProbDeath_Int |
The predicted probability of Dying of Cancer. |
Predicted_Survival_Cum |
The predicted cumulative survival. |
Predicted_Survival_Int_SE |
The standard error of the predicted interval survival. |
Predicted_Survival_Cum_SE |
The standard error of the predicted probability of Dying of Cancer. |
Predicted_ProbDeath_Int_SE |
The standard error of the predicted cumulative survival. |
Author(s)
Fanni Zhang <zhangf@imsweb.com>
References
The JPSurv web app https://analysistools.nci.nih.gov/jpsurv/.
See Also
Plot.dying.year.annotate
, Plot.surv.year.annotate
, Plot.surv.int.multiyears
.
Examples
data("breast.example", package="JPSurv")
data("fit1", package="JPSurv")
nJP<-2
data.graph135<-download.data(breast.example,fit1,nJP,"Year_of_diagnosis_1975","graph",
subsetStr1,interval="Interval",int.select=c(1,3,5))
data.full<-download.data(breast.example,fit1,nJP,"Year_of_diagnosis_1975","full",subsetStr1)