What values does dynare calculate?

Just one question:
Dynare makes an approximations via Taylor. Thus this is not a log-linearization, rigth? If so, the simulated variables do not have a log value. Is that rigth?

Best regards,

Hi Daniel,

If I read the manual correctly I agree with you, Dynare takes Taylor approximations, thus it is not log-linearising the system, rather linearizing it.


Thanks for your answer. So I understand the manual like you do.

This is important, since when comparing simulated data with real world data, both have to have the same scala. Since most real world data were rescaled with a log operator, I think, one has to do this with the simulated data as well.

Is this right?

yes, I guess you are right. even though I am not sure if you care that much since you hardly compare levels of data. I mean, if you want to compare the variance of the GDP or the variance of the log-GDP they shouldn’t be that different no? Anyway, to be on the safe side it is definitely advised to have them in the same format.
Personally, I take the safest route: I always log-linearise the model myself, by hand. In that way I know exactly the steady-state and I have much more control. I always advise people to do that but it is up to you.

Good luck!


yeah, you rigth, but for big models log-linearization by hand is a very hard thing to do and it always leads one to many mistakes.

my model is about 30 equations. so if I have some extra time left, I perhaps will do log-linearization.


mine is 72 :slight_smile:

Good luck anyway!

so if I do log-linearization, then every variable in my model is measured in its deviation from its steady-state:

hat_y_t = log(y_t) - log(y_ss)

for my data it has following consequences:

  1. I have to log them
  2. I have to log the mean of the data
  3. I have to substrac these both numbers.

But in general, since I have detrended the variables with the HP filter, the mean of the data is near zero, which is a problem for the log. (Am I rigth?)
What do you do?


The actual data you simply have to:

  1. Log them
  2. Take the cyclical part of the HP-filtered (log) data.

The model generated data are stationary, they are expressed as deviations from the steady-state and eventually they go back to it. Similarly, if you take the trend component out of the actual data, they are also expressed in stationary form since they represent the cyclical part only. So they are comparable.

There is a question on whether you should actually apply the HP-filter on model-generated data as well. In principle, one might say that you shouldn’t since model-generated data are already de-trended, they are stationary by construction. Nevertheless, it is a common practice to take the filter over the model-generated data as well. These issues are discussed in King and Rebello (1993).

Hope that helps.

1 Like

Yes I know that, and this is actually what I have done.

I was wondering about that point, since I was trying to replicate the paper of Ruge-Murcia (2010: Estimating Nonlinear DSGE Models by the Simulated Method of Moments) with dynare. Even I was taking the same parameter values as Ruge-Murcia, I did not get the same results for the simulated variables. So I compared the standard deviation of my and his simulated variables and they were acutally different. After I log my simulated data and demean them, the standard deviation became equal to the standard deviation in Ruge-Murcia’s paper.

I think you have done SMM before. Perhaps your are interested in the matlab code. This would be for me also a good opportunity to check if my code is correct.


The simulated data come out of a log-linearised model? If so, I do not see why you should log them and de-mean them. Make sure what the paper gives exactly. Also, you know that a simulation is a random procedure and that it is normal that results are not the same. However, if they are extremely different this is worrying. Obviously, as the number of repetitions goes to infinity, the difference (between one simulation attempt and the next) goes to zero.

I never used SMM myself and I am not sure if I could be of much use in checking your code.


no the simulated data do not come form a log linearized model, they come from dynare. And dynare uses taylor-approximation.

Then I think logging them and demeaning them makes sense. Make sure that the paper gives log-linearised model-generated data.

Looking into Ruge-Murcia’s code I get the impression that this is the case.

Thanks for your answer.


I have read your discussion about the Simulated method of moments used in order to estimate DSGE models. I was wondering if you have any idea about how to implement in Dynare the Method of Moments in order to estimate a linear DSGE model.
I need this code because I am trying to replicate Jang and Sacht (2012):" Identification of Animal Spirits in a Bounded Rationality Model An Application to the Euro Area" for the Romanian economy for my dissertation paper. In this paper a comparison is made between two DSGE models. A linear model that emphasis the rational expectations and a non-linear model that in charaterised by the fact that agents are boundedly rational. As I have understood by reading the article the linear model is estimated using the Method of Moments and the non-linear one is estimated via the Simulated Method of Monets.

I would be very grateful to tou if you could help me with the code or with books, articles and other materials that I can read in order to implement the code in Dynare.

Thank you in advance!