Home  /  Stata News  /  Vol 30 No 1 (2015 quarter 1)  /  Treatment effects for survival models
Stata Release 14: Available now

Treatment effects for survival models

  • Exponential, loglogistic, Weibull, lognormal, survival distributions
  • Right-censoring
  • Integrated with st
  • Methods
    • Inverse-probability weighting (IPW)
    • Survival regression adjustment (RA)
    • Weighted regression adjustment (WRA)
    • Inverse-probability weighted regression adjustment (IPWRA)
  • Multilevel and multivalued treatments
  • Average treatment effect (ATE)
  • Potential-outcome means (POMs)
  • ATE among the treated (ATET)
  • Diagnostics for balancing and overlap

Stata's treatment-effects estimators now support parametric survival-time models.

We want to measure the effect of (continued) smoking on time to second heart attack among women aged 45–55. Not all women, obviously, are observed to have a second heart attack, but we'll assume that many of these women do have second heart attacks (whether observed or not).

We are going to show you three models. In the first, we model time to second heart attack. In the second, we instead model treatment. In the third, we model both. Obviously, results depend on the model being correct.

Before we can start, we must stset our survival data. We type stset atime, failure(fail). Variable atime records the time of second heart attack or censoring, and variable fail records whether the event was a second heart attack.

Here's our first model: Time to second heart attack is modeled as Weibull using age, exercise, quality of diet, and education. We type

. stteffects ra (age exercise diet education) (smoke)

Here's our second model. We model continued smoking (and the censoring mechanism) as being determined by age, exercise, diet, and education. We fit the model by typing

. stteffects ipw (smoke age exercise diet education) 
                 (age exercise diet education)

And in our final model, we assume that both survival time and continued smoking are determined by age, exercise, diet, and education.

. stteffects ipwra (age exercise diet education) 
                   (smoke age exercise education) 
                   (age exercise diet education)

Now, compare results. They are all in agreement!

Upgrade now Order Stata

Read even more about treatment effects for survival data.