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

Interrupted time series of 48 months: a level drop with no change of slope, Newey-West errors

ToolDifference-in-Differences and ITS
Sourceoriginal
LevelGraduate

Problem

Calls per month are recorded for 48 months; a new policy applies from month 25. Fit the segmented regression with a level change and a slope change, with Newey-West standard errors, and examine the residual autocorrelation.

Inputs to Enter

  • Rows: 48 seeded illustrative rows of month, outcome; intervention time 25
  • Change model: level and slope; Newey-West lag blank (rule: whole part of 4 × (48/100)^(2/9) = 3); no seasonal terms; confidence level 95 %
Open the Difference-in-Differences and ITS tool

Answers

  • Level at month 25 without the change 256.02; slope before 0.502 per month (Newey-West SE 0.138)
  • Level change −29.23 (SE 3.075, classical 3.348), interval −35.43 to −23.03, p < 0.0001
  • Slope change +0.268 per month (SE 0.264), interval −0.264 to 0.800, p = 0.3151
  • Change at month 48 = −29.23 + 0.2681 × (48 − 25) = −23.06 (interval −34.23 to −11.89); average over the 24 months after: −26.15, which is −10.0 % of the continued trend (261.79)
  • Joint test of both changes: F(2, 44) = 50.45; Durbin-Watson 1.335, lag-1 autocorrelation 0.312, Ljung-Box Q(12) = 24.60 (p = 0.0168)

Notes

Open this case in the tool: /analysis-tools/statistics/regression/difference-in-differences/?try=level-drop. The residuals are positively autocorrelated (the series was generated with it), which is the situation Newey-West errors are for. 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