## stlplus

[![R-CMD-check](https://github.com/hafen/stlplus/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/hafen/stlplus/actions/workflows/R-CMD-check.yaml)
[![CRAN](http://www.r-pkg.org/badges/version/stlplus)](https://CRAN.R-project.org/package=stlplus)
![](http://cranlogs.r-pkg.org/badges/stlplus)

![png](https://cloud.githubusercontent.com/assets/1275592/11673681/b7fce548-9dcf-11e5-8cd2-f3311b501ab9.png)

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](https://github.com/hafen/operator) package.

## References

- Cleveland, R. B., Cleveland, W. S., McRae, J. E., & Terpenning, I. (1990). STL: A seasonal-trend decomposition procedure based on loess. *Journal of Official Statistics*, 6(1), 3-73.
- Hafen, R. P. "Local regression models: Advancements, applications, and new methods." (2010). <https://docs.lib.purdue.edu/dissertations/AAI3413793/>

## Installation

CRAN:

```s
install.packages("stlplus")
```

Github:

```s
devtools::install_github("hafen/stlplus")
```

## License

This software is released under the BSD license.  Please read the [license](https://github.com/hafen/stlplus/blob/master/LICENSE.md) document.

