Two shocks simultaneously

modelRERTARGETthreesectorssimultshocks.mod (14.1 KB)

Hello,

I am trying to plot two shocks at a time using

DSGE_mod/RBC_news_shock_model.mod at master · JohannesPfeifer/DSGE_mod · GitHub

The model runs ok and plots every IRF. But when I use that command to plot two shocks at the same time it says "ERROR: modelRERTARGETthreesectorssimultshocks.mod: line 557, cols 51-56: oo_.dr treated as a variable, but it contains a ‘.’

Thank you
"

You did not provide the sectparam.mat to run the file.

Sorry Professor
sectparam.mat (677 Bytes)
modelRERTARGETthreesectorssimultshocks.mod (14.1 KB)
main code 3 sec.m (1.6 KB)
seems the files didn’t upload correctly. I attach the main code that creates the sectparam matrix.

I don’t know what the preprocessor is doing here to output

ERROR: modelRERTARGETthreesectorssimultshocks.mod: line 557, cols 51-56: oo_.dr treated as a variable, but it contains a ‘.’

@sebastien may know.

Use

verbatim;
y2 = simult_(M_,options_,initial_condition_states,oo_.dr,shock_matrix,1);
end;

to circumvent the issue.

The problem is that y2 is a model variable. Hence the statement y2 = simult(…); is not recognized as a MATLAB native statement.

If you rename the MATLAB variable, for example with y2sim = simult(…);, then it will work.

1 Like

Thank you so much Johannes and Sebastien! It was just a silly mistake with naming variables.