testing - forecast::checkresiduals 和 Box.test 的不同结果

标签 testing time-series forecasting arima

我正在尝试使用外生回归变量拟合 ar 模型,特别是季节性虚拟变量和具有 AR(3) 误差的趋势。为此,我使用以下代码:

modelo<-Arima(log.licor, order = c(3,0,0), xreg = tend_esta, include.mean = F)

没有包含均值,因为我没有将任何季节性虚拟变量排除在回归之外。

结果

forecast::checkresiduals(modelo, test = "LB")

是:

    Ljung-Box test
data:  Residuals from Regression with ARIMA(3,0,0) errors
Q* = 77.787, df = 7, p-value = 3.886e-14

Model df: 17.   Total lags used: 24

但是

的结果
Box.test(residuals(modelo), type = "Ljung-Box")

    Box-Ljung test

data:  residuals(modelo)
X-squared = 1.3407, df = 1, p-value = 0.2469

我的论点有问题吗?每个结果的含义完全不同。

最佳答案

我遇到了同样的问题。在 Box.test 中使用 lagfitdf 参数。所以对于你的问题,看看它在预测版本中是怎么说“Model df: 17”和“Total lags used: 24”的?试试 Box.test 版本中的那些。

关于testing - forecast::checkresiduals 和 Box.test 的不同结果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49141746/

相关文章:

python - 在 Python 中使用 Holt-Winters 进行预测

r - 使用 dplyr 和 do 进行多步预测

regex - OCaml:如何测试我自己的正则表达式库

sql - 如何将列添加到 generate_series 查询

ruby - `bundle exec rake` 还是 `rake` ? `Rake::TestTask` 怎么样?

python - Tensorflow 中间歇振荡器的 LSTM 时间序列预测

python - 填写缺失日期的快捷方式

r - Bass模型遗传算法的R实现

android - 在 2 台设备上运行 android 仪器测试

c# - 我如何对这个自定义 commandlet 进行单元测试