Does SMM estimation works for log-linearized system?

Hi all, I am a beginner in both Dynare and SMM. Now I developed a NK model, and log-linearized it. I wonder is it possible to use Dynare to estimate some coefficients/parameters in such log-linearized system? Because given the samples of SMM I have seen, the are not log-linearized because the moments are usually not in log-linearized 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, likelihood-based 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 log-linearized model? Does Dynare include it?
In addition, of course, my log-linearized model is derived from a non-linear 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!

  1. Yes, Dynare supports ML and Bayesian estimation of linear models. It’s a lot more commonly used.
  2. 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)

  1. Is it possible to set restrition on variables? Like I want to restrict interest rate R>=1 when doing the estimation in dynare?
  2. Where can I get the manual? I do not know about it.
    Thank you!
  1. That is not easily possible, unless you use OccBin with a filter.
  2. 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 log-linearized.

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 log-linearized 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 log-linearize 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 log-linearized version to do the estimation, then when typing in the steady-state 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 log-linearized system? (Is it really matter to write the steady state using SMM with dynare?)

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

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

  3. 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.

  4. 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.

There should be some at tests/estimation/method_of_moments · master · Dynare / dynare · GitLab

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.

  1. I am estimating my model now with the log-linearized version. I need to estimate the monetary and fiscal tax rule coefficients, but one problem rise. Dynare keeps telling me that the Blanchard-Kahn condition is not satisfied. The error information is shown in the picture below.

I don’t know whether I interpret the B-K 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 70-99.mat” is empirical data for moment.

Convenience_NK_SMM.mod (8.9 KB)
NK_Model_linearized.inc (3.8 KB)
Moment 70-99.mat (2.1 KB)

  1. Besides, now I want to add a variance as a second-order 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 first-order 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!

  1. There must be a timing error you need to find.
  2. You can ignore the warning about normalizing the model. It’s relevant for the block decomposition of the model.
  3. 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?