【问题标题】:How can I deal with this error in the autoregressive model parameter estimation?如何处理自回归模型参数估计中的这个错误?
【发布时间】:2014-04-27 22:05:40
【问题描述】:

我正在尝试使用以下代码进行自回归模型参数估计:

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

然后,我得到了结果以及以下错误:

 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

有没有办法消除我的自回归参数估计中的这些错误?

实际上,我正在尝试使用自回归模型根据这些数据进行预测,

但如果可能的话,我更喜欢一阶自回归模型。

然而,即使是预测值也与预期相差甚远

预测值是个问题..

有没有办法根据这些数据从第一个自回归模型中进行良好的预测

和/或任何顺序自回归模型?

如果您能提供任何帮助,我将不胜感激。

非常感谢您!

【问题讨论】:

  • 你能提供数据吗?
  • RStudent:是的。您现在可以在我上面编辑的问题中看到它。
  • 实际上,我正在尝试使用自回归模型根据这些数据进行预测,但如果可能的话,我更喜欢一阶自回归模型。然而,即使是预测值也与预期的预测值相差甚远,这就是问题所在。有没有办法根据来自第一个自回归模型或任何阶自回归模型的这些数据进行良好的预测?跨度>
  • 这个问题似乎跑题了,因为用户在键盘上打了个喷嚏。

标签: r warnings optional-parameters autoregressive-models mle


【解决方案1】:

然后只需使用:

model<-arima(file[,1],order=c(1,0,0))
predict(model,n.ahead=5)

【讨论】:

  • 即使您使用原始数据的估计系数,您的模拟数据也不会与原始数据相同。
  • 我认为,默认情况下arima.sim 会从均值为 0 方差为 1 的正态分布中添加随机数。但是您的数据的方差要小得多(0.001219374),因此这可能是强烈的原因偏差的结果。如果您想要可比较的结果,您可以使用 sd=0.001219374 以适应您的 sd。
  • 学生:我明白了。我认为您在谈论随机游走(随机错误)属性。现在我清楚地明白你的意思了。很高兴能在您的帮助下进行有价值的讨论。非常感谢!
猜你喜欢
  • 1970-01-01
  • 2014-05-24
  • 1970-01-01
  • 2019-08-10
  • 1970-01-01
  • 1970-01-01
  • 2016-08-18
  • 2019-04-29
  • 1970-01-01
相关资源
最近更新 更多