# Dynare 4.2.0 Error using Rand

**URL:** <https://forum.dynare.org/t/dynare-4-2-0-error-using-rand/1868>\
**Category:** Dynare help (legacy posts)\
**Created:** [27 February 2011 16:11 UTC](https://forum.dynare.org/t/dynare-4-2-0-error-using-rand/1868 "2011-02-27T16:11:08Z")\
**Posts on this page:** 1\
**Showing post:** 18

<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 November 2014 20:24 UTC](https://forum.dynare.org/t/dynare-4-2-0-error-using-rand/1868/18 "2014-11-12T20:24:44Z")

</div>

The answer is not so easy. If you don’t have a recursive representation to get rid the integral by defining the whole thing as a variable (e.g. [[How to include an integral in dynare code?](https://forum.dynare.org/t/how-to-include-an-integral-in-dynare-code/1923/1))), you can only try a external function [[Integration function - dynare v4?](https://forum.dynare.org/t/integration-function-dynare-v4/1169/1)). Unfortunately, I don’t have experience with models like this. You may want to look at how Christiano/Motto/Rostagno (2014): RIsk shocks, AER dealt with this. They have replication files online.

---

_[View the full topic](https://forum.dynare.org/t/dynare-4-2-0-error-using-rand/1868)._
