BookmarkSubscribeRSS Feed
Honig
Calcite | Level 5

Hello everybody, I am a student in econometrics and statistics. With my friend, we have to writre a papre about the ARMA indentification with SAS/IML.

At first, we generate multiple ARMA process samples like that:

proc iml;
/* proc this process X_t=1.3X_t-1 -0.4X_t-2 u_t + 0.8u_t-1 ARMA(1;2)*/
/*N=30*/
phi= {1, -0.7};
theta= {1, 0.3, 0.8};
mu=0;
sigma=1;
seed=-12345;
NumSamples=500;
%let N=30;
Y= j(Numsamples, &N, 0);/* J(nrow,ncol,value):renvoie value 1 par defaut pour tout nrow et ncol)*/
do i= 1 to Numsamples;
ARMA21= armasim(phi, theta, mu, sigma, &N, seed);
Y[i,]= t(ARMA21);
end;
print Y;
SampleID= repeat(T(1:NumSamples),1,&N);
create vrai.ARMA21_30sim var {SampleID Y}; append; close vrai.ARMA21_30sim; QUIT;

 But some troubles are coming up: we want to retrieve the sum of squares error to calculate the log likehood, then criterion information but we have no idea to proceed that after many attempts. Indeed, we want to have many samples to test the relevance of criteria information (AIC, BIC, HQ,..).

Then, to make our work easier, we want to know is it possible to create a matrix where we compile when a criteria information let a good estimation or not.

 

Any suggestions that you might have would be greatly appreciated! Thank you.

2 REPLIES 2
Ksharp
Super User

It is time to check IML documentation. There is a special chapter related to time series analysis.

Especially thoese model fit function like :   call tsunimar(arcoef,ev,nar,aic) 

Rick_SAS
SAS Super FREQ

It looks like that program is from Chapter 13 (p. 259) of Simulating Data with SAS (Wicklin, 2013).  I suggest you read Section 13.1 and 13.2 and follow the examples.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

From The DO Loop
Want more? Visit our blog for more articles like these.
Discussion stats
  • 2 replies
  • 1381 views
  • 1 like
  • 3 in conversation