# Replicating smoothed variables with simul\_t

**URL:** <https://forum.dynare.org/t/replicating-smoothed-variables-with-simul-t/21512>\
**Category:** Stochastic simulations\
**Created:** [24 November 2022 12:46 UTC](https://forum.dynare.org/t/replicating-smoothed-variables-with-simul-t/21512 "2022-11-24T12:46:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yaakov](https://forum.dynare.org/user_avatar/forum.dynare.org/yaakov/32/15432_2.png) [@Yaakov](https://forum.dynare.org/u/Yaakov)\
**Post date:** [24 November 2022 12:46 UTC](https://forum.dynare.org/t/replicating-smoothed-variables-with-simul-t/21512/1 "2022-11-24T12:46:43Z")

</div>

Hi everyone,

I am using a calibrated model, and I am trying to replicate the observed variables with the smoothed shocks. I was trying to do that, but I had dissimilarities from the observed (and smoothed variables).

Eventually, I noticed that the difference was the “initial value” of the variable, as can be derived from shock decomposition. It made sense, as this is the portion of the variable that is not attributed to any shocks. I added that, and now the two series are exactly the same. Is there any better way to do that? Is this how I suppose to run it?

Yaakov

---

<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:** [1 December 2022 12:54 UTC](https://forum.dynare.org/t/replicating-smoothed-variables-with-simul-t/21512/2 "2022-12-01T12:54:13Z")

</div>

See [Choosing initial values for simult\_](https://forum.dynare.org/t/choosing-initial-values-for-simult-/2359)

---

<div class="post-metadata">

**Author:** ![Yaakov](https://forum.dynare.org/user_avatar/forum.dynare.org/yaakov/32/15432_2.png) [@Yaakov](https://forum.dynare.org/u/Yaakov)\
**Post date:** [19 December 2022 09:06 UTC](https://forum.dynare.org/t/replicating-smoothed-variables-with-simul-t/21512/3 "2022-12-19T09:06:28Z")

</div>

I managed to solve it. What threw me off was that the order of endogenous variables in “M\_.endo\_names” was different than the one in “oo\_.smoothedvariables”, although they were similar for the first few entries. Next time I will be more careful.
