Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: RE: correlation matrix


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
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: [email protected]
[mailto:[email protected]] On Behalf Of Amin Mohseni
Sent: Samstag, 17. April 2010 23:22
To: [email protected]
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index