I have an ARDL model with co-integration so I used the "dynamac" package in R. I need to forecast for some horizons (different at each time). When I apply the forecast function from the package "forecast" an error occurs due to the fact that the "new data" were not imported.
ARDL_Model <- dynamac::dynardl(Y ~ X1 + X2 + X3 + X4 , data = My_Data,
diffs = c("X1","X2", "X3","X4"),
lagdiffs = list("X1" = c(1:5),"X2" = 1, "X3" = c(1:2), "X4" = c(1:2)), ec = TRUE, simulate = TRUE,shockvar = "X2", graph= TRUE)
forecast(All_ARDL_Model$model,h=1)#Horizon 1
R output - (forecast command): Error in as.data.frame(newdata) : argument "newdata" is missing, with no default