Enhanced Seasonal Decomposition of Time Series by Loess

Decompose a time series into seasonal, trend, and remainder components using an implementation of Seasonal Decomposition of Time Series by Loess (STL) that provides several enhancements over the STL method in the stats package. These enhancements include handling missing values, providing higher order (quadratic) loess smoothing with automated parameter choices, frequency component smoothing beyond the seasonal and trend components, and some basic plot methods for diagnostics.

Build Status


This package contains enhancements to the Seasonal Trend Decomposition using Loess (STL) implementation that comes with base R, stl().

Here are some of the added features over stl():

  • Can handle NA values
  • Higher order loess smoothing (more than just local constant and linear)
  • Automated parameter choices for local quadratic
  • Frequency component smoothing beyond seasonal and trend
  • Plot methods for diagnostics

For (very) experimental inference, prediction, and variance reduction at endpoints, see the operator package.





This software is released under the BSD license. Please read the license document.


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.5.1 by Ryan Hafen, 6 years ago


Report a bug at https://github.com/hafen/stlplus/issues

Browse source code at https://github.com/cran/stlplus

Authors: Ryan Hafen [aut, cre]

Documentation:   PDF Manual  

Task views: Time Series Analysis, Missing Data

BSD_3_clause + file LICENSE license

Imports lattice, yaImpute, stats, Rcpp

Suggests testthat

Linking to Rcpp

Imported by ATAforecasting, KarsTS, PVplr, TTAinterfaceTrendAnalysis.

Suggested by bfast.

See at CRAN