BookmarkSubscribeRSS Feed
SAS-questioner
Obsidian | Level 7

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!

3 REPLIES 3
sbxkoenk
SAS Super FREQ

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

sbxkoenk
SAS Super FREQ

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

Levi_M
Fluorite | Level 6
Proc autoreg might be what you are looking for

sas-innovate-2024.png

 

Time is running out to save with the early bird rate. Register by Friday, March 1 for just $695 - $100 off the standard rate.

 

Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events. 

 

Register now!

Multiple Linear Regression in SAS

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.

Discussion stats
  • 3 replies
  • 722 views
  • 0 likes
  • 3 in conversation