Seasonally Decomposed Missing Value Imputation

Description

Removes the seasonal component from the time series, performs imputation on the deseasonalized series and afterwards adds the seasonal component again.

Usage

1
na.seadec(x, algorithm = "interpolation", ...)

Arguments

x

Numeric Vector (vector) or Time Series (ts) object in which missing values shall be replaced

algorithm

Algorithm to be used after decomposition. Accepts the following input:

  • "interpolation" - Imputation by Interpolation

  • "locf" - Imputation by Last Observation Carried Forward

  • "mean" - Imputation by Mean Value

  • "random" - Imputation by Random Sample

  • "kalman" - Imputation by Kalman Smoothing and State Space Models

  • "ma" - Imputation by Weighted Moving Average

...

Additional parameters for these algorithms that can be passed through. Look at na.interpolation, na.locf, na.random, na.mean for parameter options.

Value

Vector (vector) or Time Series (ts) object (dependent on given input at parameter x)

Author(s)

Steffen Moritz

See Also

na.interpolation, na.kalman, na.locf, na.ma, na.mean, na.random, na.replace, na.seasplit

Examples

1
2
3
4
5
#Example 1: Perform seasonal imputation using algorithm = "interpolation"
na.seadec(tsAirgap, algorithm = "interpolation")

#Example 2: Perform seasonal imputation using algorithm = "mean"
na.seadec(tsAirgap, algorithm = "mean")