-1

I am trying to use the following code for my autoregressive model parametere estimation:

 ar(file[,1], aic = TRUE, order.max = NULL,method = "mle")

Then, I have the results along with the following errors:

 Call:
 ar(x = file[, 1], aic = TRUE, order.max = NULL, method = "mle")

 Coefficients:
       1        2        3        4        5        6        7        8  
 -2.3811  -3.3336  -4.3599  -4.8660  -4.8251  -4.0216  -3.1113  -2.0082  
       9  
 -0.5511  

Order selected 9  sigma^2 estimated as  4.742e-11 
 Warning messages:
 1: In arima0(x, order = c(i, 0L, 0L), include.mean = demean) :
   possible convergence problem: optim gave code=1
 2: In arima0(x, order = c(i, 0L, 0L), include.mean = demean) :
   possible convergence problem: optim gave code=1
 3: In arima0(x, order = c(i, 0L, 0L), include.mean = demean) :
   possible convergence problem: optim gave code=1
 4: In arima0(x, order = c(i, 0L, 0L), include.mean = demean) :
   possible convergence problem: optim gave code=1

Is there a way to eliminate these errors in my autoregressive parameter estimation?

Actually, I am trying to do the forecasting based on this data using autoregressive model,

but I prefer first order autoregressive model, if possible.

However, even the forecasted values turned out to be far much irrelevant from the expected

forecasted values which is the problem..

Is there a way to do a good forecasting based on these data either from first autoregressive model

and/or any order autoregressive model?

I would greatly appreciate if you could provide any helps.

Thank you very much in advance!

David Arenburg
  • 91,361
  • 17
  • 137
  • 196
  • Can you supply the data? – DatamineR Apr 27 '14 at 22:15
  • RStudent: Yes. You can see it in my edited question above now. –  Apr 27 '14 at 22:29
  • Actually, I am trying to do the forecasting based on this data using autoregressive model, but I prefer first order autoregressive model, if possible. However, even the forecasted values turned out to be far much irrelevant from the expected forecasted values which is the problem..Is there a way to do a good forecasting based on these data either from first autoregressive model or any order autoregressive model? –  Apr 27 '14 at 22:41
  • This question appears to be off-topic because the user has sneezed over their keyboard. – Adrian Wragg Sep 22 '14 at 23:38

1 Answers1

0

Then just use:

model<-arima(file[,1],order=c(1,0,0))
predict(model,n.ahead=5)
DatamineR
  • 10,428
  • 3
  • 25
  • 45
  • Your simulated data will not be the same as your original data, even if you use the estimated coefficient of your original data. – DatamineR Apr 27 '14 at 22:52
  • I think, by default `arima.sim` adds random numbers from a normal distribution with mean 0 and variance 1. But your data has a much smaller variance (0.001219374), so it might be the reason for strongly deviating results. If you want comparable results, you could use `sd=0.001219374` in order to adjust to your sd. – DatamineR Apr 27 '14 at 22:59
  • Rstudent: I see. I think you are talking about the random walk (random error) property. Now I clearly understand what you mean. It was a great pleasure to have assistance from you with a valuable discussion. Thank you very much! –  Apr 27 '14 at 23:23