[Gretl-users] Spearman Rank correlation
Allin Cottrell
cottrell at wfu.edu
Thu Jul 26 16:26:13 EDT 2007
On Thu, 26 Jul 2007, Angelo Secchi wrote:
> Now it seems ok, thanks. I checked also the test and I have a
> couple of doubts:
>
> 1. There something I do not understand in p-values. I believe
> you used the Normal approximation (instead of Student-T) because
> of ties. Am I right? Still the value obtained are significantly
> different from the ones obtained in R and Stata and I do not
> believe it is an approximation issue...
Yes, I was using (possibly mis-using) the normal approximation. I
have now changed this to use the t-approximation when there are
ties.
t(n - 2) = rho / sqrt((1 - rho) * (1 - rho) / (n - 2))
See what you think.
> 2. If I may, I would suggest to implement as default a two
> tailed alternative. In general this test is considered to verify
> the presence of correlation between two samples independently
> from its sign.
Yes, that's a good idea.
Allin.
More information about the Gretl-users
mailing list