Statalist


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

st: RE: problem with spearman option: stats


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: problem with spearman option: stats
Date   Wed, 8 Oct 2008 17:30:06 +0100

Your name does not show up in my mailer or the Statalist archives. You
might want to adjust your mailer settings. 

Type 

. whelp spearman 

in your Stata to see what the correct syntax is. My manual for
-spearman- for Stata 8 has got buried somewhere, but I think you are
using a later syntax which doesn't apply. 
Perhaps you are reading the syntax off the StataCorp website. 

The easiest way I know to get a table for -spearman- is just to
rank-transform all the variables and then apply -correlate-. 

sysuse auto, clear
foreach v of var price-gear { 
	egen rank_`v' = rank(`v') 
} 
corr rank*

You can square Spearman rank correlation coefficients if you so wish,
but I don't think it serves much useful purpose. The interpretation is
presumably that (e.g.) a Spearman rank correlation of 0.8 means that 64%
of the variance in the rank of one variable is explained by the rank of
the other. 

Nick 
[email protected] 

I have a problem with spearman, perhaps because I use stata8:

I used spearman A B, stats (rho obs p) to display the correlation 
coefficient, number of observations, and significance level. But stata 
always says: options not allowed, r(101). What is wrong? Alternatively, 
it would help me to get a hint how to create tables for spearman (like 
outreg for regressions).

In addition, I got a rank correlation coefficient of 0.6 between 
variable "A" and variable "B". Now I would like to say: A has a 
correlation with B of 0.65, suggesting that A explains ?% of the 
variation in B. Does anyone know which command to use?

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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