# ABC steps for a new Dynare User

**URL:** <https://forum.dynare.org/t/abc-steps-for-a-new-dynare-user/11293>\
**Category:** General DSGE Modeling\
**Created:** [26 January 2018 12:56 UTC](https://forum.dynare.org/t/abc-steps-for-a-new-dynare-user/11293 "2018-01-26T12:56:09Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![bamlala](https://forum.dynare.org/letter_avatar_proxy/v4/letter/b/ce7236/32.png) [@bamlala](https://forum.dynare.org/u/bamlala)\
**Post date:** [26 January 2018 12:56 UTC](https://forum.dynare.org/t/abc-steps-for-a-new-dynare-user/11293/1 "2018-01-26T12:56:09Z")

</div>

Hi everyone. I am new to DSGE models and Dynare in general. I already have my equations for all the agents. However, I am stuck on how next to proceed. I see that some authors log-linearize but despite reading through some materials, I still don’t know how log-linearization is done. I hear that I need to feed the log-linear equations into Dynare. Any help would be highly appreciated.

---

<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:** [28 January 2018 09:09 UTC](https://forum.dynare.org/t/abc-steps-for-a-new-dynare-user/11293/2 "2018-01-28T09:09:31Z")

</div>

Hi,  
I generally do not recommend log-linearizing models by hand except for gaining intuition. You can simply enter the nonlinear first order conditions. A simple RBC example is at [https://github.com/JohannesPfeifer/DSGE\_mod/tree/master/RBC\_baseline](https://github.com/JohannesPfeifer/DSGE_mod/tree/master/RBC_baseline). In the folder. you find also a PDF with information on how to log-linearize.

---

<div class="post-metadata">

**Author:** ![bamlala](https://forum.dynare.org/letter_avatar_proxy/v4/letter/b/ce7236/32.png) [@bamlala](https://forum.dynare.org/u/bamlala)\
**Post date:** [10 February 2018 22:57 UTC](https://forum.dynare.org/t/abc-steps-for-a-new-dynare-user/11293/3 "2018-02-10T22:57:42Z")

</div>

Thank you for your prompt response jpeifer. Thankfully, I have been able to log-linearize my model. I went back to some of your papers and found some insights. There is a new problem for me. I tried running the simulation but it keeps coming up with the following:

MODEL\_DIAGNOSTICS: No obvious problems with this mod-file were detected.  
There are 7 eigenvalue(s) larger than 1 in modulus  
for 7 forward-looking variable(s)

The rank condition ISN’T verified!  
error: Blanchard Kahn conditions are not satisfied: indeterminacy due to rank failure

I have sat with it for hours and I can’t figure what went wrong. I would be grateful if you could take a look and help me out. Thank you. The .mod file is attached.[bamlala.mod](https://forum.dynare.org/uploads/default/original/2X/0/02ef3947065b769582baae23967ecd5937896079.mod) (5.6 KB)

---

<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:** [11 February 2018 12:59 UTC](https://forum.dynare.org/t/abc-steps-for-a-new-dynare-user/11293/4 "2018-02-11T12:59:27Z")

</div>

Check your timing. I am pretty sure that

```auto
  K_hat(-1)=(1-delta)*K_hat+delta_g*I_hat;

```

is not a correct law of motion for capital

---

<div class="post-metadata">

**Author:** ![bamlala](https://forum.dynare.org/letter_avatar_proxy/v4/letter/b/ce7236/32.png) [@bamlala](https://forum.dynare.org/u/bamlala)\
**Post date:** [12 February 2018 15:43 UTC](https://forum.dynare.org/t/abc-steps-for-a-new-dynare-user/11293/5 "2018-02-12T15:43:29Z")

</div>

Thank you for pointing that error out jpfeifer. I have corrected it, looked over my model and ran the simulations again. The error message still persists. This time it says:

MODEL\_DIAGNOSTICS: No obvious problems with this mod-file were detected.  
There are 7 eigenvalue(s) larger than 1 in modulus  
for 8 forward-looking variable(s)  
The rank condition ISN’T verified!  
error: Blanchard Kahn conditions are not satisfied: indeterminacy

I don’t know what the problem could possibly be. I have checked the model again based on my little knowledge but it seems to be of no help. I do apologise for the many questions. It’s just that I am very new to Dynare and there is no one else to ask.  
Thank you.

---

<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:** [12 February 2018 17:29 UTC](https://forum.dynare.org/t/abc-steps-for-a-new-dynare-user/11293/6 "2018-02-12T17:29:16Z")

</div>

Always provide the latest file. I can only give you the generic advice: check every equation and variable for its timing.

---

<div class="post-metadata">

**Author:** ![bamlala](https://forum.dynare.org/letter_avatar_proxy/v4/letter/b/ce7236/32.png) [@bamlala](https://forum.dynare.org/u/bamlala)\
**Post date:** [13 February 2018 21:23 UTC](https://forum.dynare.org/t/abc-steps-for-a-new-dynare-user/11293/7 "2018-02-13T21:23:03Z")

</div>

I apologise for that. I have attached the .mod file. Thank you very much for your assistance thus far jpeifer. You are appreciated.[bamlala.mod](https://forum.dynare.org/uploads/default/original/2X/9/95be31c44ef754ddad94d3b0a85eb178ef309dde.mod) (5.6 KB)

---

<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:** [14 February 2018 07:58 UTC](https://forum.dynare.org/t/abc-steps-for-a-new-dynare-user/11293/8 "2018-02-14T07:58:27Z")

</div>

That law of motion is still not correct

---

<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:** [19 February 2018 18:55 UTC](https://forum.dynare.org/t/abc-steps-for-a-new-dynare-user/11293/9 "2018-02-19T18:55:45Z")

</div>

Split this topic on 19 February 2018 18:55 UTC

A post was split to a new topic: [Brining model to the data](https://forum.dynare.org/t/brining-model-to-the-data/11390)

---

<div class="post-metadata">

**Author:** ![bamlala](https://forum.dynare.org/letter_avatar_proxy/v4/letter/b/ce7236/32.png) [@bamlala](https://forum.dynare.org/u/bamlala)\
**Post date:** [28 May 2018 17:59 UTC](https://forum.dynare.org/t/abc-steps-for-a-new-dynare-user/11293/10 "2018-05-28T17:59:31Z")

</div>

Dear jpfeifer. Indeed you were right. The codes had some problems. After taking some time to review my model and codes, Dynare was able to solve the model and produce the IRFs. I must not fail to appreciate your contribution to the whole process. Thank you.
