Applies a model specific estimation technique to predict the values of missing values in a tsibble, and replace them.

# S3 method for TSLM
interpolate(object, new_data, specials, ...)

Arguments

object

The time series model used to produce the forecasts

new_data

A tsibble containing future information used to forecast.

specials

(passed by fabletools::forecast.mdl_df()).

...

Additional arguments for forecast model methods.

Value

A tibble of the same dimension of new_data with missing values interpolated.

Examples

library(tsibbledata) olympic_running %>% model(lm = TSLM(Time ~ trend())) %>% interpolate(olympic_running)
#> # A tsibble: 312 x 4 [4Y] #> # Key: Length, Sex [14] #> Length Sex Year Time #> <int> <chr> <int> <dbl> #> 1 100 men 1896 12 #> 2 100 men 1900 11 #> 3 100 men 1904 11 #> 4 100 men 1908 10.8 #> 5 100 men 1912 10.8 #> 6 100 men 1916 10.8 #> 7 100 men 1920 10.8 #> 8 100 men 1924 10.6 #> 9 100 men 1928 10.8 #> 10 100 men 1932 10.3 #> # … with 302 more rows