Forecasting VAR models in RStudio

Good afternoon, I would really appreciate if someone could help me with a question I have. I am estimating VAR models in RStudio, for which the objective is to make forecasts of the variables. What I would like is to be able to make the forecast from a certain date of the time series that I am handling. For example, I am using annual data from 1920 to 2022, so the forecast of my model will come from the year 2023, what I would like is to make the forecast with the model already worked but from the year 2019, and not so from 2023.

This is the code I use from the "vars" library.

var.1.prd <- predict(var.1, dumvar=muestra_exo2, n.ahead = 3, ci = 0.95)

I use this space since previously I could not find an answer to this need anywhere else.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.