Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: contemporaneous correlation matrix


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: contemporaneous correlation matrix
Date   Tue, 26 Apr 2011 23:15:55 +0100

It sounds as if you want the correlation between two variables for all
panels at the same time.

. corr x y if time == 42

is how to get that. Just specify the time you want and the pairs of
data points are contemporaneous.

Nick

On Tue, Apr 26, 2011 at 7:50 PM, Ben Ammar <Ben-Ammar@gmx.de> wrote:

> I was wondering how I can create a contemporaneous correlation matrix for my summary statistics if I have a panel data set. I am especially interested in the correlation between two of my variables. I guess simply using the -corr- command isn't enough as the correlation across time isn't included (right?!). I also tried to use the -xttest2- command after a -xtreg,fe- but I have more than 1700 panels, so that didn't work either and probably I won't know more about those two variables I'm concerned about. The regressions went well but maybe I missed something.

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index