Extracts the fitted values.

# S3 method for class 'AR'
fitted(object, ...)

Arguments

object

A model for which forecasts are required.

...

Other arguments passed to methods

Value

A vector of fitted values.

Examples

as_tsibble(lh) %>%
  model(AR(value ~ order(3))) %>%
  fitted()
#> # A tsibble: 48 x 3 [1]
#> # Key:       .model [1]
#>    .model               index .fitted
#>    <chr>                <dbl>   <dbl>
#>  1 AR(value ~ order(3))     1   NA   
#>  2 AR(value ~ order(3))     2   NA   
#>  3 AR(value ~ order(3))     3   NA   
#>  4 AR(value ~ order(3))     4    2.39
#>  5 AR(value ~ order(3))     5    2.26
#>  6 AR(value ~ order(3))     6    2.21
#>  7 AR(value ~ order(3))     7    1.87
#>  8 AR(value ~ order(3))     8    2.46
#>  9 AR(value ~ order(3))     9    2.55
#> 10 AR(value ~ order(3))    10    2.49
#> # ℹ 38 more rows