[Rd] Stroring and extracting AICs from an ARIMA model using a nested loop

ismael ismael k|m@|@me @end|ng |rom y@hoo@|r
Mon Feb 3 07:23:01 CET 2020


Hello
I am trying to extract AICs from an ARIMA estimation with different
combinations of p & q ( p =0,1,2,3
and q=0,1.2,3). I have tried using the following code unsucessfully. Can
anyone help?

code:
storage1 <- numeric(16)
for (p in 0:3){

    for (q in 0:3){
 
    storage1[p]  <- arima(x,order=c(p,0,q), method="ML")}
}
storage1$aic

	[[alternative HTML version deleted]]



More information about the R-devel mailing list