# A time depending variance for a shock

**URL:** <https://forum.dynare.org/t/a-time-depending-variance-for-a-shock/10691>\
**Category:** Stochastic simulations\
**Created:** [5 September 2017 14:28 UTC](https://forum.dynare.org/t/a-time-depending-variance-for-a-shock/10691 "2017-09-05T14:28:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![NicoMore](https://forum.dynare.org/letter_avatar_proxy/v4/letter/n/da6949/32.png) [@NicoMore](https://forum.dynare.org/u/NicoMore)\
**Post date:** [5 September 2017 14:28 UTC](https://forum.dynare.org/t/a-time-depending-variance-for-a-shock/10691/1 "2017-09-05T14:28:59Z")

</div>

Hello,

I’m currently working with a DSGE model and what I would like to do is to make the variance of a measurement error change over time. I found this post [Change in Measurement error variance](https://forum.dynare.org/t/change-in-measurement-error-variance/6155) that is closely related to mine. However, I’m not talking about a structural change, necessarily. Basically, I’m thinking more of a variance that can change several times along the path of the model or even change in every period. So I’m wondering if you could, for example, set the variance of a shock equal to an “auxiliary” observable shock/variable, thus making such variance time dependent. Is that at all posible or Dynare will demand me to specify a constant number instead?

Thanks!

---

<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:** [5 September 2017 15:19 UTC](https://forum.dynare.org/t/a-time-depending-variance-for-a-shock/10691/2 "2017-09-05T15:19:36Z")

</div>

What you have in mind is hardly possible. You don’t need to rely on Dynare’s built-in functionality for measurement errors, which relies on them being homoskedastic. Instead, you can define a normal shock for it. See `6.1 Measurement Errors as a Special Case of Exogenous variables` of Pfeifer(2013): [“A Guide to Specifying Observation Equations for the Estimation of DSGE Models”](http://sites.google.com/site/pfeiferecon/Pfeifer_2013_Observation_Equations.pdf)  
What you seem to suggest is having a measurement error with stochastic volatility. The problem is that this would turn your model solution/state-space representation nonlinear, making estimation unfeasible with Dynare as you would need to go to third order. Simulation would work, though.

---

<div class="post-metadata">

**Author:** ![NicoMore](https://forum.dynare.org/letter_avatar_proxy/v4/letter/n/da6949/32.png) [@NicoMore](https://forum.dynare.org/u/NicoMore)\
**Post date:** [6 September 2017 14:07 UTC](https://forum.dynare.org/t/a-time-depending-variance-for-a-shock/10691/3 "2017-09-06T14:07:42Z")

</div>

First of all. thanks for your prompt response. Nevertheless I have a follow up question. You said that relying on Dynare’s built-in functionality to introduce measurement errors implies homoscedasticity. Suppose I’m no longer interested in having stochastic volatility, can I still have a heteroskedastic measurement error (but, strictly, still a deterministic variance) if I introduce such error in some kind of way?

---

<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:** [10 September 2017 07:08 UTC](https://forum.dynare.org/t/a-time-depending-variance-for-a-shock/10691/4 "2017-09-10T07:08:21Z")

</div>

Unfortunately, that is not so easy. What you have in mind amounts to a “structural break” in the Kalman filter. See my reply at [Estimation With Structural Break In Shock Processes](https://forum.dynare.org/t/estimation-with-structural-break-in-shock-processes/5011/3)  
Supporting this is still on our to-do-list, see [http://www.dynare.org/DynareWiki/SubsamplesEstimation](http://www.dynare.org/DynareWiki/SubsamplesEstimation)
