| mtar | R Documentation |
This function implements a Gibbs sampling algorithm to draw samples from the
posterior distribution of the parameters of a multivariate Threshold Autoregressive (TAR)
model and its special cases as SETAR and VAR models. The procedure accommodates a wide
range of noise process distributions, including Gaussian, Student-t, Slash, Symmetric
Hyperbolic, Contaminated normal, Laplace, Skew-normal, and Skew-Student-t.
mtar(
formula,
data,
subset,
Intercept = TRUE,
trend = c("none", "linear", "quadratic"),
nseason = NULL,
ars = ars(),
row.names,
dist = c("Gaussian", "Student-t", "Hyperbolic", "Laplace", "Slash",
"Contaminated normal", "Skew-Student-t", "Skew-normal"),
prior = list(),
n.sim = 500,
n.burnin = 100,
n.thin = 1,
ssvs = FALSE,
setar = NULL,
progress = TRUE,
...
)
formula |
A three-part expression of class |
data |
A data frame containing the variables in the model. If not found in |
subset |
An optional vector specifying a subset of observations to be used in the fitting process. |
Intercept |
An optional logical indicating whether an intercept should be included within each regime. |
trend |
An optional character string specifying the degree of deterministic time trend to be
included in each regime. Available options are |
nseason |
An optional integer, greater than or equal to 2, specifying the number of seasonal periods.
When provided, |
ars |
A list defining the autoregressive structure of the model. It contains four
components: the number of regimes ( |
row.names |
An optional variable in |
dist |
A character string specifying the multivariate distributions used to model the noise
process. Available options are |
prior |
An optional list specifying the hyperparameter values that define the prior
distribution. This list can be validated using the |
n.sim |
An optional positive integer specifying the number of simulation iterations after the
burn-in period. By default, |
n.burnin |
An optional positive integer specifying the number of burn-in iterations. By default,
|
n.thin |
An optional positive integer specifying the thinning interval. By default,
|
ssvs |
An optional logical indicating whether the Stochastic Search Variable Selection (SSVS)
procedure should be applied to identify relevant lags of the output, exogenous, and threshold
series. By default, |
setar |
An optional positive integer indicating the component of the output series used as the
threshold variable. By default, |
progress |
An optional logical indicating whether a progress bar should be displayed during
execution. By default, |
... |
further arguments passed to or from other methods. |
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, |
ars | list composed of four objects, namely: nregim, 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 fitted 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, |
output.series | matrix with the values of the output series, |
exogenous.series | matrix with the values of the exogenous series, |
Intercept | If TRUE, then the model included an intercept term in each regime, |
trend | the degree of the deterministic time trend, if any, |
nseason | the number of seasonal periods, if any, |
formula | the formula, |
call | the original function call. |
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.
Vanegas, L.H. and Calderón, S.A. and Rondón, L.M. (2025) Bayesian estimation of a multivariate tar model when the noise process distribution belongs to the class of gaussian variance mixtures. International Journal of Forecasting.
DIC, WAIC
###### Example 1: Returns of the closing prices of three financial indexes
data(returns)
fit1 <- mtar(~ COLCAP + BOVESPA | SP500, data=returns, row.names=Date,
subset={Date<="2016-03-14"}, dist="Student-t",
ars=ars(nregim=3,p=c(1,1,2)), n.burnin=2000, n.sim=3000,
n.thin=2, ssvs=TRUE)
summary(fit1)
###### Example 2: Rainfall and two river flows in Colombia
data(riverflows)
fit2 <- mtar(~ Bedon + LaPlata | Rainfall, data=riverflows, row.names=Date,
subset={Date<="2009-04-04"}, dist="Laplace", ssvs=TRUE,
ars=ars(nregim=3,p=5), n.burnin=2000, n.sim=3000, n.thin=2)
summary(fit2)
###### Example 3: Temperature, precipitation, and two river flows in Iceland
data(iceland.rf)
fit3 <- mtar(~ Jokulsa + Vatnsdalsa | Temperature | Precipitation,
data=iceland.rf, subset={Date<="1974-12-21"}, row.names=Date,
ars=ars(nregim=2,p=15,q=4,d=2), n.burnin=2000, n.sim=3000,
n.thin=2, dist="Slash")
summary(fit3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.