interpolate_missing: Interpolate missing values

View source: R/interpolate_missing.R

interpolate_missingR Documentation

Interpolate missing values

Description

The function interpolate_missing() is a wrapper for forecast::na.interp(), working with numeric vectors. For non-seasonal time series, linear interpolation is used and for seasonal time series, the series is decomposed via STL and the seasonally adjusted series is linearly interpolated and the seasonal component is added back.

Usage

interpolate_missing(x, periods, ...)

Arguments

x

Numeric vector.

periods

Numeric vector. The seasonal periods of the time series.

...

Further arguments passed to forecast::msts() or forecast::na.interp().

Value

Numeric vector.


ahaeusser/tscv documentation built on July 26, 2023, 3:18 p.m.