| predict.mtar | R Documentation |
Computes forecasts from a fitted multivariate Threshold Autoregressive (TAR) model.
## S3 method for class 'mtar'
predict(
object,
...,
newdata,
n.ahead = 1,
row.names,
credible = 0.95,
out.of.sample = FALSE
)
object |
An object of class |
... |
Additional arguments that may affect the prediction method. |
newdata |
An optional |
n.ahead |
A positive integer specifying the number of steps ahead to forecast. |
row.names |
An optional variable in |
credible |
An optional numeric value in |
out.of.sample |
An optional logical indicator. If |
A list containing the forecast summaries and, when requested, measures of predictive accuracy.
ypred | a matrix with the results of the forecasting, |
summary | a matrix with the mean and credible intervals of the forecasting, |
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.
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.
###### 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)
out1 <- predict(fit1, newdata=subset(returns,Date>"2016-03-14"), n.ahead=10)
out1$summary
###### 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",
ars=ars(nregim=3,p=5), n.burnin=2000, n.sim=3000, n.thin=2)
out2 <- predict(fit2, newdata=subset(riverflows,Date>"2009-04-04"), n.ahead=10)
out2$summary
###### 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)
out3 <- predict(fit3, newdata=subset(iceland.rf,Date>"1974-12-21"), n.ahead=10)
out3$summary
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.