# Overloop estimation in .mod takes more than due

**URL:** <https://forum.dynare.org/t/overloop-estimation-in-mod-takes-more-than-due/10689>\
**Category:** DSGE-VAR\
**Created:** [5 September 2017 13:41 UTC](https://forum.dynare.org/t/overloop-estimation-in-mod-takes-more-than-due/10689 "2017-09-05T13:41:43Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [7 September 2017 08:49 UTC](https://forum.dynare.org/t/overloop-estimation-in-mod-takes-more-than-due/10689/2 "2017-09-07T08:49:50Z")

</div>

In its current version you have the overhead of 1 execution from the initial estimation command in the mod-file before entering the loop. If you just increase the size of the loop, that fixed one additional execution is negligible. If you still want to get rid of it, you need to condition on the first run. See

> [@Loop over parameters](https://forum.dynare.org/t/loop-over-parameters/3335):
>
> Hi, I know that this problem was broached on this forum many times since I found some topics connected with it but I didn’t find any solution for my problem. I want to look at some statistics of variables in the model when some parameters change. The steady state is calculated by hand and included in ‘initval’. For creating the loop over parameters, I used simple syntax like this: rhos = 0.8:0.05:1.05; for i=1:length(rhos); rho = rhos(i); stoch\_simul(order=1); if info; disp('Computation fails…

---

_[View the full topic](https://forum.dynare.org/t/overloop-estimation-in-mod-takes-more-than-due/10689)._
