chrstdanne / varsignr Goto Github PK
View Code? Open in Web Editor NEWEstimating VARs using sign restrictions in R
License: GNU General Public License v3.0
Estimating VARs using sign restrictions in R
License: GNU General Public License v3.0
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
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
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!
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.