Help using Base SAS procedures

ARIMA - Statistics of Fit Question

Reply
Regular Learner
Posts: 1

ARIMA - Statistics of Fit Question

Hello, I am new to using ARIMA statistics in SAS. I am using SAS 9.4. I also have access to SAS Enterprise Guide 6.1 I need help reproducing this output. I am not sure what code was used exactly. I am analysing ARIMA models to find the best model for this particular dataset.

 

The data file (lets call it "a") is a list of 70 years and numbers for each year. Ex:
year number
1991 51
1992 64
1993 74
1994 41

 

Here is an example of the part of the code that I have so far:

proc arima data = a;
identify var=number;
estimate p=2 q=1;
forecast lead=0 printall;
run;

This produces an ARMA(2,1) model and various statistics.

 

However, here is the output I would like to replicate:
http://puu.sh/pkShA/e3a962fc9f.png

http://puu.sh/pkSiP/ce9e377275.png

 

What is the exact code or required steps I would need to replicate these statistics of fit variables exactly as shown here for each particular ARIMA model? I have tried outstat= and outest= but they do not provide all these variables.
Thanks in advance for your help.

SAS Employee
Posts: 340

Re: ARIMA - Statistics of Fit Question

You are right. Some of these statistics are not provided by PROC ARIMA out of the box.

You will need to combine the available outputs to calculate those.

Some will be easy: ARSQ can be calculated from k,n,R2 (NPARMS,NUMRESID,SSE - from OUTSTAT=,   SST -from the output of IDENTIFY statement)

For some you will need to use the OUT= data set. For example MAXERR needs the RESIDUAL variable in OUT=.

And probably the most interesting one: RWRSQ - you will need to fit a RandomWalk model, and use its results in the calculation.

 

You could check other SAS/ETS procedures, maybe some can fit the same (or similar) model, but provide the statistics you need.

PROC UCM, PROC VARMAX.

 

Some formulas:

https://support.sas.com/documentation/cdl/en/etsug/68148/HTML/default/viewer.htm#etsug_ucm_details40...

 

Ask a Question
Discussion stats
  • 1 reply
  • 280 views
  • 0 likes
  • 2 in conversation