Giter VIP home page Giter VIP logo

varsignr's Introduction

#VARsignR Estimating VARs using sign restrictions in R

Christian Danne ([email protected])

Version: Dec 18 2015

###Description This toolbox provides a set of functions for identifying structural shocks in Vector Autoregressions (VARs) using sign restrictions. Currently, it implements Uhlig's (2005) rejection method, Uhlig's (2005) penalty function approach, Rubio-Ramirez et al's (2010) QR-based rejection algorithm, and Fry and Pagan's (2011) median target method. Inference is Bayesian using a flat Normal-Wishart prior.

For more information on the three methods, please check the accompanying vignette and

Fry, R. and Pagan, A. (2011), "Sign restrictions in structural vector autoregressions: A critical review", Journal of Economic Literature, 49, 938-960.

Rubio-Ramirez, J., Waggoner, D., Zha, T. (2010), "Structural Vector Autoregressions: Theory of Identification and Algorithms for Inference", Review of Economic Studies, 77, 665-696.

Uhlig, H. (2005), "What Are the Effects of Monetary Policy on Output? Results from an Agnostic Identification Procedure", Journal of Monetary Economics, 52, 381-419.

###Important notes This is a beta version. The package does not come with any warranty (see GNU General Public License). More routines and features will be added to the package once they are finished and tested. If you find any errors, have suggestions, or if you want to contribute, please contact me at [email protected].

###Installation instructions VARsignR depends on the HI package by Giovanni Petris and Luca Tardella, minqa package by Douglas Bates et al, and mvnfast by Fasiolo et al. You will have to install both packages prior to installing VARsignR. See VARsignR-vignette.pdf for more information.

###Aknowledgements I would like to thank Tom Doan, Chris Sims, and Tao Zha for making their programme codes available online.

###Near term development plan Multiple shocks for rwz.reject, uhlig.reject Zero restrictions (Uhlig, 2005; Arias et al, 2014, FED WP) Mountford and Uhlig (2009, JAE)

###Changelog 2015-11-29 Initial release.
2015-12-19 Minor bug fixes. FEVDs added. Vignette added. Shock extraction added. Fry and Pagans median target method added. MVN draws from mvnfast.

varsignr's People

Contributors

chrstdanne avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

varsignr's Issues

Multiple shocks in RWZAccept fn

Hi Christian,
does the RWZAccept fn accepts constraints with multiple shocks.
Lets say if I have a 4 variable and 2 shocks matrix. I assume your rows are shocks and cols as
variables.
then constr=matrix(c(4,-3,2,1,-1,-2,3,-4),nrow=2,ncol=4)
In this case, the length of constrained matrix will be 8 and the iterations will be till 8, but the ik will be a 4 * 1 vector.
Also how to setup a constraint matrix with no restrictions on certain variables for certain shocks

Recover the input `Y` using the returns of `rwz.reject`.

I am quite new to R language and VARsignR. I wonder if it's possible to recover the input Y using the returns of rwz.reject. According to my current understanding about "Sign restricted VAR", if we can estimate coefficients and residuals, then Y can be recovered (composed back). However, I cannot see anything about the estimated residuals. Once I thought SHOCKS in returns (or goodshocks in the source code) might be what I want, but its dimension is not matched. I have been trying comparing the source code of rwz.reject and RWZAccept to the papers referred to, but still confused so far. So much thanks if anyone could help me!

Historical Decomposition of Shocks

Hi Christian,
I am currently going through this paper "Understanding the turbulence in financial markets"
mentioned here:
https://docs.google.com/viewer?a=v&pid=sites&srcid=ZGVmYXVsdGRvbWFpbnxqdWFuYW50b2xpbmRpYXp8Z3g6MjA1NDgzYWVhYTc1ODI5MA
and trying to implement the SVAR model explained in Page 7 with 4 structural shocks to these 4 endogenous variables. The imposed sign restriction on IRFS of the endogenous vars is given in Table 1 (page 8). The model is estimated using BVAR estimation using Minnesota prior.

I am trying to estimate this model using your package and have certain doubts:
In your example using uhligdata, when constructing the sign restriction vector, you have stated that
first element of constr indicates the shock of interest in the model.

In your example this shock is due to an endogenous variable (interest rate). In my example how do I give this shock of interest of an exogenous shock (like monetary policy,agg demand,agg supply,risk aversion etc.).

Also how do I construct the historical decomposition of shocks explained in page 12.

If we want to plot the historical decomposition of shocks, where the shocks are due to all endogenous variables, we can use this approach
https://stackoverflow.com/questions/36950491/historical-decomposition-in-r
Here the shocks are exogenous.

I would really appreciate if you could help me in clearing these doubts.

Thanks

Doubt in FEVD

Dear Christian,

I have gone through your documentation . Could you please explain how your FEVD measure is different from the variance of the k step ahead forecast revision (as per fig 9 of Uhlig 2005) . You have mentioned the same in footnote 9 but it's not clear to me . Could you kindly explain mathematically .

Regards
Arnab Biswas

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.