Displaying 20 results from an estimated 900 matches similar to: "How can I use the rho value in the cor.test() summary?"
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:
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)
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 Jul 09
1
Strange t-test error: "grouping factor must have exactly 2 levels" while it does...
Hi,
Could anyone tell me what is wrong:
> length(unique(mydata$myvariable))
[1] 2
>
and in t-test:
(...)
Error in t.test.formula(othervariable ~ myvariable, mydata) :
grouping factor must have exactly 2 levels
>
I re-checked the code and still don't get what is wrong.
Moreover, there is some strange behavior:
/1 It seems that the error is vulnerable to NA'a, because it
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.
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
2003 Oct 22
6
Something strange in cor.test in R-1.8.0 (PR#4718)
Full_Name: Ian Wilson
Version: R-1.8.0
OS: Windows (but own compilation)
Submission from: (NULL) (139.133.7.38)
the p-value is incorrect for cor.test using method "spearman" in R-1.8.0. This
was not the case in R-1.7.1.
Version R-1.8.0 on Windows
> cor.test(rnorm(50),rnorm(50),method="spearman")
Spearman's rank correlation rho
data: rnorm(50) and rnorm(50)
S
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
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
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
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,
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",
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",
2008 Jan 02
2
strange behavior of cor() with pairwise.complete.obs
Hi all,
I'm not quite sure if this is a feature or a bug or if I just fail to understand
the documentation:
If I use cor() with pairwise.complete.obs and method=pearson, the result is a
scalar:
->cor(c(1,2,3),c(3,4,6),use="pairwise.complete.obs",method="pearson")
[1] 0.9819805
The documentation says that
" '"pairwise.complete.obs"' only
2002 May 01
3
bivariate normal cdf and rho
Suppose F(x, y; rho) is the cdf of a bivariate normal distribution, with
standardized marginals and correlation parameter rho. For any fixed x and
y, I wonder if F(x, y; rho) is a monotone increasing function of rho,
i.e., there is a 1 to 1 map from rho to F(x, y; rho).
I explored it using the function pmvnorm in package mvtnorm with
different x and y. The plot suggests the statement may be true.
2012 Jan 16
1
rho stat from a fasta sequence file
Hi all,
I have a sequence file (fasta format) and want to calculate the rho
statistics for dinucleotide abundance value on my data.. the code which I
use is (using seqinr library and current working directory)
seq_info<-read.fasta("gene.txt")
rho(seq_info[1],2)
but it yields only the dinucleotides, not their rho values, i.e,
> rho(seq_info[1],2)
aa ac ag at ca cc cg ct ga gc
2009 Jul 10
2
error: optim(rho, n2ll.rho, method = method, control = control, beta = parm$beta, : initial value in 'vmmin' is not finite
I am trying to use the lnam autocorrelation model from the SNA package. I have it running for smaller adjacency matrices (<1,500) it works just fine but when my matrices are bigger 4000+. I get the error:
> lnam1_01.adj<- lnam(data01$adopt,x01,ec2001.csr)
Error in optim(rho, n2ll.rho, method = method, control = control, beta = parm$beta, :
initial value in 'vmmin' is not
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 Sep 09
2
logistic regression for a data set with perfect separation
Dear R experts
I have the follwoing data
V1 V2
1 -5.8000000 0
2 -4.8000000 0
3 -2.8666667 0
4 -0.8666667 0
5 -0.7333333 0
6 -1.6666667 0
7 -0.1333333 1
8 1.2000000 1
9 1.3333333 1
and I want to know, whether V1 can predict V2: of course it can, since
there is a perfect separation between cases 1..6 and 7..9
How can I test, whether this conclusion (being able to assign an