interpolate: Interpolate missing values

Description Usage Arguments Examples

Description

Uses a fitted model to interpolate missing values from a dataset.

Usage

1
2
3
4
5
## S3 method for class 'mdl_df'
interpolate(object, new_data, ...)

## S3 method for class 'mdl_ts'
interpolate(object, new_data, ...)

Arguments

object

A mable containing a single model column.

new_data

A dataset with the same structure as the data used to fit the model.

...

Other arguments passed to interpolate methods.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(fable)
library(tsibbledata)

# The fastest running times for the olympics are missing for years during 
# world wars as the olympics were not held.
olympic_running

olympic_running %>% 
  model(TSLM(Time ~ trend())) %>% 
  interpolate(olympic_running)

fabletools documentation built on Nov. 29, 2021, 9:08 a.m.