Displaying 20 results from an estimated 1000 matches similar to: "Spearman's rank correlation test (PR#13574)"
2009 Feb 12
0
Spearman's rank correlation test
Hi All:
help(cor.test) claims
For Spearman's test, p-values are computed using algorithm AS 89.
Algorithm AS 89 was introduced by the paper
D. J. Best & D. E. Roberts (1975), Algorithm AS 89: The Upper Tail
Probabilities of Spearman's rho. Applied Statistics, Vol. 24, No. 3, 377-379.
Table 1(a) in this paper presents maximum absolute error |\Delta_m|, of the
approximation for
2005 Aug 23
0
NAs by integer overflow in Spearman's test p-value (PR#8087)
Full_Name: Jan T. Kim
Version: 2.1.0 (and better)
OS: Linux
Submission from: (NULL) (139.222.3.229)
The p value in Spearman's test is NA if the length of x exceeds 46340, due to
an integer overflow, occurring if length(n) > sqrt(2^31):
> n <- 46341;
> set.seed(1);
> x <- runif(n);
> y <- runif(n);
> cor.test(x, y, method =
2005 Aug 23
0
(PR#8087) NAs by integer overflow in Spearman's test p-value
There is an even simpler way: someone wrote n*(n^2-1) as n*(n-1)*(n+1)
and caused the problem.
Your superfluous semicolons do definitely make your code harder to read.
On Tue, 23 Aug 2005 jtk at cmp.uea.ac.uk wrote:
> Full_Name: Jan T. Kim
> Version: 2.1.0 (and better)
> OS: Linux
> Submission from: (NULL) (139.222.3.229)
>
>
> The p value in Spearman's test is NA if
2006 May 24
0
the computation of exact p-value for the nonparametric cor-test with ties
Hello,
I wuold like to propose my modifications of the original cor.test to you : I
tried to calcolate the correct p-value for Spearman and Kendall's test with
ties.
Let me know what you think.
Thanks you for your time.
Antonietta di Salvatore
test <- function(x, ...) UseMethod("test")
test.default <-
function(x, y, alternative = c("two.sided",
2004 May 20
1
Spearman probabilities and SuppDists
cor.test and SuppDists give me different P-values for the same
Spearman's rho. Which is correct, or am I doing something wrong?
> x <- c(44.4, 45.9, 41.9, 53.3, 44.7, 44.1, 50.7, 45.2, 60.1)
> y <- c( 2.6, 3.1, 2.5, 5.0, 3.6, 4.0, 5.2, 2.8, 3.8)
> cor.test(x,y,method="spearman")
Spearman's rank correlation rho
data: x and y
S = 48, p-value =
2009 Nov 30
1
cor.test(method = spearman, exact = TRUE) not exact (PR#14095)
Full_Name: David Simcha
Version: 2.10
OS: Windows XP Home
Submission from: (NULL) (173.3.208.5)
> a <- c(1:10)
> b <- c(1:10)
> cor.test(a, b, method = "spearman", alternative = "greater", exact = TRUE)
Spearman's rank correlation rho
data: a and b
S = 0, p-value < 2.2e-16
alternative hypothesis: true rho is greater than 0
sample estimates:
2004 Oct 14
1
correlating between two vectors of numbers
Hi, R!
Question1:
I am trying to correlate two vectors of numbers (two columns of microarray
signal values) by using the non-parametric Spearman's rank correlation
coefficient rho:
> cor.test(V2.Signal,V3.Signal,method="spearman")
but I get the error message:
Error in if (q > (n^3 - n)/6) pspearman(q - 1, n, lower.tail = FALSE) else
pspearman(q, :
missing value
2009 Jan 17
1
bug in cor.test(method = "spearman")
Dear R developers:
There is a possible bug in calculating the p-value
for Spearman's rank correlation.
Line 155 in file
R-patched/src/library/stats/R/cor.test.R
is
as.double(round(q) + lower.tail),
I think, it should be
as.double(round(q) + 2*lower.tail),
The reason is that round(q) is expected to be an even number
(the S statistic), so the next feasible value is round(q)+2.
2003 Apr 01
2
cor.test observations limit
Hi,
Is there a limit on the number of observations for using cor.test. For
example,
> library(ctest)
> cor.test(rnorm(3000), rnorm(3000), method="spearman")
Error in if (q > (n^3 - n)/6) pspearman(q - 1, n, lower.tail = FALSE) else
pspearman(q, :
missing value where logical needed
In addition: Warning message:
NAs introduced by coercion
I mainly want to calculate
2004 Mar 15
1
spearman rank correlation problem
Hello R gurus,
I want to calculate the Spearman rho between two ranked lists. I am
getting results with cor.test that differ in comparison to my own
spearman function:
> my.spearman
function(l1, l2) {
if(length(l1) != length(l2)) stop("lists must have same length")
r1 <- rank(l1)
r2 <- rank(l2)
dsq <- sapply(r1-r2,function(x) x^2)
1 - ((6 * sum(dsq))
2005 Oct 24
2
Spearman's Rho Help!
Hi,
I have a dataset with four categories of data, the number of samples are not
the same in each category. I want to find the Spearaman's Rho. Let me give
an example.
x=(14.22770439,26.49420624,46.7277932,19.02550707,23.37379361,16.97789862,19.77100085,23.11270162,13.72929843,33.54430621,14.4756979,70.15811106,11.22789833,NA,NA,NA)
2001 Sep 09
1
Spearman's analysis
I have computed correlation coefficients for my dissertation data using
Spearman's Rho with adjustments for tie scores; however, I do not have access
to a way to find exact p's. I have a friend who has R but he doesn't know if
it is appropriate for my analysis, given the constraint of tie scores? Can
you advise me? Thanks. Michele Fagan
-------------- next part --------------
An
2007 Jul 20
1
how to determine/assign a numeric vector to "Y" in the cor.test function for spearman's correlations?
Hello to all of you, R-expeRts!
I am trying to compute the cor.test for a matrix that i labelled mydata
according to mydata=read.csv...
then I converted my csv file into a matrix with the
mydata=as.matrix(mydata)
NOW, I need to get the p-values from the correlations...
I can successfully get the spearman's correlation matrix with:
cor(mydata, method="s",
2009 Mar 05
1
Bug in Rdconv(.pm) (PR#13575)
For the record (and as privately discussed with Brian Ripley), happens
with all recent versions of R including R-devel from today:
Consider a simple a.Rd file containing the lines
==================
\name{a}
\title{a}
\value{\code{a} \code{\link[a]{a}} \pkg{a}
\item{a}{a}
}
==================
with these lines, I get, e.g.:
==================
R CMD Rdconv --type="txt" a.Rd
a
2005 Jan 25
1
spearman rank test correlation
Hallo,
does anybody know if there is an implementation of the Spearman rank
correlation in R that gives a correct (or at least 'safe') p-value in
the case of ties??
I have browsed the R-help archives but I found nothing.
Thanks a lot in advance for any help,
Antonino Casile
2012 Aug 29
3
Help on calculating spearman rank correlation for a data frame with conditions
Dear all,
Suppose my data frame is as follows:
id price distance
1 2 4
1 3 5
...
2 4 8
2 5 9
...
n 3 7
n 8 9
I would like to calculate the rank-order correlation between price and
distance for each id.
cor(price,distance,method = "spearman") calculate a correlation for all.
Then I tried to use
apply(data,list='id',cor(price , distance , method =
2013 Mar 15
1
Spearman rank correlation
Hi
If I get a p-value less than 0.05 does that mean there is a
significant relation between the 2 ranked lists? Sometimes I get a low
correlation such as 0.3 or even 0.2 and the p-value is so low , such
as 0.000001 , does that mean it is significant also? and would that be
interpreted as significant low positive correlation or significant
moderate positive correlation? Also,can R calculate the
2003 Jan 23
1
spearman rank correlation
hello help,
i''ve searched through the manual pages and the only reference i can find to spearman rank correlation is cor.test, which only seems to give the significance value of the correlation.
is there any way to get the actual value of rho?
david.
[[alternate HTML version deleted]]
2008 Feb 28
4
p-value in Spearman rank order
Dear R-helpers,
I would like to do a Spearman rank order test, and used the cor() function
with the method "spearman".
It gives me a number (correlation coefficient?) , but how can I get the
p-value?
Thank you for the help in advance!
Regards,
Anne-Katrin
--
[[alternative HTML version deleted]]
2003 May 11
2
rank correlation and distance between two different matrices
Dear all,
in package Hmisc `rcorr' computes a matrix of Spearman's `rho' rank
correlation coefficients for all possible pairs of columns of a matrix.
What if I want a matrix of rank correlation coefficients for pair of
columns of two different matrices?
I have the same question about distance metrics in package Vegan. The
function 'vegdist' computes distance indexes for all