Is there anyone can help me with the TVP-VAR? I was using bvarsv package to estimate bvar.sv.tvp. It works perfectly fine, however I need to estimate genFEVD. With this package I can estimate IRF but there is no codes for genFEVD. So I installed bvartools package which has got fevd function from where it is possible to estimate generalised forecast error variance decomposition (fevd(gin)). Unfortunately I am unable to estimate it.
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.
If you have a query related to it or one of the replies, start a new topic and refer back with a link.
Length of the training sample used for determining prior parameters via least squares (LS). That is, data in 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), ].
Thinning factor for MCMC output. Defaults to 10, which means that the forecast sequences (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.
Posterior means of coefficients. This is an array of dimension [M, Mp+1, T], where T denotes the number of time periods (= number of rows of 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.
Draws for the forecast mean vector at various horizons (three-dimensional array, where the first dimension corresponds to system variables, the second to forecast horizons, and the third to MCMC draws). Note: The third dimension will be equal to nrep/thinfac, apart from possible rounding issues.
Matrices of parameter draws, can be used for computing impulse responses later on (see impulse.responses), and accessed via the helper function parameter.draws.These outputs are generated only if save.parameters has been set to TRUE.
The helper functions 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
Computes impulse response functions (IRFs) from a model fit produced by bvar.sv.tvp. TheIRF describes how a variable responds to a shock in another variable, in the periods following the shock. To enable simple handling, this function computes IRFs for only one pair of variables that must be specified in advance (see impulse.variableand response.variable below).
If 1, there is no orthogonalizaton, and the shock size corresponds to one unit of the impulse variable. If scenario is either 2 (the default) or 3, the error term variance-covariance matrix is orthogonalized via Cholesky decomposition. For scenario = 2, the Cholesky decomposition of the error term VCV matrix at time point t is used. scenario = 3 is the variant used in Del Negro and Primiceri (2015). Here, the diagonal elements are set to their averages over time, whereas the off-diagonal elements are specific to time t. See the notes below for further information.
If scenario is set to either 2 or 3, the Cholesky transform (transpose of chol) is used to produce the orthogonal impulse responses. See Hamilton (1994), Section 11.4, and particularly Equation [11.4.22]. As discussed by Hamilton, the ordering of the system variables matters, and should be considered carefully. The magnitude of the shock (impulse) corresponds to one standard deviation of the error term.
If scenario = 1, the function simply outputs the matrices of the model's moving average representation, see Equation [11.4.1] in Hamilton (1994). The scenario considered here may be unrealistic, in that an isolated shock may be unlikely. The magnitude of the shock (impulse)corresponds to one unit of the error term.
c80f0f1006