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: Selecting correlations with highest absolute value


From   Joe Canner <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: RE: Selecting correlations with highest absolute value
Date   Tue, 8 Oct 2013 19:39:07 +0000

Dara,

Here's one quick-n-dirty possibility. (It requires installing -matvsort- from SSC.)

. corr varlist
. matrix corrvector=vec(r(C))
. matvsort corrvector sortedvector
. matrix list sortedvector

Regards,
Joe Canner
Johns Hopkins University School of Medicine


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Dara Shifrer
Sent: Tuesday, October 08, 2013 3:16 PM
To: [email protected]
Subject: st: Selecting correlations with highest absolute value


In SAS, I was able to quickly determine which pairs of variables were 
most highly correlated using the 'best' option with the 'proc corr' 
command ("*BEST=*/n ----/**/**/prints */n/* correlation coefficients for 
each variable. Correlations are ordered from highest to lowest in 
absolute value.) After extensive searching, I have not been able to 
locate a Stata command that does something similar.

If this is not possible in Stata, maybe Stata experts have suggestions 
for my ultimate purpose: constructing equations to facilitate a smoother 
and faster running of Stata's 'ice' command.

Any help would be greatly appreciated,
Dara Shifrer

-- 
Postdoctoral Fellow, Houston Education Research Consortium
Kinder Institute for Urban Research
Rice University
[email protected]

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index