Home  >>  Archives  >>  Volume 16 Number 4  >>  st0458

The Stata Journal
Volume 16 Number 4: pp. 867-879



Subscribe to the Stata Journal
cover

Estimating survival functions after stcox with time-varying coefficients

Constantin Ruhe
Zukunftskolleg and Department of Politics and Public Administration
University of Konstanz
Konstanz, Germany
[email protected]
Abstract.  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 in stcox, it does not allow the typical visualizations using stcurve if stcox was estimated with the tvc() option. In this article, I provide a short workaround that estimates the survival function after stcox with timedependent coefficients. I introduce and describe the scurve_tvc command, which automates this procedure and allows users to easily visualize survival functions for models with time-varying effects.
Terms of use     View this article (PDF)

View all articles by this author: Constantin Ruhe

View all articles with these keywords: scurve_tvc, stcox, tvc() option, stcurve, sts generate, Cox model, proportional hazards, time-varying coefficients, survival function

Download citation: BibTeX  RIS

Download citation and abstract: BibTeX  RIS