VAR and back-transformation: Principles of forecasting #122
nickcox896
started this conversation in
General
Replies: 1 comment 3 replies
-
|
You need the case_4 <- google_2015 |>
model(VARIMA(vars(log(Open), log(High)) ~ pdq(d = 1, q = 0))) |>
forecast(h = 3, bootstrap = TRUE, times = 100) |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Most of the time, when conducting empirical VAR analysis we need to take
a) the log of the variables,
b) the first difference of the variables
c) the second difference of the variables,
d) the difference of logs of the variables
due to non-stationarity of the variables.
Within ARIMA we can easily handle these 4 cases. I am not sure how to handle them within VAR.
My attempt (with data from the online textbook)
Case 1:the log of variables
case_1<- google_2015 |> model(VAR(vars(log(Open), log(High)))) |> forecast(h = 3, bootstrap = TRUE, times=100)This case seems to be working OK. I hope the code I run is correct
Case 2:the first difference of variables
Case 3:the second difference of variables
case 4: the difference of logs of the variables
So the main problem is how to run cases 2 up to 4, which hold almost always in empirical analysis. I did some search and I think that we have to write some additional functions before running the VAR models based on this site (https://cran.r-project.org/web/packages/fable/vignettes/transformations.html) but I am not sure how to do it with the fable package.
Beta Was this translation helpful? Give feedback.
All reactions