I'm doing a survival analysis using the cox proportional hazard model. I have time dependent covariates so In order to encode time-dependent covariates I used the (start, stop] form of the model described in the following document https://cran.r-project.org/web/packages/survival/vignettes/timedep.pdf. The subjects have different starting (time1) times and stopping times (time2) between 2000 and 2019. My data then looks something like this (but then for around 37000 observations):
I then used the following code to estimate the model and plot the survival curves.
fit <- coxph(Surv(time1, time2, findis) ~ Gearing + PE + crisis + cluster(IDNR), data=mydata) plot <- ggadjustedcurves(fit, variable = mydata$PE)
While the estimation output makes sense with my expectations, my problem is that when I run ggadjustedcurves it just keeps on going forever. If I try to plot the curves using:
I get the graph below which doesn't seem right to me either, it seems like the graph might look better if it didn't start at zero but at 2000? Can someone tell me what I might be doing wrong? I hope I made everything clear this is my first time using this site.