DSGE using Schmitt-Grohe - Uribe

DSGE.zip (18.1 KB)

Dear all,

I am trying to use these codes to solve a DSGE model using Schmitt-Grohe - Uribe.
In the zip file you will find several codes, but the most important are those starting with “small”. In “open model” I describe the equations and variable that are used in my model. Besides, there must be an equation for each variable. In “open ss”, instead, you can find all the parameters and their value, as well as the steady state value of the variables. Finally, “open run” is used to get the results and plot them.
Although I wrote one equation for each variable and declared all the variables and parameters, I got a error message at line 27 of “open run” stating that the “matrix must be square”. What is wrong with my codes?

Thank you in advance!

You have 22 equations, but there are not 22 variables.

Thank you for your reply.
The endogenous variables should be 20 (5 per row):
pt cons ph yt pt_star
cons_star pf_star y_star pf consf
consh e q n r
pai pai_US r_US n_US consf_star

The exogenous variables, instead, only two:
a a_US

Therefore, I get 22 variables in 22 equations. However, tell me if I am missing something, because I cannot really see it. Thank you again for your time!

But there are only 19 endogenous variables. You missed consf_star in the definition of y.

What equation are you referring to? Equation 22?

No, I am referring to the definition of the vector of endogenous variables

y = [pt cons ph yt pt_star cons_star pf_star y_star pf consf consh e q n r pai pai_US r_US n_US];

Oh okay, I did not notice there was a variable missing. Thank you for you help! However, I still get some errors related to the function gx_hx. The error is the following:

There is most probably a timing error somewhere. Keep in mind, this is a Dynare support forum. I won’t spend time debugging SGU codes.