Hi,
I am exploring the options for the -arima- command for an interrupted time series and noticed that different results are obtained depending on whether the differencing is done manually or within the -arima- command.
Using the sample data: "http://www.stata-press.com/data/r16/wpi1.dta", the two simple models below produce identical results:
* Model 1 - Differencing within arima
arima wpi, arima(1,1,4)
* Model 2 - Use already differenced variable in the model and set i = 0
generate d1_wpi = d1.wpi
arima d1_wpi, arima(1,0,4)
However, when I include a variable in the model to represent the introduction of an policy (for an interrupted time series) the two approaches estimate different coefficients for policy:
*** Create a policy variable - 1 from 1981 and 0 before then
g year = yofd(dofq(t))
g policy = 0
recode policy (0=1) if year>=1981
*Model 1
arima wpi policy, arima(1,1,4) // coefficient = 0.88 (p = 0.64)
*Model 2
arima d1_wpi policy, arima(1,0,4) //coefficient = 0.08 (p = 0.88)
Can anyone suggest why the models differ and how I should proceed?
I am exploring the options for the -arima- command for an interrupted time series and noticed that different results are obtained depending on whether the differencing is done manually or within the -arima- command.
Using the sample data: "http://www.stata-press.com/data/r16/wpi1.dta", the two simple models below produce identical results:
* Model 1 - Differencing within arima
arima wpi, arima(1,1,4)
* Model 2 - Use already differenced variable in the model and set i = 0
generate d1_wpi = d1.wpi
arima d1_wpi, arima(1,0,4)
However, when I include a variable in the model to represent the introduction of an policy (for an interrupted time series) the two approaches estimate different coefficients for policy:
*** Create a policy variable - 1 from 1981 and 0 before then
g year = yofd(dofq(t))
g policy = 0
recode policy (0=1) if year>=1981
*Model 1
arima wpi policy, arima(1,1,4) // coefficient = 0.88 (p = 0.64)
*Model 2
arima d1_wpi policy, arima(1,0,4) //coefficient = 0.08 (p = 0.88)
Can anyone suggest why the models differ and how I should proceed?
Comment