☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Fluorite | Level 6

## Interrupted time series with proc autoreg

Hi,

After a discussion, I need a little reassurance that my ITS approach for this relatively simplistic model is appropriate. I have observed rates from 1 location over 36 months with an intervention at 24/25 and no control group. Fixed effects so I opted not to use glimmix, however the base model results between the two are identical (if I do not include a random _residual_ or intercept in the mixed model). Below is (1) a base model and (2) an example adjusting for autocorrelation and heteroscedastic variance.

Would appreciate your thoughts,

variables

all_abx_rate = rate

month = 1-36

intervention = 0 or 1

time_aft_int = 1-12 starting at month 25

base:

proc autoreg data=have outest=allabx_param_estmts;

model all_abx_rate = month intervention time_aft_int;

where location=4;

output out=allabx_areg pm=trendhat LCLM=lclm UCLM=uclm p=yhat LCL=lcl UCL=ucl;

run;

proc autoreg data=have outest=allabx_param_estmts;

model all_abx_rate = month intervention time_aft_int /

method=ml nlag=13 backstep dwprob loglikl

garch=(q=1, p=1);​

where location=4;

output out=allabx_areg pm=trendhat LCLM=lclm UCLM=uclm p=yhat LCL=lcl UCL=ucl;

run;

Thank you all!!

1 ACCEPTED SOLUTION

Accepted Solutions
SAS Super FREQ

## Re: Interrupted time series with proc autoreg

Hello,

Overall, it seems OK to me.

Although I generally do not use this effect in ITS (Interrupted Time Series Regression):

time_aft_int = 1-12 starting at month 25

I usually code the intervention variable itself as :

• intervention : always 0 , but a 1-pulse at month 24
• intervention : always 0 , but a constant 1 as from month 24 throughout until end-of-series
• intervention : always 0 , but a 1 for month 24, a 2 for month 25, a 3 for month 26 and so on ... (allows for trend changes)
• other schemas are possible

It all depends on the effect you think your intervention has:

• An outlier having effect only on the moment itself.
• A structural break in level
• A structural break in level and in trend
• A structural break in level, trend and variance
• ...

See also here (PROC MODEL solution) :

Interrupted Time Series Analysis for Single Series and Comparative Designs:
https://www.sas.com/content/dam/SAS/en_ca/User%20Group%20Presentations/Health-User-Groups/ITS_SAS.pd...

See also here (other PROC solutions) :

SAS Global Forum 2020 : Paper 4674-2020
Time After Time: Difference-in-Differences and Interrupted Time Series Models in SAS®
E Margaret Warton, Kaiser Permanente Northern California Division of Research

https://www.sas.com/content/dam/SAS/support/en/sas-global-forum-proceedings/2020/4674-2020.pdf

Cheers,

Koen

2 REPLIES 2
SAS Super FREQ

## Re: Interrupted time series with proc autoreg

Hello,

Overall, it seems OK to me.

Although I generally do not use this effect in ITS (Interrupted Time Series Regression):

time_aft_int = 1-12 starting at month 25

I usually code the intervention variable itself as :

• intervention : always 0 , but a 1-pulse at month 24
• intervention : always 0 , but a constant 1 as from month 24 throughout until end-of-series
• intervention : always 0 , but a 1 for month 24, a 2 for month 25, a 3 for month 26 and so on ... (allows for trend changes)
• other schemas are possible

It all depends on the effect you think your intervention has:

• An outlier having effect only on the moment itself.
• A structural break in level
• A structural break in level and in trend
• A structural break in level, trend and variance
• ...

See also here (PROC MODEL solution) :

Interrupted Time Series Analysis for Single Series and Comparative Designs:
https://www.sas.com/content/dam/SAS/en_ca/User%20Group%20Presentations/Health-User-Groups/ITS_SAS.pd...

See also here (other PROC solutions) :

SAS Global Forum 2020 : Paper 4674-2020
Time After Time: Difference-in-Differences and Interrupted Time Series Models in SAS®
E Margaret Warton, Kaiser Permanente Northern California Division of Research

https://www.sas.com/content/dam/SAS/support/en/sas-global-forum-proceedings/2020/4674-2020.pdf

Cheers,

Koen

Fluorite | Level 6

## Re: Interrupted time series with proc autoreg

Hi Koen,

I wanted to revisit your answer with a question:

You mention not using the effect "time_aft_int" in ITS, however, you list it under schemas to "allow for trend changes" and I see it is also reference in the "PROC MODEL" solution paper.

Could you clarify why you would not use it but it is included in references?

Thank you!

Discussion stats
• 2 replies
• 1581 views
• 1 like
• 2 in conversation