Comments (7)
Hi,
the codes seems to work fine when computing IRFs with sign and narrative restrictions and with exogenous variables. This was not the case for the IRF with zero-sign restrictions. I adjusted the codes so that one can compute IRF with sign-zero restrictions with exogenous variables.
from bvar_.
Hello,
If I changed codes in exmple_6_VARX.m to include two exogenous variables and to use sign restrictions as following, current bar_.m doesn't work well in producing IRFs
% exogenous variable
z = demean(100*diff(log ([cpi_us str_us] )));
% include one lag for the exogenous variable
options.controls = lagX(z,[0:1]);
options.signs{1} = 'y(4,1:3,4)>0';
options.signs{2} = 'y(2,1:3,4)<0';
% estimate the VARX
bvar1 = bvar_(y,lags,options);
indx_sho = 4;
indx_var = [1, 2, 3, 4];
irfs_to_plot = bvar1.irsign_draws(:,:,indx_sho,:);
%%%%
But I found that bar_.m works well with my suggestions.
from bvar_.
Hi,
thanks for the follow up. now I understand where the problem is. the functions calculating the IRFs were computing the wrong number of lags when more than one exogenous variable is used. This problem is fixed now. thanks for spotting this.
f.
from bvar_.
My pleasure!
from bvar_.
Could I ask one more improvement?
Even though I set "options.K = 1000;", I may not get 1,000 draws because d =0 in "iresponse_sign.m" for cases. In my experiments, I can see the warning,"I could not find a rotation satisfying the restrictions.", for about 5~10% draws out of total designated draws(options.K). So, could you improve your "bvar_.m" to ensure that I can get initially-designed number of draws(options.K).
from bvar_.
I will look into it.
f.
from bvar_.
Appreciated!
from bvar_.
Related Issues (16)
- Questions about zero and sign restrictions HOT 1
- Error in checkrestrictions2 HOT 3
- Sign restrictions HOT 2
- Toolbox requirements HOT 2
- function "polydet_break" missing? HOT 2
- Error when generating forecasts conditional on 2+ variables HOT 3
- VARX (un)conditional forecasts HOT 1
- Sign restriction identification vs. Mixed identification strategy HOT 3
- error messages HOT 1
- example 2 HOT 1
- example 3 HOT 1
- Example 23
- Error in Example 25
- Are the line 863&864 var.X and Var.y rigint in bvar.m? HOT 1
- How to add lagged exogenous variables HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bvar_.