# 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,
Daniel

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.

Kyriacos

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!

Kyriacos

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.

Thanks.

mine is 72

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?

Daniel,

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.

Greets,
Daniel

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.

Kyriacos

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.