forecasting {mtarm} | R Documentation |
Forecasting of a multivariate TAR model.
Description
This function computes forecasting from a fitted multivariate TAR model.
Usage
forecasting(object, data, credible = 0.95, row.names)
Arguments
object |
an object of the class mtar. |
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 |
credible |
an (optional) value for the level of the credible intervals. As default, |
row.names |
an (optional) vector that allows the user to name the time point to
which each row in the data set |
Value
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, |
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.
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=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 Colombia
data(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