I am noticing some inconsistencies when forecasting with lagged xregs. Specifically, forecasts for h <= lag period. It seems like the historical data provided to the original model is not added to the new data before generating the forecast. In the example below I use the lag = 2 example from fpp3. The first forecast fc1 is identical to the one generated in the book. In the second forecast fc2 I augment the new_data by binding the historical advert data with the new advert data generated in insurance_future. When I do this I get a different forecast in fc2 vs fc1. It seems to me like the forecast in fc1 does not have access to the historical (xreg) data, so the TVaderts is treated as NA for the first two steps in the horizon. Is this correct? And if so, shouldn't that data be included as it is in fc2? This might be related to #312 . Thanks!
Curiously, when I create new lagged variables manually (rather than in the formula) the model results match the "base case" from fpp3 (fc1 in my example).
This reproduction leads me to believe that fc1 is correct, rather than fc2. If so, what is occurring in fc2 that causes it to have a different forecast vs that in fc1 (and fc3).
I am noticing some inconsistencies when forecasting with lagged xregs. Specifically, forecasts for h <= lag period. It seems like the historical data provided to the original model is not added to the new data before generating the forecast. In the example below I use the lag = 2 example from fpp3. The first forecast
fc1
is identical to the one generated in the book. In the second forecastfc2
I augment thenew_data
by binding the historical advert data with the new advert data generated ininsurance_future
. When I do this I get a different forecast infc2
vsfc1
. It seems to me like the forecast infc1
does not have access to the historical (xreg) data, so the TVaderts is treated asNA
for the first two steps in the horizon. Is this correct? And if so, shouldn't that data be included as it is infc2
? This might be related to #312 . Thanks!Curiously, when I create new lagged variables manually (rather than in the formula) the model results match the "base case" from fpp3 (
fc1
in my example).Created on 2021-06-02 by the reprex package (v2.0.0)
This reproduction leads me to believe that
fc1
is correct, rather thanfc2
. If so, what is occurring infc2
that causes it to have a different forecast vs that infc1
(andfc3
).