Learn R Programming

imputeTS (version 1.5)

na.seasplit: Seasonally Splitted Missing Value Imputation

Description

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

Usage

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

Value

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

item

...

See Also

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

Examples

Run this code
#Prerequisite: Load a time series with missing values
x <- tsAirgap

#Example 1: Perform seasonal splitted imputation using algortihm = "interpolation"
na.seasplit(x, algorithm = "interpolation")

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

Run the code above in your browser using DataLab