I have a huge dataset with over 4000 companies and I have estimated a liquidity measure for these each 4000 companies. But liquidity is highly persistent and exihibits auto-correlation. In order to mitigate this autocorrelation problem each of the liquidity measure estimated for the company has to be trasformed by AR(2) process i.e. residuals of autoregressive model are used instead of actual values. But when I estiamate the AR(2) with following code in r

AR<- data.frame(dfAR1, apply(dfAR1, 2, function(x) arima(x, order = c(2,0,0),optim.method="Nelder-Mead")$res))

I receive warning

 arima(x, order = c(2, 0, 0), optim.method = "Nelder-Mead") :
  possible convergence problem: optim gave code = 10

When I looked up in the manual it says: "10 indicates degeneracy of the Nelder–Mead simplex" I don't understand how bad this warning is for my estimations and how can I fix it. I would really appreciate your help in this regard.

  • 1
    $\begingroup$ When this algorithm fails, could you try another algorithm? The optim function in R offers seven of them, and arima seems to be using optim. $\endgroup$ – Richard Hardy Mar 18 '16 at 10:07
  • $\begingroup$ @RichardHardy thank you for your suggestion. The thing is I do get the residuals i.e. AR(2) does run. But I receive this warning. I will run it with other optim. $\endgroup$ – Aquarius Mar 18 '16 at 10:11

Browse other questions tagged or ask your own question.