Page 1 of 1

cross-correlation

PostPosted: Tue Feb 16, 2010 5:07 pm
by colcia
Hello

using stoch_simul I can get the matrix of theoretical contemporaneous cross correlations between HP filtered variables. Is there a way to obtain theoretical cross correlations of HP filtered variables at various leads and lags?

Thanks and best regards

Andrea

Re: cross-correlation

PostPosted: Tue Feb 23, 2010 10:59 am
by StephaneAdjemian
Hi,

The (theoretical and simulated) cross autocorrelations are not displayed by Dynare but are computed. You will find the autocorrelation function in oo_.gamma_y. By default the order of the autocorrelation function is five. To display the autocorrelation of order h (0<h<=5 if you do not change the default) you just have to type

Code: Select all
oo_.gamma_y{h+1}


oo_.gamma_y is a cell of arrays this explains the curly braces. The first element of this cell is the covariance of the endogenous variables, the 5 following elements are for the autocovariance function, last element is for the variance decomposition.

Best,
Stéphane.

Re: cross-correlation

PostPosted: Thu Jun 19, 2014 3:09 am
by mpalmero
Hi Stéphane,
I'm using V 4.4.2, and I want to get the cross-correlations 5 lags 5 leads, How do I get it, and is there a command to do it easily, if so, what and where do I have to type it.
Many Thanks
Martin

Re: cross-correlation

PostPosted: Thu Jun 19, 2014 8:55 am
by brasidas1
One easy way of doing this is to just define new variables such as x = y(-1), z(-1) = y and so on.

Re: cross-correlation

PostPosted: Sun Jun 22, 2014 10:23 am
by jpfeifer
As Stephane said, after running stoch_simul, they are stored in oo_.gamma_y as documented in the manual.