Skip to main content

Posts

Showing posts from October, 2012

Graphing Non-Proportional Hazards in R

Update 30 July 2013: I've moved all of the functionality described in this post into an R package called simPH . Have a look. It is much easier to use. Update 30 December 2012: I updated the code HERE so that it keeps only the middle 95 percent of the simulated values. I really like this article by Amanda Licht in Political Analysis. It gives a lot of information on how to interpret nonproportional hazards and includes some nice graphs. Her source code is really helpful for learning the nuts and bolts of how to simulate quantities of interests over time. However, it's in Stata code, which doesn't really fit into my R-based workflow at the moment. So I decided to port the code over. This post gives an example of what I did. What is a non-proportional hazard & why use them? Here is my motivation for being interested in non-proportional hazards: In a few papers I used Cox Proportional Hazard (PH) models to examine countries' policy adoption dec