简体   繁体   English

使用 AICc 使用 TSLM 选择滞后预测变量

[英]selecting lagged predictors with TSLM using AICc

I am trying to determine lagged predictors to include in my time series model.我正在尝试确定要包含在我的时间序列模型中的滞后预测变量。 So I fitted a TSLM with up to lag 3 of the independent variable所以我安装了一个 TSLM 最多滞后 3 个自变量

lag_models <- data_train %>% model(
    ts_lag_0 = TSLM(Y ~ X)
  , ts_lag_1 = TSLM(Y ~ X + lag_X_01)
  , ts_lag_2 = TSLM(Y ~ X + lag_X_01 + lag_X_02)
  , ts_lag_3 = TSLM(Y ~ X + lag_X_01 + lag_X_02 + lag_X_03)
 )

data_train contains cross-validation data. data_train 包含交叉验证数据。

lag_models %>% glance()

Running the code above, I get AIC, AICc, BIC, etc. by lagged predictor model by .id.运行上面的代码,我得到了 AIC、AICc、BIC 等,通过 .id 的滞后预测模型。 I am wondering if it's possible to pull out these metrics by model by only the model without using group_by() and summarize().我想知道是否可以在不使用 group_by() 和 summary() 的情况下仅通过模型按模型提取这些指标。

Thanks very much.非常感谢。

When using cross validation, you are estimating a model on every fold/slice of the data.使用交叉验证时,您是在数据的每个折叠/切片上估计模型。 As a result, you will receive set of summary statistics (AIC, AICc, BIC, etc.) for every estimated model.因此,您将收到每个估计模型的一组汇总统计信息(AIC、AICc、BIC 等)。 If you were to combine them using group_by() and summarise(), you would be combining summary information from models with different response data - this isn't recommended as information criterion are not comparable when the response data varies.如果您要使用 group_by() 和 summarise() 将它们组合起来,您将组合来自具有不同响应数据的模型的摘要信息 - 不建议这样做,因为当响应数据变化时,信息标准不具有可比性。

If you wanted to compare the performance of each of the models using cross-validation, you can use out-of-sample accuracy measures using accuracy().如果您想使用交叉验证来比较每个模型的性能,您可以使用accuracy() 使用样本外准确度度量。 Examples of using fable for cross-validated accuracy evaluation can be found at https://otexts.com/fpp3/tscv.html可以在https://otexts.com/fpp3/tscv.html上找到使用寓言进行交叉验证准确性评估的示例

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

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