Closed TylerGrantSmith closed 3 years ago
Thanks! Should work now:
library(tsibble)
library(fable)
#> Loading required package: fabletools
set.seed(40)
x = rnorm(24, 1)
y = rnorm(24, 30)
xy = data.frame(x,y)
train = as_tsibble(ts(xy, frequency = 12, start = c(2020, 1)), pivot_longer = FALSE)
test = as_tsibble(ts(xy, frequency = 12, start = c(2022, 1)), pivot_longer = FALSE)
fit <- train %>% model(VAR(vars(x,y) ~ AR(1)))
# works
fc <- forecast(fit)
autoplot(fc)
# doesn't work
fc <- forecast(fit, new_data = test)
autoplot(fc)
Created on 2020-10-14 by the reprex package (v0.3.0)
Created on 2020-10-12 by the reprex package (v0.3.0)