# Generalized method of moments in Dynare

I am new to dynare. I am trying to replicate the calibration of the paper ‘Structural transformation and aggregate productivity’ by Margarida Duarte and Diego Restuccia.

In this calibration technique, some parameters are known while others (b and ρ) are estimated such that the squared difference between data and model moments reduces.

My problem is - in all the calibration exercises that I saw regarding macroeconomics models [Picture attached], all the parameter values are assumed and model is calibrated by computing future period values using these initial period values of variables and parameters. (vs my problem where all parameters are not known and have to be calculated from matching model with data)

My question is how can we do calibration in Dynare where we don’t know the values of all the parameters and want to estimate it using least square differences?

See Practicing Dynare 4.5.6

https://forum.dynare.org/t/practicing-dynare-2019-updated-version/13389

1 Like

The source was really detailed and clear but it doesn’t answer my question. In this practice guide too they are ‘estimating’ the value of variables and transition functions for a ‘given’ value of parameter. What I want is to calculate the values of parameter by minimizing the squared difference between data and model prediction.
How can that be done in Dynare?

1 Like

Can you please tell me how do we do generalized methods of moments in Dynare? I have searched the forum but is not able to get my answer exactly.
Any kind of information will be helpful.

That is on the agenda for the next release of dynare, see the wiki: https://git.dynare.org/Dynare/dynare/wikis/RoadMap
There are also other self made GMM toolboxes for dynare, e.g. https://github.com/wmutschl/ReplicationDSGEHOS but are not tested on (and not really suited for) larger models (even though first order approx should work fine) …

1 Like

If you don’t care about optimal weighting matrices, you can also work from simple distance minimizing codes like https://github.com/JohannesPfeifer/DSGE_mod/tree/master/RBC_IRF_matching

2 Likes