Hi, I’m trying to plot the IRFs to an exogenous shock with 2 different values of a parameter in the same figure but the attached .mod file doesn’t work:

Undefined function or variable ‘R’.

Error in BKW2 (line 204)

Error in dynare (line 180)
evalin(‘base’,fname) ;

Does anybody know what the problem is ? Thanks.

The reason is that you did not tell Dynare to compute IRFs or perform stochastic or determinstic simulations using either simul or stoch_simul. Hence, you are trying to access variables that were never created. Also note that you cannot change parameter simply using

You would need

and then rerun simul or stoch_simul.

Thanks for your answer, but I made a mistake. I have to consider eta as an exogenous variable, not a parameter. The initial value is 0.2, then from period 1 to 10 is equal to 0.22. Can I re-declare the variable ?

You have to redeclare eta as an varexo and then specify its time path in the shocks-block