The basic propensity score matching procedure works with cross-section data (ie collected at a certain point in time). The popular psmatch2 command uses a dummy variable indicating that an observations belongs to either the treatment or control group.

However, in my dataset this indicator-function is time-varying. The data looks as follows: I identify individuals and track them over a period of 12 years. At some point during this time period, individuals may get treated, so they "transfer from control to treatment group". Note that this can occur at any moment in time (sic!) for each individual.

Above that, my subsequent analysis would be time-dependent: From the moment the individuals are being treated, I want to estimate the ATT but only for the following year (sic!). Thus, I do not care anymore about the treated individuals 1 year after their treatment started.

psmatch2 seems to be very restrictive when it comes to that. Do you see any possibility on how to do that? Maybe there are also Matching Methods that allow me to do that.

P.S.: There is one similar question here in the forum, however it did not help me to solve this problem.

  • 1
    $\begingroup$ Many "weights" that are used for analyses use very similar methods, and have very similar justifications. However, it's important to refer to them correctly. To my knowledge, propensity scores are not used to account for time-varying treatments. I believe you are thinking of marginal structural models. $\endgroup$
    – AdamO
    Sep 29, 2014 at 19:06
  • $\begingroup$ Thank you for this hint, I was not aware of this model. They seem to be very popular in the epidemiology and medecine literature, however not in economics / social sciences which is my background. $\endgroup$
    – Jhonny
    Sep 29, 2014 at 20:33
  • $\begingroup$ I asked a similar question some weeks ago: stats.stackexchange.com/questions/113670/… $\endgroup$ Sep 29, 2014 at 20:37

2 Answers 2


Maybe the following paper is relevant for your case: Lu B. Propensity Score Matching with Time-Dependent Covariates. Biometrics 2005; 61, 721–728.

In the situation considered in the paper, subjects may start treatment at any point during an observation period. An individuals who becomes exposed at time $t$ is matched to several controls selected from the corresponding risk-set, i.e. from all subjects who are still at risk of becoming exposed at time $t$.

Matching is with respect to a time-dependent propensity score, defined as the hazard of becoming exposed at time $t$ computed from a Cox proportional hazards model: $$h(t)=h_0(t)\exp(\beta'x(t))$$ where $x(t)$ is a vector of potentially time-varying predictors of treatment status. In each risk-set, matching is actually perfomed on the linear predictor scale according to the metric $$d(x_i(t),x_j(t))=\left(\hat\beta'x_i(t)-\hat\beta'x_j(t)\right)^2.$$


Stata 13 has a multivalued treatment effects estimator. It might be possible to reframe your problem as multivalued treatment one, where treatment is indexed by time (treated in year 1, treated in year 2,..., treated in year 12) rather than binary. The outcome will be measured in the year after treatment.

  • $\begingroup$ In my setup, treatment can occur any day during the 12 years which makes this solution not practical (dataset includes more than a million observations). Above that, the treatment individuals receive is identical (though it occurs at different points in time) - which is not considered from my understanding of the proposed estimator. $\endgroup$
    – Jhonny
    Sep 29, 2014 at 20:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.