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

Hi there,

 

I am forecasting a large number of series using the automatic ARIMA model selection function within the X12 procedure. From what I can tell from the documentation and experimentation, there is no output data set of the forecasts. The only way to extract the data is through the ODS. This is inefficient with so many series. Is there a more efficient way to extract the forecasts from the automatic ARIMA modelling?

 

ods output ModelEstimation.AutoModel.FinalModelChoice=x12_model_choice;
ods output Forecasts.Original.ForecastCL=x12_forecasts;

proc x12 data=trend date=series interval=qtr plots=none;
	var %loopdata;
	transform function=auto;
	automdl maxdiff=(1,1) maxorder=(4,1);
	forecast lead=20;
	output out=x12_fcs a1;
run;

Regards,

 

Sean

1 ACCEPTED SOLUTION

Accepted Solutions
dw_sas
SAS Employee

Hi Sean,

 

Please add the OUTFORECAST option to the FORECAST statement, and table B1 to the OUTPUT statement in your PROC X12 code.  This should extend table B1 for each variable in your VAR statement with the LEAD= forecasts and write them to the OUT= data set specified in your OUTPUT statement.  These forecasts will be on the original scale of your data.  Note that if you want the confidence limits in addition to the forecasts, then you will need to use the ODS OUTPUT statement as in your current application.

 

If the above modifications to your code do not allow you to obtain the forecasts in the OUT= data set, then please indicate the release of SAS you are running.

 

I hope this helps!

DW

View solution in original post

1 REPLY 1
dw_sas
SAS Employee

Hi Sean,

 

Please add the OUTFORECAST option to the FORECAST statement, and table B1 to the OUTPUT statement in your PROC X12 code.  This should extend table B1 for each variable in your VAR statement with the LEAD= forecasts and write them to the OUT= data set specified in your OUTPUT statement.  These forecasts will be on the original scale of your data.  Note that if you want the confidence limits in addition to the forecasts, then you will need to use the ODS OUTPUT statement as in your current application.

 

If the above modifications to your code do not allow you to obtain the forecasts in the OUT= data set, then please indicate the release of SAS you are running.

 

I hope this helps!

DW

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
  • 1 reply
  • 728 views
  • 2 likes
  • 2 in conversation