# Correlation of simulated variables

**URL:** https://forum.dynare.org/t/correlation-of-simulated-variables/5020
**Category:** Dynare contributions and examples
**Created:** [29 September 2015 09:54 UTC](https://forum.dynare.org/t/correlation-of-simulated-variables/5020 "2015-09-29T09:54:39Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![leonard007](https://forum.dynare.org/letter_avatar_proxy/v4/letter/l/c4cdca/32.png) [@leonard007](https://forum.dynare.org/u/leonard007)
#### Post date: [29 September 2015 09:54 UTC](https://forum.dynare.org/t/correlation-of-simulated-variables/5020/1 "2015-09-29T09:54:39Z")

</div>

Hello Everyone,  
There is a table in dynare it calls : CORRELATION OF SIMULATED VARIABLES  
that I uploaded the table in the .tex here, I need the covariance between Lambda and Re every period of simulation to calculate E(Re(1))=(1-cov(Lambda(1),Re(1))/E(lambda(1)),that comes from asset pricing in Lucas tree, I tried to find these data in workspaces of dynare like oo\_.var or oo\_.dr but I was not successful.  
I would like to know how I can have access to data of this table?  
and If I put Euler equations like:  
Lambda(1)R=1;  
Lambda(1)Re(1)=1;  
Re(1)=(Y(1)+Q(1))/Q;  
log(Y)=.9\*log(Y(-1))+epsilon; //[that epsilon is my shock]  
dynare automatically will take it into account that E(Re(1))=(1-cov(Lambda(1),Re(1))/E(lambda(1)) and not Re(1)=R?

Sincerely,  
[CORRELATION OF SIMULATED VARIABLES.txt](https://forum.dynare.org/uploads/default/original/2X/2/2fd2768bb153c82740ea54ad8d0f42908eaa4da4.txt) (1.41 KB)

---

<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 October 2015 21:09 UTC](https://forum.dynare.org/t/correlation-of-simulated-variables/5020/2 "2015-10-01T21:09:09Z")

</div>

For the first part: if you want autocovariances, you have to reconstruct them from the autocorrelations and the covariance matrices stored in oo\_.gamma\_y

Regarding the second part: only at order\>1 will covariances play a role.
