Displaying 20 results from an estimated 5000 matches similar to: "Something strange in cor.test in R-1.8.0 (PR#4718)"
2003 Nov 07
2
Bug in cor.test - Spearman
Greetings.
There seems to be a problem with the P-value computation in the
cor.test with method="spearman". In R1.8.0 (MS Windows) I
seem to be getting intermittently nonsense P-values, but the rho's
are OK. I can get this reproducibly with the toy example attached
where the first use is OK and subsequent calls with the same data
give nonsense. (I have also seen the problem
2008 Jun 19
3
how to extract object from stats test output (cor.test)?
Hello,
Is there a way to extract output objects from a stats test without viewing
the entire output? I am trying to do so in the following:
define a vector of length j
for( i in 1: length (vector)) {
vector[i] = cor.test (datavector1, datavector2[i], method=("spearman"))
}
I would like the reported Spearman's rho to be saved in a vector. I have
tried a few different ways of
2010 Jun 08
2
cor.test() -- how to get the value of a coefficient
Hi, all.
Yet another beginner to R : )
I wonder, how it's possible to get the value of a coefficient from the
object produced by cor.test() ?
> cor.test(a, b, method="spearman")
Spearman's rank correlation rho
data: a and b
S = 21554.28, p-value = 2.496e-11
alternative hypothesis: true rho is not equal to 0
sample estimates:
rho
0.6807955
Warning message:
In
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:
2009 Apr 17
1
Turning off warnings from cor.test
I would like to turn off the warnings from cor.test while retaining
exact=NULL. Is that possible ?
> cor.test(c(1,2,3,3,4,5), c(1,2,3,3,4,5), method = "spearman")
Spearman's rank correlation rho
data: c(1, 2, 3, 3, 4, 5) and c(1, 2, 3, 3, 4, 5)
S = 0, p-value < 2.2e-16
alternative hypothesis: true rho is not equal to 0
sample estimates:
rho
1
Warning message:
In
2010 Jun 09
1
bug? in stats::cor for use=complete.obs with NAs
Arrrrr,
I think I've found a bug in the behavior of the stats::cor function when
NAs are present, but in case I'm missing something, could you look over
this example and let me know what you think:
> a = c(1,3,NA,1,2)
> b = c(1,2,1,1,4)
> cor(a,b,method="spearman", use="complete.obs")
[1] 0.8164966
> cor(a,b,method="spearman",
2009 Mar 13
1
cor.test(x,y)
Hi,
I am not sure which kind of test is applied to the data if you use
cor.test(x, y) ?
Is it an unpaired t-Test?
Regards
--
View this message in context: http://www.nabble.com/cor.test%28x%2Cy%29-tp22492993p22492993.html
Sent from the R help mailing list archive at Nabble.com.
2006 Sep 13
1
S in cor.test(..., method="spearman")
Dear HelpeRs,
I have some data:
"ice" <- structure(c(0.386, 0.374, 0.393, 0.425, 0.406, 0.344,
0.327, 0.288, 0.269, 0.256, 0.286, 0.298, 0.329, 0.318, 0.381,
0.381, 0.47, 0.443, 0.386, 0.342, 0.319, 0.307, 0.284, 0.326,
0.309, 0.359, 0.376, 0.416, 0.437, 0.548, 41, 56, 63, 68,
69, 65, 61, 47, 32, 24, 28, 26, 32, 40, 55, 63, 72, 72, 67,
60, 44, 40, 32, 27, 28, 33,
2004 Mar 19
1
cor.test() -> p-values may be incorrect due to tie
Hi R specialists,
When testing the association between two time series the cor.test gives
the following message...-> p-values may be incorrect due to tie
What does it mean? (it is not described in the help)
Thankx,
Jan
> cor.test(Origi[,1],Origi[,2], alternative = c("two.sided"),method =
c("spearman"), conf.level = 0.95)
Spearman's rank correlation rho
2006 Dec 05
1
Spearman correlation ties and discrepancies
Hi. I am currently trying to run some Spearman correlations, and have
encountered two issues.
1) When using cor.test() with a variable that includes ties, I get the
"Cannot compute exact p-values with ties" error. I have read that this
function now uses an asymptotic formula that allows for ties, so do not
understand why I am getting this error. (I am running version 2.4.0.)
I
2009 Aug 16
2
bootstrapped correlation confint lower than -1 ?
Dear R users,
Does the results below make any sense? Can the the interval of the
correlation coefficient be between *-1.0185* and -0.8265 at 95%
confidence level?
Liviu
> library(boot)
> data(mtcars)
> with(mtcars, cor.test(mpg, wt, met="spearman"))
Spearman's rank correlation rho
data: mpg and wt
S = 10292, p-value = 1.488e-11
alternative hypothesis: true rho is not
2010 Feb 08
2
Incorrect Kendall's tau for ordered variables (PR#14207)
Full_Name: Marek Ancukiewicz
Version: 2.10.1
OS: Linux
Submission from: (NULL) (74.0.49.2)
Both cor() and cor.test() incorrectly handle ordered variables with
method="kendall", cor() incorrectly handles ordered variables for
method="spearman" (method="person" always works correctly, while
method="spearman" works for cor.test, but not for cor()).
In
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 =
2011 Aug 09
1
Correlation Matrix - p value?
Hello all,
I've run a Spearman's Rank test to discern relationships between landscape
characteristics and a specific aspect of river behaviour.
I've executed a correlation matrix between the one dependent variable and
all of the predictors, which gives me a nice output of Spearman's Rho
values.
However, I also need to somehow find the "p" value, to assess the strength
2011 Nov 01
1
How to interpret Spearman Correlation
Hi,
I am not really familiar with Correlation foundations, although I read
a lot. So maybe if someone kindly help me to interpret the following
results.
I had the following R commands:
correlation <-cor( vector_CitationProximity , vector_Impact, method =
"spearman", use="na.or.complete")
cor_test<-cor.test(vector_CitationProximity, vector_Impact,
2007 Dec 04
1
How can I use the rho value in the cor.test() summary?
I want to give the "rho" value below to another variable.How ?
> Spearman's rank correlation rho
>
>
>
> data: a[, 3] and a[, 2]
>
> S = 22, p-value = 0.001174
>
> alternative hypothesis: true rho is not equal to 0
>
> sample estimates:
>
> rho
>
> 0.8666667
--
View this message in context:
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))
2007 Dec 04
1
R-help
> I recently picked up R for econometrics modeling, and I am confronted with
a
> problem. I use cor.test() for spearman test, and want to get the "rho" and
> "P-value" in the summary. Would you please tell me how to get them? Thank
you very much!
>
>
>
> Here is the cor.test() summary:
>
> Spearman's rank correlation rho
>
>
>
> data:
2004 Mar 03
1
cor(..., method="spearman") or cor(..., method="kendall") (PR#6641)
Dear R maintainers,
R is great. Now that I have that out of the way, I believe I have
encountered a bug, or at least an inconsistency, in how Spearman and
Kendall rank correlations are handled. Specifically, cor() and
cor.test() do not produce the same answer when the data contain NAs.
cor() treats the NAs as data, while cor.test() eliminates them. The
option
use="complete.obs" has
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)