简体   繁体   English

R auto.arima “无法估计 ARIMA 模型”

[英]R auto.arima “No ARIMA model able to be estimated”

I have been using auto.arima with a lot of success in the past.过去我一直在使用 auto.arima 并取得了很大的成功。 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.我目前处理这个问题的方法是逐渐减少 xreg 中的外生变量(循环中从 10 开始减少到 1),但即使这样也失败了。 This might be because I have fewer than 30 data points.这可能是因为我的数据点少于 30 个。

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 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?我的问题是:我需要做哪些调整才能让 auto.arima 为我提供拟合模型,然后我可以评估其预测性能?

OK, I have found my error.好的,我发现了我的错误。 Looking at the myts and the way I construct it, I have characters instead of numeric format.看看 myts 和我构造它的方式,我有字符而不是数字格式。 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:作为记录,这些是我采取的步骤,希望能帮助其他人跌入“无法估计 ARIMA 模型”错误:

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.我创建了一些虚拟数据以输入auto.arima并且它起作用了。

I then tried to fit myts to Arima and it was not working - which meant that the problem was with my data.然后我尝试将myts 安装Arima ,但它不起作用 - 这意味着问题出在我的数据上。 I looked up myts and the data frame it was generated from and lo and behold, the values were stored as characters.我查看了myts和它生成的数据框,瞧,这些值存储为字符。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM