bvar.sv.tvp(Y, p = 1, tau = 40, nf = 10, pdrift = TRUE, nrep = 50000,
nburn = 5000, thinfac = 10, itprint = 10000, save.parameters = TRUE,
k_B = 4, k_A = 4, k_sig = 1, k_Q = 0.01, k_S = 0.1, k_W = 0.01,
pQ = NULL, pW = NULL, pS = NULL)Y must have at least two columns.Y[1:tau, ] are used for estimating prior parameters via LS; formal Bayesian analysis is then performed for data in Y[(tau+1):nrow(Y), ].fc.mdraws, fc.vdraws, fc.ydraws, see below) contain only every tenth draw of the original sequence. Set thinfac to one to obtain the full MCMC sequence.itprint-th iteration. Defaults to 10000. Set to very large value to omit printing altogether.TRUE, parameter draws are saved in lists (these can be very large). Defaults to TRUE.Y), and $M$ denotes the number of system variables (= number of columns of Y). The submatrix $[, , t]$ represents the coefficient matrix at time $t$. The intercept vector is stacked in the first column; the p coefficient matrices of dimension $[M,M]$ are placed next to it.nrep/thinfac, apart from possible rounding issues.fc.mdraws, except that the first array dimension contains the lower-diagonal elements of the forecast covariance matrix.fc.mdraws.parameter.draws.
These outputs are generated only if save.parameters has been set to TRUE. Koop, G. and D. Korobilis (2010): `Bayesian Multivariate Time Series Methods for Empirical Macroeconomics', Foundations and Trends in Econometrics 3, 267-358. Accompanying Matlab code available at https://sites.google.com/site/dimitriskorobilis/matlab.
Primiceri, G.E. (2005): `Time Varying Structural Vector Autoregressions and Monetary Policy', Review of Economic Studies 72, 821-852.
predictive.density and predictive.draws provide simple access to the forecast distribution produced by bvar.sv.tvp.
Impulse responses can be computed using impulse.responses. For detailed examples and explanations, see the accompanying pdf file hosted at https://sites.google.com/site/fk83research/code.## Not run:
#
# # Load US macro data
# data(usmacro)
#
# # Estimate trivariate BVAR using default settings
# set.seed(5813)
# bv <- bvar.sv.tvp(usmacro)
#
# ## End(Not run)
Run the code above in your browser using DataLab