R: Extract residuals from a fable model

residuals.AR {fable} | R Documentation

## Extract residuals from a fable model

### Description

Extracts the residuals.

### Usage

    ## S3 method for class 'AR'
    residuals(object, type = c("innovation", "regression"), ...)

### Arguments

`object` | The time series model used to produce the forecasts
`type` | The type of residuals to extract.
`...` | Additional arguments for forecast model methods.

### Value

A vector of fitted residuals.

### Examples

    as_tsibble(lh) %>%
      model(AR(value ~ order(3))) %>%
      residuals()

[Package fable version 0.3.1 Index]