Extracts the fitted values.

# S3 method for AR
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

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 4.34 #> 5 AR(value ~ order(3)) 5 4.10 #> 6 AR(value ~ order(3)) 6 4.01 #> 7 AR(value ~ order(3)) 7 3.39 #> 8 AR(value ~ order(3)) 8 4.46 #> 9 AR(value ~ order(3)) 9 4.62 #> 10 AR(value ~ order(3)) 10 4.52 #> # … with 38 more rows