简体   繁体   中英

Is there a way in R to plot a survival curve by year?

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM