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" <>
To   <>
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 :-)


>>> 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']) <

which can be automated as desired.


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


> >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
> >what I want, it highlights statistically significant
> relationships but
> >these values may be lower than what my interest is.

*   For searches and help try:
*   For searches and help try:

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