I am reading more about flexible parametric survival models and their implementation in the
flexsurvspline function in the
flexsurv package in R (there also seems to be a very similar command in Stata - stpm2)
I have a Cox model with several predictors that violate proportional hazards. I have tried transformations, time interactions and splitting time to generate time-dependent coefficients, without much luck for remedying the proportionality of the hazards.
If I use a model such as:
mod <- flexsurvspline(Surv(time, event) ~ x1 + x2 + x3 + x4, anc = list(gamma1 = ~ x1 + x2), data = dat, scale = "hazard")
am I correct in my understanding that the model will not force the hazards for x1 and x2 to be proportional (thus creating a time-varying HR for those two predictors)? This would also be a reasonable incidental way then to circumvent the problem of non-proportional hazards, right?