Importing and setting up data

Conceptions to under-18s were extracted from the dataset and coded into three datasets:

EngData - England only

EngScotContro data setup - Eng v Scotland as control

EngWalContro data setup - Eng vs Wales as control

Initial exploratory models of England-only data

I first constructed a model with a single intervention at 1999 to test England data:

EngMod <- lm(Value ~ Time + Cat1 + Trend1, data = EngData)
summary(EngMod)$coefficients
##              Estimate Std. Error   t value     Pr(>|t|)
## (Intercept) 40.800000  2.4243796 16.829047 1.147315e-13
## Time         0.750000  0.5421078  1.383489 1.810468e-01
## Cat1         4.016667  2.4104749  1.666338 1.104935e-01
## Trend1      -2.295614  0.5575524 -4.117306 4.908456e-04

A visual inspection of the model and a test for autocorrelation raise concerns about this model:

## [1] "Durbin Watson Test"
##  lag Autocorrelation D-W Statistic p-value
##    1      0.77051355     0.3725459   0.000
##    2      0.50992122     0.8417204   0.002
##    3      0.17667011     1.4588131   0.236
##    4     -0.02768092     1.8009124   0.970
##    5     -0.25166863     2.2352735   0.208
##    6     -0.42708533     2.5828226   0.018
##    7     -0.56415048     2.8136162   0.000
##    8     -0.56958102     2.6501264   0.000
##    9     -0.43563602     2.1664036   0.018
##   10     -0.25030550     1.5869374   0.256
##   11     -0.09536613     1.2216464   0.760
##   12      0.01388605     0.9759968   0.812
##   13      0.07924590     0.8377393   0.768
##   14      0.12616731     0.7167512   0.682
##   15      0.14731591     0.6190418   0.612
##  Alternative hypothesis: rho[lag] != 0

Adding second intervention to England model

A second intervention at 2007 makes a better-fit model. This corresponds with a reevaluation and adaptation of the model after 2005 or potentially a phase-in period:

## [1] "Durbin Watson Test"
##  lag Autocorrelation D-W Statistic p-value
##    1      0.18335719     1.4090132   0.004
##    2     -0.21037978     2.1848548   0.954
##    3     -0.40649345     2.4644492   0.244
##    4     -0.18427433     1.6585720   0.766
##    5     -0.18777350     1.5415165   0.874
##    6      0.05529295     1.0427883   0.250
##    7      0.13015466     0.8708738   0.162
##    8      0.07780085     0.9297698   0.312
##    9      0.07435073     0.9254829   0.326
##   10      0.05638279     0.9025666   0.380
##   11      0.14285767     0.7206965   0.196
##   12     -0.02674649     1.0574924   0.954
##   13     -0.11503662     1.2260738   0.396
##   14     -0.21481723     1.4232226   0.046
##   15     -0.14384408     1.2723560   0.086
##  Alternative hypothesis: rho[lag] != 0