Extracts the fitted values.
# S3 method for class 'TSLM'
fitted(object, ...)
A vector of fitted values.
as_tsibble(USAccDeaths) %>%
model(lm = TSLM(log(value) ~ trend() + season())) %>%
fitted()
#> # A tsibble: 72 x 3 [1M]
#> # Key: .model [1]
#> .model index .fitted
#> <chr> <mth> <dbl>
#> 1 lm 1973 Jan 8349.
#> 2 lm 1973 Feb 7559.
#> 3 lm 1973 Mar 8370.
#> 4 lm 1973 Apr 8591.
#> 5 lm 1973 May 9472.
#> 6 lm 1973 Jun 9956.
#> 7 lm 1973 Jul 10856.
#> 8 lm 1973 Aug 10121.
#> 9 lm 1973 Sep 9025.
#> 10 lm 1973 Oct 9331.
#> # ℹ 62 more rows