|We are trying to convert a Fame program into SAS using X13 process.Please find below both scripts.We are getting a gap in results when comparing the two methods.Please advise – what can we change in the SAS code below to get identical results as in FAME.For example, how can we define in SAS maxlead 12, series period 12.
-- $FRSN/fame.prog/x12par.inp - parameter file for x12
-- defining FAME database:
toss pik_mortgage.m "thum=%bniya"
active new pik_mortgage.m "thum=%bniya"
series period 12
series span 2003m1 to *
transform function log
arima model (0 1 1)(0 1 1)
outlier critical 3.64
outlier types ao
x11 trendma 13
regression variables td
regression usertype holiday
regression user rosh_10.m pesach_15.m
forecast maxlead 12
forecast save forecasts
x11 save d8 d10 d11 d12 d13
check print default residuals pacfplot
proc x13 data=WORK.JOIN_2 AUXDATA=WORK.QUERY_FOR_IRREGULARITYNEW_ (where=(date ge '31jan2003'd )) date=date1 noprint ;
transform function=log ;
regression uservar= Pesach_15 rosh_10/ usertype=holiday holiday;
arima model=((0,1,1) (0,1,1));
outlier aocv=3.64 TYPE=(AO) ;
x11 trendma = 13 ;
output OUT=out_X13_u d11 ;
You can specify the LEAD= option in the FORECAST statement.
You can use either the INTERVAL=MONTH option or the SEASONS=12 option of the PROC X13 statement.
Specifies the interval of the time series PROC X13 INTERVAL=
Specifies the interval of the time series PROC X13 SEASONS=
Also, if the timestamp is monthly without missing observations, X13 will autodetect the seasonality.
It is also possible to mix monthly and quarterly by groups and have the procedure automatically detect the frequency.
Thanks for taking the time to answer.
We added the seasons= 12 option and still got a large gap in results when comparing Fame & SAS.
Now the warning below appears:-
WARNING: A missing value in the forecast table indicates the value could not be calculated.
Should you have another insight advice it will be appreciated.
It is a little difficult to answer your question without having the data and the results.
However, one suggestion is to review the following documentation in the X13 procedure documentation REGRESSION Example 45.6 in the X13 procedure documentation to make sure that you are correctly supplying the values for the regression variables:
Take note of the following from "User-Defined Regression Variables":
You can use the SPAN= option in the PROC X13 statement to alter the span of the series to be
seasonally adjusted to allow for backcast and forecast periods within the span of the date values
in the DATA= data set. Using this method, forecast error can be computed for the forecast and
You might want to consider using SPAN= rather than the WHERE statement.
You might want to include the OUTFCST option of the FORECAST statement to get more information to compare. In fact, it might be useful to save all the tables that are being saved in the fame program to compare.
One common source of the error that you are seeing is when the data is log transformed, and the forecast is increasing quite quickly (often referred to as "the forecasts are blowing up"). Then the forecasts or associated statistics (especially on the original scale) might become too large to be calculated. FORTRAN does not report these kinds of errors. Nor does FORTRAN stop execution when encountering these types of errors. However, it is more likely to happen with larger order models, whereas this is an airline model.
If you would like to share your data with technical support, then I could investigate further.
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.
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.