Home  /  Products  /  Stata 14  /  Treatment effects for survival data

Treatment effects for survival data were introduced in Stata 14.

See the latest version of treatment effects for survival data. See all of Stata's treatment effects features.

See the new features in Stata 18.

Treatment effects for survival data

Treatment effects for survival data


Highlights

  • Exponential, logistic, Weibull, and lognormal survival distributions
  • Right-censoring
  • 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)
  • ATEs on the treated (ATET)
  • Potential-outcome means (POMs)
  • Integrated with st
  • Balance diagnostics
  • Overlap diagnostics

What's this about?

Treatment-effects estimators extract experimental-style causal effects from observational data. Stata's treatment-effects estimators now support parametric survival-time models.

You specify two sets of variables with treatment-effects estimators. One models treatment assignment. The other models outcome. You specify one, the other, or both.

This simple description is slightly complicated by censoring in the case of survival analysis. Some estimation methods require an additional censoring model.

By combining the survival analysis and treatment-effects frameworks, we can answer questions such as these:

    1. Does continued smoking decrease time to a second heart attack in a population of women aged 45–55 who have had one heart attack?

    2. Does receiving an online course on driving safety reduce the time between traffic violations for people who received a ticket?

Let's see it work

Let's consider continued smoking and time to second heart attack. We have (fictional) data, which we have already stset. stset is Stata's way of registering the survival aspects of your data.

We will assume the following models:

  • Treatment (smoking) is determined by age, exercise, and education.

  • Outcome (time to second heart attack) is Weibull and determined by age, exercise, quality of diet, and education.

  • Censoring, if we need to specify it, is determined by the same distribution and variables as Outcome.

Here's how we estimate the treatment effect based solely on outcome:

. stteffects ra (age exercise diet education)      /* outcome */
                  (smoke)                          /* whether treated */ 

Survival treatment-effects estimation           Number of obs     =      2,000
Estimator      : regression adjustment
Outcome model  : Weibull
Treatment model: none
Censoring model: none
Robust
_t Coef. Std. Err. z P>|z| [95% Conf. Interval]
ATE
smoke
(Smoker
vs
Nonsmoker) -1.956657 .3331787 -5.87 0.000 -2.609676 -1.303639
POmean
smoke
Nonsmoker 4.243974 .2620538 16.20 0.000 3.730358 4.75759

We find the average treatment effect of smoking is to hasten the time to second heart attack by 1.96 years.

Here's how we estimate the treatment effect based solely on treatment. When we specify solely the treatment model, we must also specify the censoring model:

. stteffects ipw (smoke age exercise diet education)      /* treatment */
                    (age exercise diet education)         /* censoring */

Survival treatment-effects estimation           Number of obs     =      2,000
Estimator      : inverse-probability weights
Outcome model  : weighted mean
Treatment model: logit
Censoring model: Weibull
Robust
_t Coef. Std. Err. z P>|z| [95% Conf. Interval]
ATE
smoke
(Smoker
vs
Nonsmoker) -2.187297 .6319837 -3.46 0.001 -3.425962 -.9486314
POmean
smoke
Nonsmoker 4.225331 .517501 8.16 0.000 3.211047 5.239614

We find that the ATE is now -2.19 years (treatment) rather than -1.96 years (outcome). All these results are within roughly a standard error. They are in agreement.

What would have happened had we specified the censoring models, too, by typing,

. stteffects ipwra (age exercise diet education)        /* outcome */
                  (smoke age exercise education)        /* treatment */
                  (age exercise diet education)         /* censoring */

         failure _d:  fail
   analysis time _t:  atime

Iteration 0:   EE criterion =  1.217e-17
Iteration 1:   EE criterion =  2.459e-30

Survival treatment-effects estimation           Number of obs     =      2,000
Estimator      : IPW regression adjustment
Outcome model  : Weibull
Treatment model: logit
Censoring model: Weibull
Robust
_t Coef. Std. Err. z P>|z| [95% Conf. Interval]
ATE
smoke
(Smoker
vs
Nonsmoker) -2.285057 .7318456 -3.12 0.002 -3.719448 -.8506656
POmean
smoke
Nonsmoker 4.385841 .6427521 6.82 0.000 3.12607 5.645612

stteffects ipwra with three models is a different estimator, and thus infinite samples produce different results. Here we estimate the ATE to be -2.29 instead of -1.96 (the outcome only estimates) or -2.19 (the treatment only estimates).

Tell me more

Stata Treatment-Effects Reference Manual has an extended discussion of treatment effects for survival data, and several other examples are shown; see [TE] stteffects.

Read the overview from the Stata News.

Upgrade now Order Stata