knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The fastTS
package efficiently fits long, high-frequency time series with complex seasonality, even with a high-dimensional exogenous feature set. It implements the sparsity-ranked lasso (and similar methods) for time series data.
Originally described in Peterson and Cavanaugh (2022) in the context of variable selection with interactions and/or polynomials, ranked sparsity is a philosophy of variable selection in the presence of prior informational asymmetry.
This package implements such methods for fast fitting of time series data with complex seasonality or exogenous features. More information is included in Peterson and Cavanaugh (2024). The basic premise is to utilize the sparsity-ranked lasso (or similar) to be less skeptical of more recent lags, and suspected seasonal relationships.
Please cite fastTS
as:
Peterson R. A. & Cavanaugh J. E. (2024). Fast, effective, and coherent time series modelling using the sparsity-ranked lasso. Statistical Modelling. doi:10.1177/1471082X231225307
You can install the development version of fastTS
like so:
# install.packages("remotes") remotes::install_github("PetersonR/fastTS")
Or, install from CRAN with:
install.packages("fastTS")
This is a basic example with the sunspot monthly series.
library(fastTS) data("sunspot.month") fit <- fastTS(sunspot.month) fit
To learn more and to see this methodology in action, see:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.