0

I'm looking to work out the difference in effect (time to surgery) between two patient populations (exposed and unexposed groups) and compare between two countries (i.e. difference in differences).

i appreciate it may be confusing to understand, so here is a basic equation.

time difference between groups between countries = (country1 exposed - country 1 nonexposed) - (country 2 exposed - country 2 nonexposed)

any advice on model, approach, or stata commands would be hugely appreciated. ive been researching this for days and have not had any luck. while some methods allow me to work out the difference, they dont allow any hypothesis testing/provide p-values

i have tried didregress command however surprisingly this only works if you have missing/non-existing data for your outcome of interest prior to the date of the "intervention"

thank you for your time

MFA
  • 1
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Sep 12 '23 at 10:05

1 Answers1

4

Start by reading more on what a DID is trying to accomplish What is difference-in-differences?

  1. Check to see if the parallel trends assumption is credible by comparing the trend of the treatment and control groups in the pre-treatment period; DID relies on the parallel trends assumption, which has us assume that post-treatment, in the absence of treatment, the treated group's trend would have been parallel to the trend of the control group
  2. Start by running the bare bones regression and cluster your standard errors by the individual panel identifier $$Y_{it}=\beta_1+\beta_2(treat_i)+\beta_3(time_t)+\rho(treat_i*time_t)+\epsilon_{it}$$
  3. Consider augmenting the regression in step 2 by controlling for individual level characteristics. Doing so can reduce the variance of the residuals and hence improve precision of the estimated causal effect.
  4. Consider augmenting the regression in step 2 by controlling for possible time-varying confounders. Doing so can reduce the omitted variable bias.