mtar {mtarm} | R Documentation |
Bayesian estimation of a multivariate threshold autoregressive (TAR) model.
Description
This function uses Gibbs sampling to generate a sample from the posterior
distribution of the parameters of a multivariate TAR model when the noise
process follows Gaussian, Student-t
, Slash, Symmetric Hyperbolic,
Contaminated normal, or Laplace distribution.
Usage
mtar(
formula,
data,
subset,
Intercept = TRUE,
ars,
row.names,
dist = "Gaussian",
prior = list(),
n.sim = 500,
n.burnin = 100,
n.thin = 1,
log = FALSE,
...
)
Arguments
formula |
a three-part expression of type |
data |
an (optional) data frame, list or environment (or object coercible by
as.data.frame to a data frame) containing the variables in the model.
If not found in data, the variables are taken from |
subset |
an (optional) vector specifying a subset of observations to be used in the fitting process. |
Intercept |
an (optional) logical variable. If |
ars |
a list composed of three objects, namely: |
row.names |
an (optional) vector that allows the user to name the time point to which each row in the data set corresponds. |
dist |
an (optional) character string that allows the user to specify the multivariate
distribution to be used to describe the behavior of the noise process. The
available options are: Gaussian ("Gaussian"), Student- |
prior |
an (optional) list that allows the user to specify the values of the hyperparameters, that is, allows to specify the values of the parameters of the prior distributions. |
n.sim |
an (optional) positive integer specifying the required number of iterations
for the simulation after the burn-in period. As default, |
n.burnin |
an (optional) positive integer specifying the required number of burn-in
iterations for the simulation. As default, |
n.thin |
an (optional) positive integer specifying the required thinning interval
for the simulation. As default, |
log |
an (optional) logical variable. If |
... |
further arguments passed to or from other methods. |
Value
an object of class mtar in which the main results of the model fitted to the data are stored, i.e., a list with components including
chains | list with several arrays, which store the values of each model parameter in each iteration of the simulation, |
n.sim | number of iterations of the simulation after the burn-in period, |
n.burnin | number of burn-in iterations in the simulation, |
n.thin | thinning interval in the simulation, |
regim | number of regimes, |
ars | list composed of three objects, namely: p , q and d ,
each of which corresponds to a vector of non-negative integers with as
many elements as there are regimes in the TAR model, |
dist | name of the multivariate distribution used to describe the behavior of the noise process, |
threshold.series | vector with the values of the threshold series, |
response.series | matrix with the values of the output series, |
covariable.series | matrix with the values of the exogenous series, |
Intercept | If TRUE , then the model included an intercept term, |
formula | the formula, |
call | the original function call. |
References
Nieto, F.H. (2005) Modeling Bivariate Threshold Autoregressive Processes in the Presence of Missing Data. Communications in Statistics - Theory and Methods, 34, 905-930.
Romero, L.V. and Calderon, S.A. (2021) Bayesian estimation of a multivariate TAR model when the noise process follows a Student-t distribution. Communications in Statistics - Theory and Methods, 50, 2508-2530.
Calderon, S.A. and Nieto, F.H. (2017) Bayesian analysis of multivariate threshold autoregressive models with missing data. Communications in Statistics - Theory and Methods, 46, 296-318.
See Also
Examples
###### Example 1: Returns of the closing prices of three financial indexes
data(returns)
fit1 <- mtar(~ COLCAP + BOVESPA | SP500, row.names=Date, dist="Slash",
data=returns, ars=list(p=c(1,1,2)), n.burnin=100, n.sim=3000)
summary(fit1)
###### Example 2: Rainfall and two river flows in Colombia
data(riverflows)
fit2 <- mtar(~ Bedon + LaPlata | Rainfall, row.names=Date, dist="Laplace",
data=riverflows, ars=list(p=c(5,5,5)), n.burnin=100, n.sim=3000)
summary(fit2)