Question Details

No question body available.

Tags

r ggplot2 survival-analysis recurring-events ggsurvfit

Answers (1)

August 1, 2025 Score: 1 Rep: 696 Quality: Low Completeness: 80%

To answer this: the data is currently not formatted correctly for recurrent event analysis via the survival package (see section 2.2). It is also not clear that this data has recurrent events (id = 8 only has an event at time = 2; id = 18 only has an event at time = 3, and so on).

Below is an example on modified data. The risk table bow shows the number of subjects at risk rather than number of observations.

library(survival)
library(ggsurvfit)
#> Loading required package: ggplot2

d1