btsr-package {BTSR} | R Documentation |
Bounded Time Series Regression
Description
The BTSR package provides a unified framework for simulating, fitting, and forecasting bounded time series regression models. It supports a wide range of models, including i.i.d., regression, ARMA-like, and ARFIMA-like models, with a focus on bounded time series data.
Key features of the BTSR package include
Simulation of bounded time series data using various models.
Estimation of model parameters using efficient algorithms.
Forecasting future values based on fitted models.
Support for both short-memory and long-memory models.
Flexible link functions and error scales.
Mathematical Notation
The BTSR package is based on the following mathematical framework
-
Y_t
: The bounded random variable at timet
, withY_t \in (a, b)
. -
\mathcal{F}_t
: The\sigma
-field generated by information up to timet
. -
\mu_t, \nu_t
: Parameters of the conditional distribution ofY_t
. -
\vartheta_t
: A transformation of\nu_t
(e.g.,\vartheta_t = \nu_t^2
). -
\eta_{1t}, \eta_{2t}
: Linear predictors for\mu_t
and\vartheta_t
, respectively. -
\phi, \theta
: Autoregressive (AR) and moving average (MA) coefficients. -
d
: Fractional differencing parameter, controlling long-memory behavior. -
e_{1t}, e_{2t}
: Error terms for each part of the model (see the model definition for details).
The BTSR Structure
Let \{Y_t\}_{t\in \mathbb{Z}}
be a stochastic process for which
Y_t \in (a, b)
with probability 1 (a
and b
not necessarily
finite), for all t \in \mathbb{Z}
, and let \mathcal{F}_{t}
denote
the \sigma
-field generated by the information observed up to time
t
. The general structure of a BTSR model is as follows
\begin{aligned}
Y_t | \mathcal{F}_{t-1} & \sim f(\cdot |\mu_t, \nu_t), \quad \vartheta_t = g_2(\nu_t)\\
\eta_{1t} = g_{11}(\mu_t) & =\alpha_1 + \boldsymbol{X}_{1t}'\boldsymbol{\beta}_1 +
\sum_{i=1}^{p_1} \phi_{1i}[g_{12}(Y_{t-i})-I_{X_1}\boldsymbol{X}_{1(t-i)}'\boldsymbol{\beta}_1] +
\xi_t, \quad \text{(part 1)}\\
\eta_{2t} = g_{21}(\vartheta_t) & =\alpha_2 + \boldsymbol{X}_{2t}' \boldsymbol{\beta}_2 +
\sum_{i=1}^{p_2} \phi_{2i}[g_{22}(\vartheta_{t-i})-I_{X_2}\boldsymbol{X}_{2(t-i)}'\boldsymbol{\beta}_2] +
\sum_{k=1}^\infty c_{2k} e_{2,t-k}, \quad \text{(part 2)}
\end{aligned}
with \xi_t
depending on the model, controlled by the argument model
,
\xi_t = \begin{cases}
h(T^{t-1}(U_0)), & \text{if } \code{model = "BARC"},\\
\sum_{k=1}^\infty c_{1k} e_{1,t-k}, & \text{otherwise},
\end{cases}
e_{1,t}
depending on the error.scale
adopted
e_{1,t} = g_{13}(Y_t, \mu_t) = \begin{cases}
Y_t - \mu_t, & \text{if } \code{error.scale = 0} \text{ (data scale)},\\
g_{11}(Y_t) - g_{11}(\mu_t), & \text{if } \code{error.scale = 1} \text{ (predictive scale)}
\end{cases}
and e_{2,t} = g_{23}(e_{1,t})
, where
-
I_{X_1}
,I_{X_2}
are indicator functions, which control whether the regressors should be included in the AR part of the equation. These functions are controlled by the argumentxregar
as follows:xregar = FALSE
corresponds toI_{X} = 0
andxregar = TRUE
corresponds toI_{X} = 1
. Ifxregar = FALSE
, the corresponding argumentxreg
is not included in the AR part of the model. -
g_{13}
is a function ofY_t
and\mu_t
, defined by the error scale adopted. -
g_2
andg_{ij}
,i,j \in \{1,2\}
, andg_{23}
are link functions defined in the argumentlinkg
. Notice that the linksg_{ij}
are only used in the AR part of the model and, typically,g_{i1} = g_{i2}
for eachi \in \{1,2\}
. The linkg_2
might depend on the distribution adopted. Finally,g_{23}
is a link function that transforms the error terme_{1t}
. -
h
is the link function for BARC models, defined in the argumentlinkh
. -
\{c_{ik}\}_{k \geq 1}
are the coefficients obtained through the relation\theta_i(z) = \sum_{k = 0}^{q_i} \theta_{ik}z^k \quad \text{and} \quad (1-L)^{-d_i}\theta_i(z) = \sum_{k = 0}^\infty c_{ik}z^k, \quad i \in \{1,2\}.
In particular, if
d_i = 0
, thenc_{ik} = \theta_{ik}
, fork = 1, \dots, q_i
.
Author(s)
Taiane Schaedler Prass taianeprass@gmail.com, Guilherme Pumi guipumi@gmail.com
References
Bayer FM, Bayer DM, Pumi G (2017). “Kumaraswamy autoregressive moving average models for double bounded environmental data.” Journal of Hydrology, 555, 385–396. doi:10.1016/j.jhydrol.2017.10.006.
Pumi G, Valk M, Bisognin C, Bayer FM, Prass TS (2019). “Beta autoregressive fractionally integrated moving average models.” Journal of Statistical Planning and Inference, 200, 196–212. doi:10.1016/j.jspi.2018.10.001.
Pumi G, Prass TS, Souza RR (2021). “A dynamic model for double bounded time series with chaotic driven conditional averages.” Scandinavian Journal of Statistics, 48(1), 68–86. doi:10.1111/sjos.12439.
Pumi G, Prass TS, Taufemback CG (2024). “Unit-Weibull autoregressive moving average models.” TEST, 33, 204–229. doi:10.1007/s11749-023-00893-8.
Pumi G, Prass TS, Taufemback CG (2024). “Publisher Correction: Unit-Weibull autoregressive moving average models.” TEST, 33, 358–359. doi:10.1007/s11749-023-00905-7.
Pumi G, Matsuoka DH, Prass TS (2025). “A GARMA Framework for Unit-Bounded Time Series Based on the Unit-Lindley Distribution with Application to Renewable Energy Data.” doi:10.48550/arXiv.2504.07351.
Pumi G, Matsuoka DH, Prass TS, Palm BG (2025). “A Matsuoka-Based GARMA Model for Hydrological Forecasting: Theory, Estimation, and Applications.” doi:10.48550/arXiv.2502.18645.
Prass TS, Pumi G, Taufemback CG, Carlos JH (2025). “Positive time series regression models: theoretical and computational aspects.” Computational Statistics, 40, 1185–1215. doi:10.1007/s00180-024-01531-z.
See Also
For detailed examples and usage instructions, see the documentation for individual functions
-
btsr.sim: Simulate bounded time series data.
-
btsr.extract: Extract components of a BTSR model, for a given set of parameters
-
btsr.fit: Fit a BTSR model to data.
-
predict: Forecast future values using a fitted model.
-
arguments: Shared documentation for arguments
Examples
#----------------------------
# Quickstart examples.
#----------------------------
# Example 1: Simulate i.i.d. samples
set.seed(1234)
y1 <- btsr.sim(model = "BETA", n = 1000, coefs = list(alpha = 0.2, nu = 20))
hist(y1)
# Example 2: Simulate ARMA-like model with fixed nu
y2 <- btsr.sim(
model = "BARMA", n = 100, link = "logit",
coefs = list(alpha = 0.2, phi = 0.5, theta = 0.3, nu = 20)
)
plot(y2, type = "l")