【问题标题】:Is it possible in R to make auto.arima choose the best model according to other criteria than aicc, aic or bic?在 R 中是否可以让 auto.arima 根据 aicc、aic 或 bic 以外的其他标准选择最佳模型?
【发布时间】:2020-04-27 03:14:55
【问题描述】:

我想在 R 中对月度数据运行 auto.arima 函数,它选择最佳模型的 3 个标准是 aicc、aic 和 bic。我想使用像 MAPE 这样的样本外测量。是否有可能创建一个解决方法?

【问题讨论】:

    标签: r statistics time-series arima


    【解决方案1】:

    不可能,必须是三者之一。虽然你可以自己做,如果你愿意改变代码。如果您查看 auto.arima 中的 myarima 代码,您会发现以下代码段

    if (method == "CSS") {
          fit$aic <- offset + nstar * log(fit$sigma2) + 2 * npar
        }
        if (!is.na(fit$aic)) {
          fit$bic <- fit$aic + npar * (log(nstar) - 2)
          fit$aicc <- fit$aic + 2 * npar * (npar + 1) / (nstar - npar - 1)
          fit$ic <- switch(ic, bic = fit$bic, aic = fit$aic, aicc = fit$aicc)
        }
        else {
          fit$aic <- fit$bic <- fit$aicc <- fit$ic <- Inf
        }
    

    您可以尝试将 fit$aic 值更改为自定义度量值。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-06-22
      • 2021-04-19
      • 2016-11-15
      • 2015-11-24
      • 2014-05-04
      • 2013-06-25
      • 1970-01-01
      • 2020-09-28
      相关资源
      最近更新 更多