bvar.sv.tvp {bvarsv} | R Documentation |

Bayesian estimation of the flexible VAR model by Primiceri (2005) which allows for both stochastic volatility and time drift in the model parameters.

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` |
Matrix of data, where rows represent time and columns are different variables. |

`p` |
Lag length, greater or equal than 1 (the default) |

`tau` |
Length of the training sample used for determining prior parameters via least squares (LS). That is, data in |

`nf` |
Number of future time periods for which forecasts are computed (integer, 1 or greater, defaults to 10). |

`pdrift` |
Dummy, indicates whether or not to account for parameter drift when simulating forecasts (defaults to TRUE). |

`nrep` |
Number of MCMC draws excluding burn-in (defaults to 50000) |

`nburn` |
Number of MCMC draws used to initialize the sampler (defaults to 5000). These draws do not enter the computation of posterior moments, forecasts etc. |

`thinfac` |
Thinning factor for MCMC output. Defaults to 10, which means that the forecast sequences ( |

`itprint` |
Print every |

`save.parameters` |
If set to |

`k_B, k_A, k_sig, k_Q, k_W, k_S, pQ, pW, pS` |
Quantities which enter the prior distributions, see the links below for details. Defaults to the exact values used in the original article by Primiceri. |

`Beta.postmean` |
Posterior means of coefficients. This is an array of dimension |

`H.postmean` |
Posterior means of error term covariance matrices. This is an array of dimension |

`Q.postmean, S.postmean, W.postmean` |
Posterior means of various covariance matrices. |

`fc.mdraws` |
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). |

`fc.vdraws` |
Draws for the forecast covariance matrix. Design similar to |

`fc.ydraws` |
Simulated future observations. Design analogous to |

`Beta.draws, H.draws` |
Matrices of parameter draws, can be used for computing impulse responses later on (see impulse.responses), and accessed via the helper function |

Fabian Krueger, based on Matlab code by Dimitris Korobilis (see Koop and Korobilis, 2010). *Incorporates the corrigendum by Del Negro and Primiceri (2015), which points to an error in the original MCMC algorithm of Primiceri (2005).*

Del Negro, M. and Primicerio, G.E. (2015). ‘Time Varying Structural Vector Autoregressions and Monetary Policy: A Corrigendum’, Review of Economic Studies 82, 1342-1345.

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.

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 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)

[Package *bvarsv* version 1.1 Index]