fastts

Fast, effective, time series modeling with seasonality and exogenous variables via the sparsity-ranked lasso

https://github.com/petersonr/fastts

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 5 DOI reference(s) in README
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (18.0%) to scientific vocabulary
Last synced: 9 months ago · JSON representation

Repository

Fast, effective, time series modeling with seasonality and exogenous variables via the sparsity-ranked lasso

Basic Info
Statistics
  • Stars: 5
  • Watchers: 1
  • Forks: 0
  • Open Issues: 3
  • Releases: 2
Created about 4 years ago · Last pushed over 1 year ago
Metadata Files
Readme License

README.Rmd

---
output: github_document
---



```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
```

# fastTS


[![Codecov test coverage](https://codecov.io/gh/petersonR/fastTS/branch/main/graph/badge.svg)](https://app.codecov.io/gh/petersonR/fastTS?branch=main)
[![R-CMD-check](https://github.com/petersonR/fastTS/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/petersonR/fastTS/actions/workflows/R-CMD-check.yaml)
[![CRAN status](https://www.r-pkg.org/badges/version/fastTS)](https://CRAN.R-project.org/package=fastTS)


## Overview

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)](https://doi.org/10.1007/s10182-021-00431-7) 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)](https://doi.org/10.1177/1471082X231225307). 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

## Installation

You can install the development version of `fastTS` like so:

```{r install, eval = FALSE}
# install.packages("remotes")
remotes::install_github("PetersonR/fastTS")
```

Or, install from CRAN with:

```{r install_cran, eval = FALSE}
install.packages("fastTS")
```

## Example

This is a basic example with the [sunspot monthly series](https://stat.ethz.ch/R-manual/R-devel/library/datasets/html/sunspot.month.html). 

```{r example}
library(fastTS)

data("sunspot.month")
fit <- fastTS(sunspot.month)

fit
```

## Learn more

To learn more and to see this methodology in action, see: 

- [Simple case studies vignette](https://petersonr.github.io/fastTS/articles/case_studies.html)
- [Modeling hourly ER arrival data with complex seasonality](https://petersonr.github.io/fastTS/articles/hourly_er_visits.html)
- [Did Denver’s 2022 ‘Zero Fare for Cleaner Air’ campaign actually work?](https://data-diction.com/posts/did-denver-zero-fare-policy-work/#modeling)

Owner

  • Name: Ryan Peterson
  • Login: petersonR
  • Kind: user
  • Location: Denver, CO

Assistant Professor of Biostatistics at the Colorado School of Public Health at the University of Colorado.

GitHub Events

Total
  • Release event: 1
  • Watch event: 2
  • Push event: 4
  • Create event: 1
Last Year
  • Release event: 1
  • Watch event: 2
  • Push event: 4
  • Create event: 1

Packages

  • Total packages: 1
  • Total downloads:
    • cran 241 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 4
  • Total maintainers: 1
cran.r-project.org: fastTS

Fast Time Series Modeling for Seasonal Series with Exogenous Variables

  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 241 Last month
Rankings
Dependent packages count: 28.1%
Dependent repos count: 36.0%
Average: 49.5%
Downloads: 84.4%
Last synced: 10 months ago

Dependencies

DESCRIPTION cran
  • RcppRoll * imports
  • butcher * imports
  • dplyr * imports
  • methods * imports
  • ncvreg * imports
  • rlang * imports
  • yardstick * imports
  • covr * suggests
  • kableExtra * suggests
  • knitr * suggests
  • magrittr * suggests
  • rmarkdown * suggests
  • testthat >= 3.0.0 suggests
.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml actions
  • JamesIves/github-pages-deploy-action v4.4.1 composite
  • actions/checkout v3 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/test-coverage.yaml actions
  • actions/checkout v3 composite
  • actions/upload-artifact v3 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite