R-miss-tastic

A resource website on missing values - Methods and references for managing missing data

Package:

imputeTS

Category:

Time-Series Imputation, Visualisations for Missing Data

Use-Cases:

Imputation for univariate time series, Imputation of Sensor data, Visualization of time series missing data

Popularity:

CRAN Downloads

Description:

Imputation (replacement) of missing values in univariate time series. Offers several imputation functions and missing data plots. Available imputation algorithms include: ‘Mean’, ‘LOCF’, ‘Interpolation’, ‘Moving Average’, ‘Seasonal Decomposition’, ‘Kalman Smoothing on Structural Time Series models’, ‘Kalman Smoothing on ARIMA models’.

Last update:

CRAN Release

Algorithms:
  • Mean imputation (mean, mode, median)
  • Last observation carried forward (locf)
  • Next observation carried backward (nocb)
  • Linear interpolation
  • Spline interpolation
  • Stineman interpolation
  • Simple Moving Average
  • Linear Weighted Moving Average
  • Exponentially Weighted Moving Average
  • Seasonal Decomposition based imputation
  • Seasonal Split based imputation
  • Kalman Smoothing on Structural Time Series models
  • Kalman Smoothing on ARIMA models’
Datasets:
  • tsAirgap (airpass dataset - Monthly totals of international airline passengers, 1949 to 1960)
  • tsNH4 (Time series of NH4 concentration in a wastewater system)
  • tsHeating (Time series of a heating systems supply temperature)
Further Information:
Input:

vector, ts, data.frame, zoo, xts

Example:
library(imputeTS)

print("print time-series with NAs")
print(tsAirgap)

#perform the missing value replacement
imp <- na.mean(tsAirgap) 

print("print the series with the imputations")
print(imp)

#Visualize the imputations
plotNA.imputations(imp, x.withNA = tsAirgap)gap)

Here you can have a interactive look at the example:

https://rdrr.io/snippets/embedding/


Share