fitted.VAR: Extract fitted values from a fable model

View source: R/var.R

fitted.VARR Documentation

Extract fitted values from a fable model

Description

Extracts the fitted values.

Usage

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

Arguments

object

A model for which forecasts are required.

...

Other arguments passed to methods

Value

A vector of fitted values.

Examples

lung_deaths <- cbind(mdeaths, fdeaths) %>%
  as_tsibble(pivot_longer = FALSE)

lung_deaths %>%
  model(VAR(vars(mdeaths, fdeaths) ~ AR(3))) %>%
  fitted()

fable documentation built on March 31, 2023, 8:13 p.m.