Dear all,
 
My name is Guillermo I'm trying to write a short program to find all the
possible combination in fitting an ARIMA Model. My script is the
following:
 
n=rnorm(100)+5
Aux.M=matrix(NA,nrow=100,ncol=2)
L=1
for(i in 0:2)
{for(j in 0:2) {for(k in 0:2) 
 
Aux.M[L,2]=arima(n,order=c(i,j,k),include.mean=TRUE)$aic
 
x1=paste("AR=",i,sep=" ")
x2=paste("I=",j,sep=" ")
x3=paste("MA=",k,sep=" ")
x4=paste(x1,x2,sep=" ")
x5=paste(x4,x3,sep=" ")
 
Aux.M[L,1]=x5
L=L+1}}
 
After running in R, you will realize that the last for does not work. So
I have problem using three 'for command' at the same time, and I do not
know exactly how to solve the problem. Are there any more efficient
approach? (i.e. using a combination of while and for) Could somebody
help me?


This message has been scanned for viruses by TRENDMICRO,
an IESE technology affiliate company  and global leader in antivirus and content security software.

	[[alternative HTML version deleted]]


