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

st: pwcorr(2)

From   Kit Baum <>
Subject   st: pwcorr(2)
Date   Thu, 11 Dec 2008 20:33:21 -0500

< >
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
An Introduction to Modern Econometrics Using Stata:

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index