library(survival)
library(reshape2)
library(ggplot2)
##Import the internal data of the R package
bc<-Breastcancer
##Categorical variables converted to factors
bc$histgrad<-as.factor(bc$histgrad)
bc$er<-as.factor(bc$er)
bc$pr<-as.factor(bc$pr)
bc$ln_yesno<-as.factor(bc$ln_yesno)
##Generate Survival Analysis Model
f1<-coxph(Surv(time,status)~er+histgrad+pr+age+ln_yesno,bc)
##Draw decision curve
scidca(f1)
scidca(f1,threshold.line = TRUE,threshold.text = TRUE)
Run the code above in your browser using DataLab