Saturday, August 24, 2019

forecasting - R auto.arima "No ARIMA model able to be estimated"



I have been using auto.arima with a lot of success in the past. However, I started running into an error that I have had difficulties troubleshooting.
The error is :



    Error in search.arima(x, d, D, max.p, max.q, max.P, max.Q, max.order,  : 
No ARIMA model able to be estimated



This is the code that I used; unfortunately I cannot share the data as they are proprietary.



            auto.arima(myts
,max.p=5, max.d=5, max.q=5, max.P=50, max.D=5, max.Q=5
,ic="aicc"
,seasonal=FALSE, allowdrift =FALSE, allowmean=TRUE, stationary=FALSE
,test="kpss"
,stepwise=FALSE, approximation=FALSE
,lambda=NULL

,xreg=historic_xreg
)


The way I am currently treating this is to gradually reduce the exogenous variables in xreg (which start from 10 down to 1 in a loop), but even this fails. This might be because I have fewer than 30 data points.



I looked into the source code but as I am not an experienced programmer I had trouble pinning down the reason of the error. I know it has to do with the functions's inability to find the bestfit; or better put I might be expecting too much given the data that I have. The data is yearly and there is no seasonality.



https://github.com/robjhyndman/forecast/blob/master/R/arima.R




My question is: What adjustments do I need to do to allow auto.arima to provide me with a fitted model which then I can assess on its forecasting performance?


Answer



OK, I have found my error. Looking at the myts and the way I construct it, I have characters instead of numeric format. So apologies for taking up your time with such a noob-ish question.



For the record, these are the steps I took with the hopes of helping others stumbling into the "“No ARIMA model able to be estimated”" error:



After I removed the exogenous variables I was still getting the error.
I created some dummy data to feed into auto.arima and it worked.



I then tried to fit myts to Arima and it was not working - which meant that the problem was with my data. I looked up myts and the data frame it was generated from and lo and behold, the values were stored as characters.



No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...