similar to: Multiple output from cor.test

Displaying 20 results from an estimated 50000 matches similar to: "Multiple output from cor.test"

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
2004 Oct 27
0
wish - cor.test output order change (PR#7315)
Full_Name: Rob Baer Version: 2.0.0 OS: Windows Submission from: (NULL) (198.209.172.106) Request/wish summary: state the alternative hypothesis before the t-test and p-value A typical cor.test output looks like the following: > x=runif(30)*10 > y=runif(30)*10 > cor.test(x,y) Pearson's product-moment correlation data: x and y t = 0.6161, df = 28, p-value = 0.5428
2009 Jul 07
1
cor vs cor.test
Hi, I am trying to use R for some survey analysis, and need to compute the significance of some correlations. I read the man pages for cor and cor.test, but I am confused about - whether these functions are intended to work the same way - about how these functions handle NA values - whether cor.test supports 'use = complete.obs'. Some example output may explain why I am confused:
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 Mar 30
2
Problem: using cor.test with by( )
Hello everyone, I'm a new R user switching from SAS and JMP. In the first few days, I have been trying to do a fairly simple task but yet found no success. I've checked the help archive as well as few R textbooks but didn't seem to find the answer. So, please help me if you can. Basically, I want to calculate the correlation between variable A and B for every subject in my
2010 Mar 30
3
use logical in cor.test
Hi, I've got 4 variables that I want to effectively 'stack' so that I have a grand R variable and a grand L variable. This works to achieve that goal: Twin1cor<-with(twin.wide,cbind(ACDepthR.1,ACDepthL.1)) Twin2cor<-with(twin.wide,cbind(ACDepthR.2,ACDepthL.2)) Both<-rbind(Twin1cor,Twin2cor) > str(Both) num [1:1858, 1:2] 3.36 NA NA NA NA NA NA 3.92 3.5 NA ... - attr(*,
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 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
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
2007 Mar 07
2
Multi-line plots with matrices in R
Hello all, I'm a new user of R, experienced with Octave/MATLAB and therefore struggling a bit with the new syntax. One of the easy things in Octave or MATLAB is to plot multiple lines or sets of points by using a matrix where either the columns or the rows contain the y-values to be plotted. Both packages automatically give each line/points their own unique colour, character etc. I'm
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,
2007 Jul 24
1
cor inside/outside a function has different output
I'm calculating correlations between two matrices mat1 <- matrix(sample(1:500,25), ncol = 5, dimnames=list(paste("mat1row", 1:5, sep=""), paste("mat1col", 1:5, sep=""))) mat2 <- matrix(sample(501:1000,25), ncol = 5, dimnames=list(paste("mat2row", 1:5, sep=""), paste("mat2col", 1:5, sep="")))
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
2011 Oct 03
2
extracting p-values in scientific notation
Dear all How does print.htest display the p-value in scientific notation? > (x <- cor.test(iris[[1]], iris[[3]])) Pearson's product-moment correlation data: iris[[1]] and iris[[3]] t = 21.65, df = 148, p-value < 2.2e-16 alternative hypothesis: true correlation is not equal to 0 95 percent confidence interval: 0.8270 0.9055 sample estimates: cor 0.8718 Above the p-value comes
2008 May 09
0
applying cor.test to a (m, n) matrix - SUMMARY
Hi again, I've got few very good options from the list and since they were not posted to the list, I will provide a summary. Thank you very much to all who answered and I hope this summary will benefit others interested in solving similar problems like that. Yasir Kaheil re-wrote my original code in a more streamlined way: pr<-array(0,c(dim(x)[2],dim(x)[2])); for (i in 1:dim(x)[2]) for
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
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:
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:
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",
2005 Jul 23
2
cor(X) with P-Value
Friends I am new to R (and statistics) so am struggling a bit. Briefly... I am interested in getting the P-Value from cor(X) where X is a matrix. I have found cor.test. Verbosely... I have 4 vectors and can generate the corellation matrix... > cor(cbind(X1, X2, X3, X4)) X1 X2 X3 X4 X1 1.00000000 -0.06190365 -0.156972795 0.182547517 X2