Tools › Statistics › Regression and Modeling › Difference-in-Differences and ITS › Example

Interrupted time series: no jump at the intervention, the trend bends

ToolDifference-in-Differences and ITS
Sourceoriginal
LevelUndergraduate

Problem

Claims per month rise by about 1 a month for 24 months. From month 25 a new rule applies; there is no visible jump, but the series starts to fall. Fit the segmented regression and state the level change, the slope change and the change at month 48.

Inputs to Enter

  • Rows: 48 seeded illustrative rows of month, outcome; intervention time 25
  • Change model: level and slope; Newey-West lag 3 by the rule; confidence level 95 %
Open the Difference-in-Differences and ITS tool

Answers

  • Slope before 0.945 per month (SE 0.104); level at month 25 without the change 172.82
  • Level change −0.08 (SE 2.374), interval −4.86 to 4.71, p = 0.9747
  • Slope change −2.151 per month (SE 0.157), interval −2.468 to −1.834, p < 0.0001
  • Change at month 48 = −0.0757 − 2.151 × 23 = −49.54 (interval −57.60 to −41.48); average over the 24 months after: −24.81, which is −13.5 % of the continued trend (183.68)
  • Durbin-Watson 2.008, lag-1 autocorrelation −0.009, Ljung-Box Q(12) = 6.17 (p = 0.9075)

Notes

Open this case in the tool: /analysis-tools/statistics/regression/difference-in-differences/?try=gradual-change. A before-and-after comparison of means would mix the rising trend with the change; the segmented regression separates them. Seeded illustrative data, no real program, place or person; every figure is checked against an independent numpy and scipy computation. The estimate is a statistical association under the stated assumption, not a finding of cause.

More Examples for This Tool