Home > Software design >  Is there a way in R to plot a survival curve by year?
Is there a way in R to plot a survival curve by year?

Time:07-08

good morning. I am thinking is it possible to extract data and draw several survival curves by years in the R? For example, is it possible to plot a survival curve which represents each year from a single spreadsheet file? Many thanks in advance for helping me with this.

CodePudding user response:

Yes, take a look at this link: https://cran.r-project.org/web/packages/survminer/vignettes/Informative_Survival_Plots.html

Basically, you'll want to create a regression equation where year is one of the independent variables, then when you plot you will get multiple series, one for each year.

  • Related