Bounded Time Series Regression

Simulate, estimate and forecast a wide range of regression based dynamic models for bounded time series, covering the most commonly applied models in the literature. The main calculations are done in FORTRAN, which translates into very fast algorithms.


BTSR: Bounded Time Series Regression

CRAN status License: GPL v3

Overview

BTSR provides a unified R framework to simulate, extract components from, fit, and forecast a wide range of observation-driven regression models for bounded (and positive) time series. Core numerical routines (conditional likelihood evaluation, exact recursion, optimization via L-BFGS-B and Nelder-Mead, and residual diagnostics) are implemented in Fortran, combining high computational speed with a clean S3 interface in R.

Supported Models

The package covers i.i.d. samples, regression models, short-memory (*ARMA), long-memory (*ARFIMA), tempered fractional (*ARTFIMA), and chaotic (BARC) dynamics across six distributions. Appending V to a model name indicates a time-varying dispersion/precision parameter ($\nu_t$).

Distribution i.i.d. Regression Short Memory Long Memory Tempered Chaotic
Beta BETA BREG, BREGV BARMA, BARMAV BARFIMA, BARFIMAV BARTFIMA, BARTFIMAV BARC
Gamma GAMMA GREG, GREGV GARMA, GARMAV GARFIMA, GARFIMAV GARTFIMA, GARTFIMAV —
Kumaraswamy KUMA KREG, KREGV KARMA, KARMAV KARFIMA, KARFIMAV KARTFIMA, KARTFIMAV —
Matsuoka MATSU MREG MARMA MARFIMA MARTFIMA —
Unit-Lindley UL ULREG ULARMA ULARFIMA ULARTFIMA —
Unit-Weibull UW UWREG, UWREGV UWARMA, UWARMAV UWARFIMA, UWARFIMAV UWARTFIMA, UWARTFIMAV —

Run BTSR.models() in R to display the full list of supported models.

Key Features

  • Unified generic interface: Use btsr.sim(), btsr.extract(), and btsr.fit() with any supported model string, alongside standard S3 methods (print(), summary(), predict()).
  • Flexible link functions and constraints: Supports custom link functions (link.btsr()), fixed parameter values (fixed.values), fixed lags (fixed.lags), and parameter bounds (lower, upper).
  • Time-varying precision/dispersion (*V models): Jointly models both location ($\mu_t$) and dispersion/precision ($\nu_t$) dynamics.
  • Fast Fortran backend: Conditional maximum likelihood estimation via L-BFGS-B and Nelder-Mead, with automatic gradient/information calculation and fallback covariance estimation.
  • Residual diagnostics: Includes the Dominguez-Lobato martingale difference hypothesis test (dl.test()).

Installation

Install the released version from CRAN:

install.packages("BTSR")

Or install the development version from GitHub:

# install.packages("remotes")
remotes::install_github("tsprass/BTSR")

Quick Example

library(BTSR)

# Simulate a BARMA(1, 1) time series
set.seed(1234)
y <- btsr.sim(
  model = "BARMA",
  n = 300,
  burn = 100,
  coefs = list(alpha = 0.2, phi = 0.4, theta = -0.3, nu = 20)
)

# Fit the model via conditional maximum likelihood
fit <- btsr.fit(model = "BARMA", yt = y, p = 1, q = 1, report = FALSE)
summary(fit)

# Out-of-sample forecasting (5 steps ahead)
pred <- predict(fit, nnew = 5)
pred$forecast

# Martingale difference diagnostic test on residuals
dl.test(fit$error, B = 300, p = 1)

Main Functions

Function Description
btsr.sim() Simulate time series from any supported BTSR model
btsr.fit() Estimate parameters via conditional maximum likelihood
btsr.extract() Extract fitted values, residuals, log-likelihood, score, and forecasts for given parameters
predict() Compute out-of-sample forecasts for a fitted btsr object
BTSR.models() Print the summary table of supported distributions and model classes
BTSR.model.defaults() Inspect default settings (links, bounds, flags) for a given model
fit.control() Configure optimizer (L-BFGS-B or Nelder-Mead) and convergence settings
link.btsr() Evaluate supported link functions, their inverses, and derivatives
coefs.start() Compute starting parameter values for estimation
dl.test() Perform the Dominguez-Lobato (2003) martingale difference test

