Extracts the fitted values.
# S3 method for class 'VAR'
fitted(object, ...)
A vector of fitted values.
lung_deaths <- cbind(mdeaths, fdeaths) %>%
as_tsibble(pivot_longer = FALSE)
lung_deaths %>%
model(VAR(vars(mdeaths, fdeaths) ~ AR(3))) %>%
fitted()
#> # A tsibble: 72 x 4 [1M]
#> # Key: .model [1]
#> .model index mdeaths fdeaths
#> <chr> <mth> <dbl> <dbl>
#> 1 VAR(vars(mdeaths, fdeaths) ~ AR(3)) 1974 Jan NA NA
#> 2 VAR(vars(mdeaths, fdeaths) ~ AR(3)) 1974 Feb NA NA
#> 3 VAR(vars(mdeaths, fdeaths) ~ AR(3)) 1974 Mar NA NA
#> 4 VAR(vars(mdeaths, fdeaths) ~ AR(3)) 1974 Apr 1688. 650.
#> 5 VAR(vars(mdeaths, fdeaths) ~ AR(3)) 1974 May 1539. 588.
#> 6 VAR(vars(mdeaths, fdeaths) ~ AR(3)) 1974 Jun 1224. 452.
#> 7 VAR(vars(mdeaths, fdeaths) ~ AR(3)) 1974 Jul 1220. 420.
#> 8 VAR(vars(mdeaths, fdeaths) ~ AR(3)) 1974 Aug 1422. 505.
#> 9 VAR(vars(mdeaths, fdeaths) ~ AR(3)) 1974 Sep 1311. 471.
#> 10 VAR(vars(mdeaths, fdeaths) ~ AR(3)) 1974 Oct 1342. 480.
#> # ℹ 62 more rows