Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Storing a correlation matrix


From   Marcello Pagano <[email protected]>
To   [email protected]
Subject   Re: st: Storing a correlation matrix
Date   Tue, 18 Apr 2006 15:28:19 -0400

Thanks Bill and Nick. As always, there are more than one way to do what one wants in Stata. In this instance, Adrian Mander's -matpwcorr- does exactly what I want and it also gives me the Bonferroni-ps and I can plot the whole with his -plotmatrix- ! What more can a man ask for!!

Thanks to all who responded.

m.p.

William Gould, Stata wrote:


Marcello Pagano <[email protected]> wrote,


Bill Gould in 1999 answered the question of how to store pairwise correlations of a varlist in a matrix--basically calculate the covariance matrix and then convert it into a correlation matrix. The problem with that answer is that it does not use all the data--basically the difference between -corr-and -pwcorr-. Does anyone have a better answer, one that uses all the data, like -pwcorr- does?

One solution would be the following Mata function,

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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