Hi SAS experts,
I'm trying to do an interrupted time series (ITS) analysis to compare before and after certain intervention.
(Ref. https://academic.oup.com/ije/article/46/1/348/2622842)
From the reference, here are the steps I went through so far.
1.I prepared the dataset with variables (1) outcome (2) t_before [serial count 1,2,3...] (3) intervention [0 or 1] (4) t_after [0,0,0,...intervention... , 1, 2, 3...]
2. Then I used PROC ARIMA identify to check for the stationarity as follows:
proc arima data=sample;
identify var=outcome stationarity=(adf);
run;
since the result showed that 'outcome' is nonstationary, I used first-order difference as follows and the test showed stationary:
proc arima data=sample;
identify var=outcome(1) stationarity=(adf);
run;
3. and from the ACF, PACF plots from above, I thought AR(5) model would fit, so I tried final diagnosis as:
proc arima data=sample;
identify var=outcome(1) ;
run;
estimate p=5;
run;
and the result seemed reasonable.
So, here is my question.
0. the ITS equation I want to use is : outcome = t_before(b1 -> previous trend) intervention(b2 -> level change) t_after(b3 -> trend change) , under ARIMA (5, 1, 0) model
1. if so, how can I put this equation into PROC ARIMA to get the coefficients of b1, b2, and b3?
some references seem to use PROC MODEL, or PROC AUTOREG, but I don't think those cases consider the ARIMA (because those programs have no coded lines such as 'p=~~', 'q=~~' or checking ACF, PACF and so on)
2. if I also want to estimate the slope of post trend, which is (b1+b3), how should I code to get the estimation and the p-value for (b1+b3)
I attached the sample dataset.
Thanks for your help in advance