# Find a interesting feature of function simult\_ (or bug?)

**URL:** <https://forum.dynare.org/t/find-a-interesting-feature-of-function-simult-or-bug/26589>\
**Category:** Stochastic simulations\
**Created:** [16 October 2024 09:39 UTC](https://forum.dynare.org/t/find-a-interesting-feature-of-function-simult-or-bug/26589 "2024-10-16T09:39:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lapulacat](https://forum.dynare.org/letter_avatar_proxy/v4/letter/l/b38774/32.png) [@lapulacat](https://forum.dynare.org/u/lapulacat)\
**Post date:** [16 October 2024 09:39 UTC](https://forum.dynare.org/t/find-a-interesting-feature-of-function-simult-or-bug/26589/1 "2024-10-16T09:39:19Z")

</div>

Dear professors,

I have found a new feature (or bug?) of the simlut\_ function. When setting the stateshock\_vec as indicated by the method in RBC\_state\_dependent\_GIRF.mod, the shock can be correctly expressed as a percentage of its previous value. However, when setting the value of stateshock\_vec starting from period 1, the shock is expressed as an absolute value.

```auto
stateshock_vec=zeros(irf_periods+burn_periods,M_.exo_nbr); %initialize impulse vector 
    stateshock_vec(:,1) = stateshock_vec(:,1) + 0.005;

    starting_point=oo_.dr.ys; %define starting point of simulations
    shocks_baseline = stateshock_vec;
    y_baseline = simult_(M_,options_,starting_point,oo_.dr,shocks_baseline,options_.order);
    adatass(:,i) = y_baseline(:,end);

```

---

<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:** [16 October 2024 10:30 UTC](https://forum.dynare.org/t/find-a-interesting-feature-of-function-simult-or-bug/26589/2 "2024-10-16T10:30:25Z")

</div>

Sorry, but I don’t understand what the problem is you are experiencing. Can you explain in more detail? For example, what do you mean with

> [@lapulacat](#):
>
> correctly expressed as a percentage of its previous value

? You always specify the absolute shock size. This absolute shock size can only be interpreted as a percentage if the variable you are adding the shock to is in percentages, e.g. being logged.

---

<div class="post-metadata">

**Author:** ![lapulacat](https://forum.dynare.org/letter_avatar_proxy/v4/letter/l/b38774/32.png) [@lapulacat](https://forum.dynare.org/u/lapulacat)\
**Post date:** [16 October 2024 12:15 UTC](https://forum.dynare.org/t/find-a-interesting-feature-of-function-simult-or-bug/26589/3 "2024-10-16T12:15:00Z")

</div>

Sorry, Professor jpfeifer. I forgot the fact that I set the variable in log form. 🤣
