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 at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: Variable equal to correlations per period & per agent


From   Nick Cox <njcoxstata@gmail.com>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: Variable equal to correlations per period & per agent
Date   Mon, 27 May 2013 21:03:28 +0100

-egenmore- (SSC) has a -corr()- function written by Nick Winter.

P-values? Those are pretty hard to calculate without factoring in the
dependence structure in your panels. You could assume independence and
fire up -atanh()- but you be deluding yourself that they could be
trusted.
Nick
njcoxstata@gmail.com


On 27 May 2013 20:58, Miguel Angel Duran Munoz <maduran@uma.es> wrote:
> Hi, Statalisters. I have a few files with panel data structure. In each of
> these files I have two variables, say x and y.
>
> For each of those files I want to generate, first, a variable that is
> equal to the correlation coefficient between x and y per period (and
> another variable that is equal to the p-values of the coefficients).
>
> Second, a variable that is equal to the correlation coefficient between x
> and y per agent (and another one that is equal to the p-values of the
> coefficients).
>
> Does anyone know whether there is a shortcut to do this so that I do not
> have to generate those two variables manually? Thanks in advance.
>
> Miguel.
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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