Hi, I want to conduct a interrupted time series regression in SAS to see if the intervention will have impact on the change of the number outcome variables. I have bunch of other independent variables here including sex, age, education, income. When I check the SAS code online, it seems there are different codes to conduct the time series regression such as autoreg, timeseries, arima. I am not which one should I use, and how to use it. And how should I format the dataset? Should I format the data as below?
Time phrase intervention Sex Age Education Outcome
1 0 0
2 0 0
3 0 0
4 1 1
5 1 2
6 1 3
Could anyone help me with it? Thank you!
Hello,
First of all, I have moved this post to the 'Forecasting and econometrics' board.
This is a very extensive subject about which much can be said.
See my next post (which I am about to write).
Cheers,
Koen
OK. On top of above post.
When you look for SAS examples, don't just look for interrupted time series regression or analysis
, but also for intervention analysis !!
You need a date , time , or date-time variable and that can indeed be just the observation number.
What is your target variable? Is it a continuous outcome, a binary outcome, a count?
Regarding the coding of your intervention : depending on the effect you want to model, you should code the intervention as 0 and 1 (1 as long as the intervention continues) or 0 and 1, 2, 3 (increasing number as long as the intervention continues).
Anyway, you need ARIMAX methodology (dynamic regression) or state space modelling or RNN (Recurrent Neural Networks).
What tooling do you have available?
SAS / ETS ? , SAS Econometrics ? , SAS Forecast Server ? , SAS Visual Forecasting ? , other ? ???
I will answer further after you have answered the above questions.
Koen
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.
Find more tutorials on the SAS Users YouTube channel.