# Violation of Jensen's Inequality?

**URL:** <https://forum.dynare.org/t/violation-of-jensens-inequality/2707>\
**Category:** Dynare help (legacy posts)\
**Created:** [9 September 2012 19:10 UTC](https://forum.dynare.org/t/violation-of-jensens-inequality/2707 "2012-09-09T19:10:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AnitaYang](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/e36b37/32.png) [@AnitaYang](https://forum.dynare.org/u/AnitaYang)\
**Post date:** [9 September 2012 19:10 UTC](https://forum.dynare.org/t/violation-of-jensens-inequality/2707/1 "2012-09-09T19:10:23Z")

</div>

I’ve read most posts regarding how Dynare implements an implicit conditional expectations operator and when we may need to add an auxiliary variable. For example,  
[[Expectation of function,vs,function of expectations](https://forum.dynare.org/t/expectation-of-function-vs-function-of-expectations/2348/1))  
[[Expected value of a power](https://forum.dynare.org/t/expected-value-of-a-power/2200/1))

However, the following message from model\_diagnostic does confuse me.

model\_diagnostic: the Jacobian of the static model is singular  
there is 1 colinear relationships between the variables and the equations  
Colinear variables:  
y  
c  
ca  
cn  
h  
ha  
hn  
gs  
qs  
s  
g  
wr  
br  
dr  
ndr  
tr  
tra  
tb  
Colinear equations  
5 6 8

Here are equation 5, 6 , and 8 in my model:

```auto
1 = beta*rf*(qs(+1)/qs/pistar(+1))*((ca(+1)/ca)^(-rho));
1 = beta*r*(gs/gs(+1)/pih(+1))*((ca(+1)/ca)^(-rho));
rf = r*(qs*gs*pistar(+1)/(qs(+1)*gs(+1)*pih(+1)));
```

I understand we can ignor the Jensen’s inequality if we consider the log-linearized model, and then the equation 5 and 6 imply the equation 8. However, I don’t understand why these three equations still have the conlinear relationship when we’ve considered the second order approximation of model. Does Dynare still not take into account the Jensen inequality when I simulate the model at order 2?

I’d appreciate any idea. Thank you.

---

<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:** [17 September 2012 17:49 UTC](https://forum.dynare.org/t/violation-of-jensens-inequality/2707/2 "2012-09-17T17:49:30Z")

</div>

model\_diagnostics only checks the Jacobian (i.e. first order derivative) and this of the static model (i.e. ignoring the different timing). I am not aware that this has direct implications for the second order terms resulting from Jensen’s Inequality. It is just a useful diagnostic check that can help to detect errors.  
You can make sure that the Jensen’s terms are not ignored by looking at the oo\_.dr.gs2 terms that store the uncertainty correction.
