BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
teg_76
Calcite | Level 5

 

Hi Everyone,

 

I'm doing some ARIMA forecasting and am finding the need to take the first difference of my variable of interest so I can get a stationary series.  My variable of interest is hospital admissions. I have two questions:

 

1) If I have a numeric covariate, that is also time related, such as membership over time, do I need to take the first difference of that covariate?

 

2) If the answer to #1 is yes, how do I accomplish that in a PROC ARIMA statement?

 

Thank you!

 

 

proc arima data=arima_input3 plots=all;

identify var=admit_count (1)

crosscorr=(memberships)

nlag=53;

estimate q=2 input=(memberships);

forecast lead=106 interval=week id=admit_date out=results;

run;

1 ACCEPTED SOLUTION

Accepted Solutions
alexchien
Pyrite | Level 9

It is usually a good practice to take the same diff of the crosscorr variables as the dependent var but it's up to the modeler to decide if diffing the crosscorr var is needed.  You can accomplished it by adding the desirable diffs right after the crosscorr var (see below)

 

proc arima data=arima_input3 plots=all;

identify var=admit_count (1)

crosscorr=(memberships(1))

nlag=53;

estimate q=2 input=(memberships);

forecast lead=106 interval=week id=admit_date out=results;

run;

View solution in original post

2 REPLIES 2
alexchien
Pyrite | Level 9

It is usually a good practice to take the same diff of the crosscorr variables as the dependent var but it's up to the modeler to decide if diffing the crosscorr var is needed.  You can accomplished it by adding the desirable diffs right after the crosscorr var (see below)

 

proc arima data=arima_input3 plots=all;

identify var=admit_count (1)

crosscorr=(memberships(1))

nlag=53;

estimate q=2 input=(memberships);

forecast lead=106 interval=week id=admit_date out=results;

run;

teg_76
Calcite | Level 5
Thank you!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 2 replies
  • 1393 views
  • 1 like
  • 2 in conversation