Bayesian estimation of a multivariate threshold autoregressive (TAR) model.
Bayesian estimation of a multivariate threshold autoregressive (TAR) model.
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.
formula: a three-part expression of type Formula describing the TAR model to be fitted to the data. In the first part, the variables in the multivariate output series are listed; in the second part, the threshold series is specified, and in the third part, the variables in the multivariate exogenous series are specified.
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 environment(formula), typically the environment from which mtar is called.
subset: an (optional) vector specifying a subset of observations to be used in the fitting process.
Intercept: an (optional) logical variable. If TRUE, then the model includes an intercept.
ars: a 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.
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-t ("Student-t"), Slash ("Slash"), Symmetric Hyperbolic ("Hyperbolic"), Laplace ("Laplace"), and contaminated normal ("Contaminated normal"). As default, dist is set to "Gaussian".
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.sim is set to 500.
n.burnin: an (optional) positive integer specifying the required number of burn-in iterations for the simulation. As default, n.burnin is set to 100.
n.thin: an (optional) positive integer specifying the required thinning interval for the simulation. As default, n.thin is set to 1.
log: an (optional) logical variable. If TRUE, then the behaviour of the output series is described using the exponentiated version of dist.
...: further arguments passed to or from other methods.
Returns
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.
Examples
###### Example 1: Returns of the closing prices of three financial indexesdata(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 Colombiadata(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)
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.