data: an (optional) data frame, list or environment (or object coercible by as.data.frame to a data frame) containing the future values of the threshold series as well as the exogenous series in the model. If not found in data, the variables are taken from environment(formula), typically the environment from which mtar is called.
credible: an (optional) value for the level of the credible intervals. As default, credible is set to 0.95.
row.names: an (optional) vector that allows the user to name the time point to which each row in the data set data corresponds.
Returns
a list with the following component
ypred
a matrix with the results of the forecasting,
summary
a matrix with the mean, standard deviation, and the HDP credible intervals of the forecasting,
Examples
###### Example 1: Returns of the closing prices of three financial indexesdata(returns)fit1 <- mtar(~ COLCAP + BOVESPA | SP500, row.names=Date, dist="Slash", data=subset(returns,Date <"2016-03-20"), ars=list(p=c(1,1,2)), n.burnin=100, n.sim=3000)out1 <- forecasting(fit1,data=subset(returns,Date >="2016-03-20"),row.names=Date)out1$summary
###### Example 2: Rainfall and two river flows in Colombiadata(riverflows)fit2 <- mtar(~ Bedon + LaPlata | Rainfall, row.names=Date, dist="Laplace", data=subset(riverflows,Date <"2009-04-09"), ars=list(p=c(5,5,5)), n.burnin=100, n.sim=3000)out2 <- forecasting(fit2,data=subset(riverflows,Date >="2009-04-09"),row.names=Date)out2$summary
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.
Karlsson, S. (2013) Chapter 15-Forecasting with Bayesian Vector Autoregression. In Elliott, G. and Timmermann, A. Handbook of Economic Forecasting, Volume 2, 791–89, Elsevier.