|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: pwcorr(2)
< >
In the "users rush in where StataCorp fears to tread" department,
there is now a routine -pwcorr2- available on SSC. It is official -
pwcorr- with an added feature: three matrices are returned, containing
correlations (r(C), like -correlate-)), sample sizes (r(Cn)) and
significance levels (r(Cp)).
Nick Cox raises some very good points suggesting why StataCorp may
have failed to include this feature in official -pwcorr-. The matrices
returned should be used with caution; in particular, one should not
think of r(C) as being a 'correlation matrix' of the data, in the
sense that one may transform a variance-covariance matrix calculated
over N observations into a correlation matrix. But as a descriptive
tool, one may often want to calculate pairwise correlations over
disparate samples (particularly useful in my experience in time-series
data), and it is cumbersome to calculate them one pair at a time with -
correlate-. -pwcorr2- circumvents that limitation, but should be used
with caution.
-ssc describe pwcorr2- for details.
Kit Baum, Boston College Economics and DIW Berlin
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html
*
* 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/