Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: printing correlation coefficient > 0.6 after pwcorr


From   "Ronnie Babigumira" <[email protected]>
To   <[email protected]>
Subject   RE: st: printing correlation coefficient > 0.6 after pwcorr
Date   Wed, 23 Feb 2005 16:46:55 +0100

Many thanks Fred and Nick for this. This solves the later of my
problems. Comments on my earlier posting (forval) are welcome :-)

Ronnie

>>> [email protected] 23.02.2005 16:08:38 >>>
I guess that you want abs(r) > 0.6, not r > abs(0.6).

Either way, in addition to canned commands, note that the double
-forval- technique used by Ronnie in another thread
offers an easy direct solution. Given that you
have put the correlation matrix into a Stata matrix
(at least 3 ways to do that), you need a loop
something like

forval i = 1/10 {
	forval j = 1/10 {
		mat foo[`i',`j'] = cond(abs(foo[`i',`j']) <
0.6,.,foo[`i',`j'])
	}
}

which can be automated as desired.

Nick
[email protected]

Fred Wolfe

> I think the program used to do this in its earlier
> incarnations. However,
> you can use -corrtab- which will do this for you. ssc install
corrtab.

Ronnie

> >Hi, I am inspecting my data and would like to look at some pairwise
> >correlations, however I would like to print or star correlation
> >coefficients that are greater than abs(0.6). pwcorr, sig does not
do
> >what I want, it highlights statistically significant
> relationships but
> >these values may be lower than what my interest is.

*
*   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/
*
*   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