Kaplan-Meier plots are the most popular graphical displays of time-to-event (survival) data, because they give an intuitive and concise overview of survival over time.
In this tutorial we run through a short example using the survminer package to obtain a well annotated Kaplan-Meier plot, which includes:
- a legend with proper group labels
- the log rank test p-value for testing differences in survival between the treatment groups
- the at-risk table indicating the number of patients in each group at different time points.
Check below the video for an easy option to
download this R code, which will save you a lot of time!