Replies: 1 comment 1 reply
-
|
For forecast accuracy, you will need to pass forecasts to the library(fpp3)
#> ── Attaching packages ──────────────────────────────────────────── fpp3 1.0.3 ──
#> ✔ tibble 3.3.1 ✔ tsibble 1.2.0
#> ✔ dplyr 1.2.1 ✔ tsibbledata 0.4.1
#> ✔ tidyr 1.3.2 ✔ ggtime 0.2.0
#> ✔ lubridate 1.9.5 ✔ feasts 0.5.0
#> ✔ ggplot2 4.0.3 ✔ fable 0.5.0
#> ── Conflicts ───────────────────────────────────────────────── fpp3_conflicts ──
#> ✖ lubridate::date() masks base::date()
#> ✖ dplyr::filter() masks stats::filter()
#> ✖ tsibble::intersect() masks base::intersect()
#> ✖ tsibble::interval() masks lubridate::interval()
#> ✖ dplyr::lag() masks stats::lag()
#> ✖ tsibble::setdiff() masks base::setdiff()
#> ✖ tsibble::union() masks base::union()
google_stock <- gafa_stock |>
filter(Symbol == "GOOG", year(Date) >= 2015) |>
mutate(day = row_number()) |>
update_tsibble(index = day, regular = TRUE)
google_2015 <- google_stock |> filter(year(Date) == 2015)
fit <- google_2015 |> model(VARIMA(vars(log(Open), log(High))))
fit |>
forecast(h = 20, simulate = TRUE) |>
accuracy(google_stock)
#> # A tibble: 2 × 12
#> .model Symbol .response .type ME RMSE MAE MPE MAPE MASE RMSSE ACF1
#> <chr> <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 VARIMA… GOOG High Test -38.4 41.2 38.4 -5.30 5.30 6.23 3.79 0.679
#> 2 VARIMA… GOOG Open Test -39.6 43.1 39.6 -5.55 5.55 5.61 3.58 0.616Created on 2026-06-16 with reprex v2.1.1 Note that I've used |
Beta Was this translation helpful? Give feedback.
1 reply
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.
Uh oh!
There was an error while loading. Please reload this page.
-
I have this data set from the book
And the we apply this VARIMA model
fit<- google_2015 |> model(VARIMA(vars(log(Open), log(High)) ))Finally I am trying to calculate forecast measures
Am I doing something wrong?
Beta Was this translation helpful? Give feedback.
All reactions