Page 1 of 1
Correlation mat vs corrcoef
Posted:
Tue Jan 17, 2012 1:06 pm
by Glm
Hi!
If I run a simulation using the following simul_stoch command.
stoch_simul(order=1, irf=400, periods=100000, nograph, hp_filter=1600);
The correlation between X and Y in the correlation matrix is not the same as using the Matlab command corrcoef(X,Y). How come?
\\\Glenn
Re: Correlation mat vs corrcoef
Posted:
Tue Jan 17, 2012 4:55 pm
by jpfeifer
Hi, could you specify in more detail how you compute moments with corrcoef(X,Y)? Which simulated data do you use? And did you HP-filter them? The simulated data provided by Dynare when using the hp_filter option is not filtered yet. This could explain the differences.
Re: Correlation mat vs corrcoef
Posted:
Tue Jan 17, 2012 6:47 pm
by Glm
Yeah, you are right, it made a big difference when taking away the hp_filter command. Thank you
. Furthermore, do you know how people do in general when using Dynare output in their papers? Do they use the theoretical moments and correlations or the simulated ones? I mean which is the safe way to go when using Dynare output in a paper?
Re: Correlation mat vs corrcoef
Posted:
Tue Jan 17, 2012 6:54 pm
by jpfeifer
It depends. Papers usually specify if the moments they use are theoretical ones or generated from simulated data. My personal feeling is that if you have theoretical moments, there is no use in approximating these numbers with a finite sample. Asymptotically, you will converge to the theoretical numbers in any case.