Estimating Survival Functions after Stcox with Time-varying Coefficients. (December 2016) - Ruhe, Constantin
In many applications of the Cox model, the proportional-hazards assumption is implausible. In these cases, the solution to nonproportional hazards usually consists of modeling the effect of the variable of interest and its interaction effect with some function of time. Although Stata provides a command to implement this interaction instcox, it does not allow the typical visualizations usingstcurve ifstcox was estimated with thetvc() option. In this article, I provide a short workaround that estimates the survival function afterstcox with time-dependent coefficients. I introduce and describe thescurve_tvc command, which automates this procedure and allows users to easily visualize survival functions for models with time-varying effects.