# Template for SMM

**URL:** <https://forum.dynare.org/t/template-for-smm/18401>\
**Category:** SMM/GMM/IRF-Matching\
**Created:** [25 June 2021 13:20 UTC](https://forum.dynare.org/t/template-for-smm/18401 "2021-06-25T13:20:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wenddy](https://forum.dynare.org/letter_avatar_proxy/v4/letter/w/dbc845/32.png) [@Wenddy](https://forum.dynare.org/u/Wenddy)\
**Post date:** [25 June 2021 13:20 UTC](https://forum.dynare.org/t/template-for-smm/18401/1 "2021-06-25T13:20:00Z")

</div>

Hi,guys  
When i run the template on SMM.mod given by Mutschler in Dynare Summer School 2021, i got some error:  
==== Method of Moments Estimation (SMM) ====

Computing data moments. Note that NaN values in the moments (due to leads and lags or missing data) are replaced by the mean of the corresponding moment

There was an error in computing the moments for initial parameter values.  
If this is not a problem with the setting of options (check the error message below),  
you should try using the calibrated version of the model as starting values. To do  
this, add an empty estimated\_params\_init-block with use\_calibration option immediately before the estimation  
command (and after the estimated\_params-block so that it does not get overwritten):

> MEX file  
> ‘/Applications/Dynare/4.7-2021-06-17-1059/mex/matlab/maci64-9.4-9.10/mjdgges.mexmaci64’  
> :  
> dlopen(/Applications/Dynare/4.7-2021-06-17-1059/mex/matlab/maci64-9.4-9.10/mjdgges.mexmaci64,  
> 6): Library not loaded: /usr/local/opt/gcc/lib/gcc/10/libquadmath.0.dylib  
> Referenced from:  
> /Applications/Dynare/4.7-2021-06-17-1059/mex/matlab/maci64-9.4-9.10/mjdgges.mexmaci64  
> Reason: image not found

Matlab 2021a and Dynare 4.7 beta1 on MacOS 11

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [25 June 2021 18:04 UTC](https://forum.dynare.org/t/template-for-smm/18401/2 "2021-06-25T18:04:59Z")

</div>

Please upgrade to the latest unstable version where hopefully the Macos problems have been fixed or install gcc10 using

```auto
brew install gcc@10

```

---

<div class="post-metadata">

**Author:** ![dh.murakami](https://forum.dynare.org/letter_avatar_proxy/v4/letter/d/58956e/32.png) [@dh.murakami](https://forum.dynare.org/u/dh.murakami)\
**Post date:** [9 September 2021 14:11 UTC](https://forum.dynare.org/t/template-for-smm/18401/3 "2021-09-09T14:11:17Z")

</div>

Would it be possible — if the author is ok with it — to share the code/template?

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [10 September 2021 06:24 UTC](https://forum.dynare.org/t/template-for-smm/18401/4 "2021-09-10T06:24:34Z")

</div>

All test cases should be at [tests/estimation/method\_of\_moments · master · Dynare / dynare · GitLab](https://git.dynare.org/Dynare/dynare/-/tree/master/tests/estimation/method_of_moments)
