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]

st: RE: correlation matrix


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: correlation matrix
Date   Sun, 18 Apr 2010 00:02:35 +0200

<>

*******
clear*

inp int year str2 Country byte Residual
1990   C1   1
1991   C1   2
1992   C1   -3
1990   C2   -4
1991   C2   2
1992   C2   5
end

li, noo sepby(Country)

reshape wide Residual, i(year) j(Country) string
pwcorr ResidualC1 ResidualC2, sig star(.05)
*******


HTH
Martin

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Amin Mohseni
Sent: Samstag, 17. April 2010 23:22
To: statalist@hsphsun2.harvard.edu
Subject: st: correlation matrix

Dear All;
I am trying to calculate the correlation matrix for the residual from
an xtreg model of countries and years that also includes its
significance level. How do I do that? a hypothetical residual vector
looks like

year    Country    Residual
1990   C1            1
1991   C1            2
1992   C1            -3
1990   C2            -4
1991   C2            2
1992   C2            5


and I am trying to get the correlation matrix of residuals between C1
and C2, alongside their significance.

Many Thanks
amin
*
*   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/

*
*   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