Seasonally Splitted Missing Value Imputation

Share:

Description

Splits the times series into seasons and afterwards performs imputation separately for each of the resulting time series datasets (each containing the data for one specific season).

Usage

1
na.seasplit(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 splits. 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.seadec

Examples

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

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