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
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.
lag_models %>% glance()
Running the code above, I get AIC, AICc, BIC, etc. by lagged predictor model by .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().
Thanks very much.