Notation - Steady State - Residuals

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Notation - Steady State - Residuals

Postby Sophie » Mon Aug 01, 2016 7:53 pm

Dear all,

I have three questions where hopefully someone has some fresh ideas. Thanks a lot! :

1) Notation: Is it a problem if exp()-notation and log-linearised notations are mixed in models?
In my model, I am not sure which initial values to choose if the variable, e.g. c, figures
both in an exp()-notation and in a log-linearised equation. (See for example (na12.mod) attached below)

2) Finding a steady state: Is it possible that exp()-notation cannot be used in an external steady state-file? When using the below steady-state-file Matlab tells me: "exp" previously appeared to be used as a function or command, conflicting with its use here as the name of a variable. A possible cause of this error is that you forgot to initialize the variable, or you have initialized it implicitly using load or eval."

How then can I use an external steady state-file if I have some equations of the model only in exp()-notation
and others (like the New Keynesian Philips Curve) only in log-linearized notation?
Log-linearizing those equations with sums (currently in exp()-notation) would result in having to specify the steady state-values for almost all the variables of my model as almost all variables appear in the two equations in exp()-notation. And using a steady_state_model-block would not solve the problem of different
notations, would it? Is there a way out or any idea what else I can do in order to find a steady state?

3) Residuals: So far, I understood that the residuals can help understand which equations might still contain an
error or a wrong starting value. Also, if the residual is big the error will be more influential than if it is
small. If my residuals are now the below (for na12.mod) how could I use this information? There
still seem to be a lot of errors but the residuals are not huge. What else can it tell me other than
"look at all the equations with residuals different from 0 again"? Would playing with initial values
and looking at how the residuals change actually be an advisable strategy?
Equation number 1 : -0.46169
Equation number 2 : 0
Equation number 3 : -0.37068
Equation number 4 : -0.74135
Equation number 5 : 0
Equation number 6 : 0
Equation number 7 : 0
Equation number 8 : 0.45
Equation number 9 : 0
Equation number 10 : 0
Equation number 11 : -0.014414
Equation number 12 : -0.38438
Equation number 13 : 0
Equation number 14 : -0.12356
Equation number 15 : 0.12356
Equation number 16 : 0
Equation number 17 : -0.11623
Equation number 18 : -0.12356
Equation number 19 : 0.092669
Equation number 20 : 0
Attachments
na1easy2_steadystate.m
(1.43 KiB) Downloaded 83 times
na12.mod
(2 KiB) Downloaded 74 times
Sophie
 
Posts: 8
Joined: Wed Jul 20, 2016 1:56 pm

Re: Notation - Steady State - Residuals

Postby jpfeifer » Tue Aug 02, 2016 8:22 am

You should first read http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=3610.

1.) You can combine linear and nonlinear equations, but you need to make sure to define the corresponding relation between the log-level of the variable and the percentage deviation from trend. The nonlinear equations contain separate variables (e.g. y) that are not percentage deviations from steady state (e.g. yhat). To link them to the percentage deviations, you need to define them as separate variabes and link them to the linearized ones by
Code: Select all
y_hat=log(y)-log(steady_state(y))

For y you then need to provide steady state values.

2. The line
Code: Select all
exp(yf)=exp(yhstar)+exp(bstar)-exp(bstar);

is not proper assignment in Matlab. It needs to be
Code: Select all
yf=log(exp(yhstar)+exp(bstar)-exp(bstar));


3. Statements like
Code: Select all
exp(phstar+yhstar)
are usually not compatible with a proper substitution. Usually you have to substitute every variable individually, i.e.
Code: Select all
exp(phstar)+exp(yhstar)

What you should to is solve the model without exp-notation first. Then either do the substitution after you computed the steady state of the levels correctly so that you know the log-levels or, even better, simply define the log-levels of the variables you need as additional variables:
Code: Select all
log_y=log(y)

That would be less error-prone.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 8 guests