Giter Site home page Giter Site logo

Comments (7)

naffe15 avatar naffe15 commented on August 15, 2024

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_.

SangJL avatar SangJL commented on August 15, 2024

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_.

naffe15 avatar naffe15 commented on August 15, 2024

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_.

SangJL avatar SangJL commented on August 15, 2024

My pleasure!

from bvar_.

SangJL avatar SangJL commented on August 15, 2024

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_.

naffe15 avatar naffe15 commented on August 15, 2024

I will look into it.
f.

from bvar_.

SangJL avatar SangJL commented on August 15, 2024

Appreciated!

from bvar_.

Related Issues (16)

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.