TARMA.fit2 {tseriesTARMA} | R Documentation |
TARMA Modelling of Time Series
Description
Maximum Likelihood fit of a two-regime TARMA(p1,p2,q,q)
model with common MA parameters, possible common AR parameters and possible covariates.
Usage
TARMA.fit2(
x,
ar.lags = NULL,
tar1.lags = c(1),
tar2.lags = c(1),
ma.ord = 1,
sma.ord = 0L,
period = NA,
estimate.thd = TRUE,
threshold,
d = 1,
pa = 0.25,
pb = 0.75,
thd.var = NULL,
include.int = TRUE,
x.reg = NULL,
optim.control = list(),
...
)
Arguments
x |
A univariate time series. |
ar.lags |
Vector of common AR lags. Defaults to |
tar1.lags |
Vector of AR lags for the lower regime. It can be a subset of |
tar2.lags |
Vector of AR lags for the upper regime. It can be a subset of |
ma.ord |
Order of the MA part (also called |
sma.ord |
Order of the seasonal MA part (also called |
period |
Period of the seasonal MA part (also called |
estimate.thd |
Logical. If |
threshold |
Threshold parameter. Used only if |
d |
Delay parameter. Defaults to |
pa |
Real number in |
pb |
Real number in |
thd.var |
Optional exogenous threshold variable. If |
include.int |
Logical. If |
x.reg |
Covariates to be included in the model. These are passed to |
optim.control |
List of control parameters for the optimization method. |
... |
Additional arguments passed to |
Details
Fits the following two-regime TARMA
process with optional components: linear AR
part, seasonal MA
and covariates.
\[X_{t} = \phi_{0} + \sum_{h \in I} \phi_{h} X_{t-h} + \sum_{l=1}^Q \Theta_{l} \epsilon_{t-ls} + \sum_{j=1}^q \theta_{j} \epsilon_{t-j} + \sum_{k=1}^K \delta_{k} Z_{k} + \epsilon_{t} + \left\lbrace
\begin{array}{ll}
\phi_{1,0} + \sum_{i \in I_1} \phi_{1,i} X_{t-i} & \mathrm{if } X_{t-d} \leq \mathrm{thd} \\
&\\
\phi_{2,0} + \sum_{i \in I_2} \phi_{2,i} X_{t-i} & \mathrm{if } X_{t-d} > \mathrm{thd}
\end{array}
\right. \]
where \(\phi_h\) are the common AR parameters and \(h\) ranges in I = ar.lags
. \(\theta_j\) are the common MA parameters and \(j = 1,\dots,q\)
(q = ma.ord
), \(\Theta_l\) are the common seasonal MA parameters and \(l = 1,\dots,Q\) (Q = sma.ord
)
\(\delta_k\) are the parameters for the covariates. Finally, \(\phi_{1,i}\) and \(\phi_{2,i}\) are the TAR parameters
for the lower and upper regime, respectively and I1 = tar1.lags
I2 = tar2.lags
are the vector of TAR lags.
Value
A list of class TARMA
with components:
-
fit
- The output of the fit. It is aarima
object. -
aic
- Value of the AIC for the minimised least squares criterion over the threshold range. -
bic
- Value of the BIC for the minimised least squares criterion over the threshold range. -
aic.v
- Vector of values of the AIC over the threshold range. -
thd.range
- Vector of values of the threshold range. -
d
- Delay parameter. -
thd
- Estimated threshold. -
phi1
- Estimated AR parameters for the lower regime. -
phi2
- Estimated AR parameters for the upper regime. -
theta1
- Estimated MA parameters for the lower regime. -
theta2
- Estimated MA parameters for the upper regime. -
delta
- Estimated parameters for the covariatesx.reg
. -
tlag1
- TAR lags for the lower regime -
tlag2
- TAR lags for the upper regime -
mlag1
- TMA lags for the lower regime -
mlag2
- TMA lags for the upper regime -
arlag
- Same as the input slotar.lags
-
include.int
- Same as the input slotinclude.int
-
se
- Standard errors for the parameters. Note that they are computed conditionally upon the threshold so that they are generally smaller than the true ones. -
rss
- Minimised residual sum of squares. -
method
- Estimation method. -
call
- The matched call.
Author(s)
Simone Giannerini, simone.giannerini@unibo.it
Greta Goracci, greta.goracci@unibz.it
References
-
Giannerini S, Goracci G (2021). “Estimating and Forecasting with TARMA models.” University of Bologna.
-
Chan K, Goracci G (2019). “On the Ergodicity of First-Order Threshold Autoregressive Moving-Average Processes.” J. Time Series Anal., 40(2), 256-264.
See Also
TARMA.fit
for Least Square estimation of full subset TARMA
models. print.TARMA
for print methods for TARMA
fits.
predict.TARMA
for prediction and forecasting.
Examples
## a TARMA(1,1,1,1)
set.seed(127)
x <- TARMA.sim(n=100, phi1=c(0.5,-0.5), phi2=c(0,0.8), theta1=0.5, theta2=0.5, d=1, thd=0.2)
fit1 <- TARMA.fit2(x, tar1.lags=1, tar2.lags=1, ma.ord=1, d=1)
## Showcase of the fit with covariates ---
## simulates from a TARMA(3,3,1,1) model with common MA parameter
## and common AR(1) and AR(2) parameters. Only the lag 3 parameter varies across regimes
set.seed(212)
n <- 300
x <- TARMA.sim(n=n, phi1=c(0.5,0.3,0.2,0.4), phi2=c(0.5,0.3,0.2,-0.2), theta1=0.4, theta2=0.4,
d=1, thd=0.2, s1=1, s2=1)
## FIT 1: estimates lags 1,2,3 as threshold lags ---
fit1 <- TARMA.fit2(x, ma.ord=1, tar1.lags=c(1,2,3), tar2.lags=c(1,2,3), d=1)
## FIT 2: estimates lags 1 and 2 as fixed AR and lag 3 as the threshold lag
fit2 <- TARMA.fit2(x, ma.ord=1, tar1.lags=c(3), tar2.lags=c(3), ar.lags=c(1,2), d=1)
## FIT 3: creates lag 1 and 2 and fits them as covariates ---
z1 <- lag(x,-1)
z2 <- lag(x,-2)
fit3 <- TARMA.fit2(x, ma.ord=1, tar1.lags=c(3), tar2.lags=c(3), x.reg=ts.intersect(z1,z2), d=1)
## FIT 4: estimates lag 1 as a covariate, lag 2 as fixed AR and lag 3 as the threshold lag
fit4 <- TARMA.fit2(x, ma.ord = 1, tar1.lags=c(3), tar2.lags=c(3), x.reg=z1, ar.lags=2, d=1)