References

  • BARMA: Rocha, A. V., & Cribari-Neto, F. (2009). Beta autoregressive moving average models. TEST, 18, 529–545. https://doi.org/10.1007/s11749-008-0112-z
  • KARMA: Bayer, F. M., Bayer, D. M., & Pumi, G. (2017). Kumaraswamy autoregressive moving average models for double bounded environmental data. Journal of Hydrology, 555, 385–396. https://doi.org/10.1016/j.jhydrol.2017.10.006
  • BARFIMA: Pumi, G., Valk, M., Bisognin, C., Bayer, F. M., & Prass, T. S. (2019). Beta autoregressive fractionally integrated moving average models. Journal of Statistical Planning and Inference, 200, 196–212. https://doi.org/10.1016/j.jspi.2018.10.001
  • BARC: Pumi, G., Prass, T. S., & Souza, R. R. (2021). A dynamic model for double bounded time series with chaotic driven conditional averages. Scandinavian Journal of Statistics, 48(1), 68–86. https://doi.org/10.1111/sjos.12439
  • UWARMA: Pumi, G., Prass, T. S., & Taufemback, C. G. (2024). Unit-Weibull autoregressive moving average models. TEST, 33, 204–229. https://doi.org/10.1007/s11749-023-00893-8
  • Positive TSR: Prass, T. S., Pumi, G., Taufemback, C. G., & Carlos, J. H. (2025). Positive time series regression models: theoretical and computational aspects. Computational Statistics, 40, 1185–1215. https://doi.org/10.1007/s00180-024-01531-z
  • ULARMA: Pumi, G., Matsuoka, D. H., & Prass, T. S. (2025). A GARMA Framework for Unit-Bounded Time Series Based on the Unit-Lindley Distribution with Application to Renewable Energy Data. arXiv:2504.07351. https://doi.org/10.48550/arXiv.2504.07351
  • MARMA: Pumi, G., Matsuoka, D. H., Prass, T. S., & Palm, B. G. (2026). A Matsuoka-Based GARMA Model for Environmental and Energy Systems: Theory, Estimation, and Applications. Environmetrics, 37(3), e70095. https://doi.org/10.1002/env.70095
  • GARTFIMA: Pumi, G., Pandher, S. S., & Prass, T. S. (2026). GARTFIMA Models: A Class of Observation-Driven Models with Tempered Fractional Dynamics. arXiv:2607.19311. https://doi.org/10.48550/arXiv.2607.19311

Citation

To cite BTSR in publications, run citation("BTSR") in R.

License

GPL (>= 3)

Reference manual

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

install.packages("BTSR")

1.1.1 by Taiane Schaedler Prass, 4 hours ago


https://github.com/tsprass/BTSR


Report a bug at https://github.com/tsprass/BTSR/issues


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


Authors: Taiane Schaedler Prass [aut, cre, com] (ORCID: , Guilherme Pumi [ctb, aut] (ORCID: , Fábio Mariano Bayer [ctb] (ORCID: , Jack Joseph Dongarra [ctb] (LINPACK subroutines (dtrsl , dpofa , ddot)) , Cleve Moler [ctb] (LINPACK subroutines (dtrsl , dpofa , ddot)) , Gilbert Wright Stewart [ctb] (LINPACK subroutines (dtrsl , dpofa , ddot)) , Ciyou Zhu [ctb] (L-BFGS-B algorithm subroutines) , Richard H. Byrd [ctb] (L-BFGS-B algorithm subroutines) , Jorge Nocedal [ctb] (L-BFGS-B algorithm subroutines) , Jose Luis Morales [ctb] (L-BFGS-B algorithm subroutines) , Peihuang Lu-Chen [ctb] (L-BFGS-B algorithm subroutines) , John Burkardt [ctb] (Trigamma function (FORTRAN90 version)) , Alan Miller [ctb] (FORTRAN90 version of NSWC special function psi and amendments to minim subroutine) , D.E. Shaw [ctb] (Original minim subroutine) , Robert W.M. Wedderburn [ctb] (Amendments to minim subroutine)


Documentation:   PDF Manual  


GPL (>= 3) license


Imports Rdpack


See at CRAN