Hi all, I am a beginner in both Dynare and SMM. Now I developed a NK model, and loglinearized it. I wonder is it possible to use Dynare to estimate some coefficients/parameters in such loglinearized system? Because given the samples of SMM I have seen, the are not loglinearized because the moments are usually not in loglinearized form (given the code i have seen). Thank you very much!
Yes, it will work. The reason people often don’t use linear models is because for those models, likelihoodbased techniques are available. Those should be more efficient.
Thank you professor. Do you mean that usually techniques like maximum likelihood estimation are more commonly used in estimating coefficients/parameters of loglinearized model? Does Dynare include it?
In addition, of course, my loglinearized model is derived from a nonlinear one.
Hi professor Pfeifer, in addition, does the Dynare allows us to set a bound for estimated parameters, meaning that the value of estimated parameters/coefficients must be fall within a specific interval? I have seen some SMM codes that incorporate this kind of restriction. Thank you agian!
 Yes, Dynare supports ML and Bayesian estimation of linear models. It’s a lot more commonly used.
 Yes, the `estim_param block allows specifying lower and upper bounds. See the manual.
Thank you for your answer! I still have two more question about dynare (maybe stupid)
 Is it possible to set restrition on variables? Like I want to restrict interest rate R>=1 when doing the estimation in dynare?
 Where can I get the manual? I do not know about it.
Thank you!
 That is not easily possible, unless you use OccBin with a filter.
 The manual is shipped in every Dynare installation folder under
doc
Thank you very much Prof. Pfeifer.
In addition, I have a question that maybe or may not be related to Dynare. In the paper video https://www.youtube.com/watch?v=gOcwxZJND2M&t=270s, the example is a RBC model (so does the example paper Born, and Pfeifer 2014), and we need to type in the full model which is not loglinearized.
However, I am trying to use SMM estimate two coefficients of a New Keyesian model (with government spending!!! more troublesome) which include Phillips Curve (but i am not estimating coefficients of the NKPC). The original form of the Phillips Curve will be kind of messy (need to introduce two more variables to represent the formula, i think that is why people usually prefer loglinearized form to present the NK model).
My question is that given such problem, how do people deal with it usually (estimating NK model with Philips Curve using SMM)? Do they still use the original model without loglinearize it to estimation the coefficients?
Thank you very much!
That does not matter. You can both use the linear or nonlinear version.
may be helpful.
Thanks very much! I will check it!
Hi professor, may i ask that where can I get the code and file and related model used in the video https://www.youtube.com/watch?v=gOcwxZJND2M&t=270s (maybe all the files used in that summer school)? Are there any other code and file that could help us to implement SMM with dynare? Is the method using SMM with Dynare 6.0 is the same as before?
Also, if I download the 7z files from the website, I do not need to install dynare again right?
In addition, suppose I use the loglinearized version to do the estimation, then when typing in the steadystate model like the video did, all the equation should simply be equal to 0, is it right? May i ask that do you know any sample that using SMM to estimate loglinearized system? (Is it really matter to write the steady state using SMM with dynare?)

The summer school codes are at Dynare Summer School 2021 · Wiki · Dynare / dynare · GitLab

You should be able to use Dynare 6.0 out of the box.

If you use the zipped installation files, there is no point in installing Dynare with the installer. The only difference on Windows would be the Start Menu entry.

It does not matter whether the model is linearized or not. You only need to treat the data correctly to correspond to the model variables, i.e. deviation from trend.
Thank you professor, so do you have any sample of SMM using dynare other than the summer school case? NK model will be the best but RBC is also good.
Thank you very much Prof. Pfeifer, I will check them.
Hello Prof. Pfeifer @jpfeifer ,
Could you kindly briefly check my problem? I am looking forward to hear from you and sorry for so many edit.
 I am estimating my model now with the loglinearized version. I need to estimate the monetary and fiscal tax rule coefficients, but one problem rise. Dynare keeps telling me that the BlanchardKahn condition is not satisfied. The error information is shown in the picture below.
I don’t know whether I interpret the BK condition correctly. I used the Uhlig toolkit to run the IRF estimation for my model using parameters value same as the SMM code. All variables converge there. I think it means that my model should have stable equilibrium then. I am confused.
In addition, why Matlab keeps telling me that it could not normalize the dynamic model?
I attach code for my model below. The file “Convenience_NK_SMM.mod” estimate my model, targeting the model file “NK_Model_linearized.inc”The “Moment 7099.mat” is empirical data for moment.
Convenience_NK_SMM.mod (8.9 KB)
NK_Model_linearized.inc (3.8 KB)
Moment 7099.mat (2.1 KB)
 Besides, now I want to add a variance as a secondorder moment so I try to set prefilter=1 (ie: variance of VoT). However, it seems that if I include a variance as a moment, I can not use a mean as moment at the same time (the firstorder moment E(RR) will be ignored). So could you tell me how to include a mean and a variance as moments in one estimation?
Thank you for any response for my question in advance!
 There must be a timing error you need to find.
 You can ignore the warning about normalizing the model. It’s relevant for the block decomposition of the model.
 You should not use the
prefilter
option and match the mean and the second uncentered moment. Those two imply the mean and variance.
The problem is solved. Do not declare the predetermined_parameters in the .inc file if you already have state variables from last period in your model.
Hi Professor,
could you tell me more about the second uncentered moment? Like simply putting a*a in the code means variance?