TARMA.fit2 | R Documentation |
Maximum Likelihood fit of a two-regime TARMA(p1,p2,q,q)
model with common MA parameters, possible common AR parameters and possible covariates.
TARMA.fit2(
x,
ar.lags = NULL,
tar1.lags = c(1),
tar2.lags = c(1),
ma.ord = 1,
sma.ord = 0L,
period = NA,
threshold = NULL,
d = 1,
pa = 0.25,
pb = 0.75,
thd.var = NULL,
include.int = TRUE,
x.reg = NULL,
optim.control = list(),
...
)
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 |
threshold |
Threshold parameter. 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 |
Fits the following two-regime TARMA
process with optional components: linear AR
part, seasonal MA
and covariates.
\mjdeqnX_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
\beginarrayll
\phi_1,0 + \sum_i \in I_1 \phi_1,i X_t-i & \mathrmif X_t-d \leq \mathrmthd \\\
&\\\
\phi_2,0 + \sum_i \in I_2 \phi_2,i X_t-i & \mathrmif X_t-d > \mathrmthd
\endarray
\right. X[t] = \phi[0] + \Sigma_h in I \phi[h] X[t-h] + \Sigma_j = 1,..,q \theta[j] \epsilon[t-j] + \Sigma_j = 1,..,Q \Theta[j] \epsilon[t-js] + \Sigma_k = 1,..,K \delta[k] Z[k] + \epsilon[t] +
+ \phi[1,0] + \Sigma_i in I_1 \phi[1,i] X[t-i] – if X[t-d] <= thd
+ \phi[2,0] + \Sigma_i in I_2 \phi[2,i] X[t-i] – if X[t-d] > thd
where \mjeqn\phi_h\phi[h] are the common AR parameters and \mjseqnh ranges in I = ar.lags
. \mjeqn\theta_j\theta[j] are the common MA parameters and \mjeqnj = 1,...,qj = 1,...,q
(q = ma.ord
), \mjeqn\Theta_l\Theta[l] are the common seasonal MA parameters and \mjeqnl = 1,...,Ql = 1,...,Q (Q = sma.ord
)
\mjeqn\delta_k\delta[k] are the parameters for the covariates. Finally, \mjeqn\phi_1,i\phi[1,i] and \mjeqn\phi_2,i\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.
A list of class TARMA
with components:
fit
- The output of the fit. It is a arima
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 covariates x.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 slot ar.lags
include.int
- Same as the input slot include.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.
Simone Giannerini, simone.giannerini@uniud.it
Greta Goracci, greta.goracci@unibz.it
Gia21tseriesTARMA
Cha19tseriesTARMA
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.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.