Difference in difference using spss

I have 2 groups of patients (control and treated) and 1 variable measured at two time moments (before and after treatment). Using paired T test I am able to determine the mean (with 95%CI) difference in each group (at baseline and after treatment). Using split-plot ANOVA I can say that the effect of the treatment is not different between the two groups (from the Test of Between Subjects Effects). But I am not able to determine the difference in difference (mean with 95%CI). I forgot to say that I am using SPSS. Thank you

For difference in differences you can compute the mean of the outcome $Y$ for each group $g =$ {$C$ control, $T$ treated} in each period $t =$ {1 pre-treatment, 2 post-treatment},

$$(E[Y_{igt}|g=T, t=2] - E[Y_{igt}|g=T, t=1]) - (E[Y_{igt}|g=C, t=2] - E[Y_{igt}|g=C, t=1])$$

which you can do by hand with the corresponding if-statements in SPSS. If you need confidence intervals, a convenient way to achieve the same calculation as above is to run the OLS regression

$$Y_{it} = \alpha + \beta_1 \; \text{Treat}_i + \beta_2 \; \text{Post}_t + \beta_3 \; (\text{Treat \cdot Post})_{it} + \epsilon_{it}$$ where $\text{Treat}_i$ equals one for individuals in the treatment group and is zero otherwise, and $\text{Post}_t$ equals one for the post-treatment period and is zero otherwise.

The parameter $\beta_3$ then estimates the difference in differences and the regression will provide you with standard errors, p-values, confidence intervals etc. All you need to do in SPSS is to create the treatment dummy, the second period dummy and their interaction, and then run the described regression.

• Thank you for your answer. I've followed your indications, but I want to know if I've done it correctly. First, since I had my variable of interest in two different columns, I restructured my dataset and also created my pre-post (Post t) dummy variable. Second, I created the interaction variable (between treatment group and pre-post variable). Third, I performed the linear regression with my variable of interest as the dependent variable and the other 3 as independent ones. My question is if the Unstandardized B Coefficient from the output is what I was searching for (the DID)? Thank you again – Dimitrie Jul 8 '14 at 19:08
• The regression coefficient $\beta_3$ will be exactly the difference in differences that you can calculate by hand from the group-time means. So take the mean of the outcome for the treatment group in both periods, take the difference. Then do the same for the control group, and then take the difference between those two differences. That's exactly what your regression coefficient $\beta_3$ will be, just that the regression gives you the confidence interval you wanted. – Andy Jul 8 '14 at 19:21
• I've done it also by hand and yes (not surprisingly) you're right. The same result. Thank you very much. – Dimitrie Jul 8 '14 at 19:30
• Excellent :-) with the standard error/p-value/confidence interval you can now also say whether this difference in differences is statistically significant. – Andy Jul 8 '14 at 19:31