Extracts the fitted values.

# S3 method for VAR
fitted(object, ...)

Arguments

object

The time series model used to produce the forecasts

...

Additional arguments for forecast model methods.

Value

A vector of fitted values.

Examples

lung_deaths <- cbind(mdeaths, fdeaths) %>% as_tsibble(pivot_longer = FALSE) lung_deaths %>% model(VAR(vars(log(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(log(mdeaths), fdeaths) ~ AR(3)) 1974 Jan NA NA #> 2 VAR(vars(log(mdeaths), fdeaths) ~ AR(3)) 1974 Feb NA NA #> 3 VAR(vars(log(mdeaths), fdeaths) ~ AR(3)) 1974 Mar NA NA #> 4 VAR(vars(log(mdeaths), fdeaths) ~ AR(3)) 1974 Apr 1676. 666. #> 5 VAR(vars(log(mdeaths), fdeaths) ~ AR(3)) 1974 May 1553. 591. #> 6 VAR(vars(log(mdeaths), fdeaths) ~ AR(3)) 1974 Jun 1379. 510. #> 7 VAR(vars(log(mdeaths), fdeaths) ~ AR(3)) 1974 Jul 1195. 413. #> 8 VAR(vars(log(mdeaths), fdeaths) ~ AR(3)) 1974 Aug 1350. 498. #> 9 VAR(vars(log(mdeaths), fdeaths) ~ AR(3)) 1974 Sep 1220. 457. #> 10 VAR(vars(log(mdeaths), fdeaths) ~ AR(3)) 1974 Oct 1299. 476. #> # … with 62 more rows