similar to: Spearman correlation and missing observations

Displaying 20 results from an estimated 2000 matches similar to: "Spearman correlation and missing observations"

2004 Jun 07
3
Aggregate rows to see the number of occurences
Hi, I have a set of data like the following: [,1] [,2] [1,] 10 2 [2,] 7 0 [3,] 1 0 [4,] 1 0 [5,] 15 0 [6,] 17 4 [7,] 4 0 [8,] 19 8 [9,] 10 2 [10,] 19 5 I'd like to aggregate it in order to obtain the frequency (the number of occurences) for each couple of values (e.g.: (10,2) appears twice, (7,0) appears once). Something cool
2004 Jun 03
1
Problem with par("usr")
Hi, I'm trying to use the "usr" argument but I see no effect of this option on my plots. For example: > par(usr=c(0,4,0,4)) > plot(1,1) This plots one point fine, but the coordinates of the plotting region are not those that I specified using par()... I can check this with > par("usr") [1] 0.568 1.432 0.568 1.432 What can I change in order to have this
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
2007 Sep 19
2
By() with method = spearman
I have a data set where I want the correlations between 2 variables conditional on a students grade level. This code works just fine. by(tmp[,c('mtsc07', 'DCBASmathscoreSPRING')], tmp$Grade, cor, use='complete', method='pearson') However, this generates an error by(tmp[,c('mtsc07', 'DCBASmathscoreSPRING')], tmp$Grade, cor, use='complete',
2010 Jul 20
1
blank pdf output when called in a loop
Hi, I'm hitting a strange problem where pdf plots that I'm trying to make are blank, only when produced from within a loop. The pdf contains 0 page. I've narrowed the problem to this minimal script that invariably produces an empty pdf with my setup: pdf("/local/scratch/1.pdf", width=8, height=8) for (k in 1) { wireframe(volcano) } dev.off() The odd thing is that
2013 Feb 13
5
spearman correlation and p-value as a matrix
I have two data matrices that I want to make the correlation between each column from data1 and each column from data 2 and also calculate the p-value Matrices dont have the same size and I tried such a script. > bg <- read.table (file.choose(), header=T, row.names) > bg > Otu00022 Otu00029 Otu00039 Otu00042 Otu00101 Otu00105 Otu00125 Otu00131 Otu00137 Otu00155 Otu00158 Otu00172
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))
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 =
2011 Jan 21
0
Possible bug in Spearman correlation with use="pairwise.complete.obs"
Hi, I have just encountered a strange behaviour from 'cor' with regards to the treatment of NAs when calculating Spearman correlations. I guess it is a subtle bug. If I understand the help page correctly, the two modes 'complete.obs' and 'pairwise.complete.obs' specify how to deal with correlation coefficients when calculating a correlation _matrix_. When calculating
2002 Apr 26
2
Spearman Correlation
Hi all, Is there a convenient way to calculate Spearman correlation coefficients in R? Nick Nianqing Xiao, Ph.D NCI Center for Bioinformatics, NIH SAIC/Advanced Systems Group > 6116 EXECUTIVE BLVD 4026J > MSC 8335 > BETHESDA MD 20852 Phone: 301-451-6357 Fax: 301-480-4222 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read
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
2010 Apr 24
1
Multiple Correlation coefficient (spearman, Kenall)
Hi, I'm currently trying to find/define a relationship between one dependent and several independant variables. The problem is that i cannot use the normal multiple regression/correlation in Spss because the data is not normal distributed. i calculated the spearman roh and Kendalls tau Correlation and also some partial correlations in R. Now i wanna find out the the multiple correlation
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,
2003 May 01
3
Test statistic for Spearman correlation
In the ouput below, what is the "S" statistic (S = 96) that is used for Spearman? I don't have easy access to the books cited on the help page. Other texts and web sources that I have found use t or z as a test for Spearman, perhaps inappropriately. Can anyone tell me how S is computed or refer to a web resource? I see from the code for that: q <- as.integer((n^3 - n) * (1
2010 Nov 29
1
weighted Spearman correlation coefficient
Hello, I would be grateful if anybody can help me in finding an R function to compute weighted Spearman correlation coefficient? Kind regards, Daniel
2005 Jul 03
1
Pearson and Spearman correlation coeffcients matrix
Hi everyone, I've been trying to find a function that outputs the Pearson and/or Spearman correlation coefficients for several variables with the associated statistics in one single table/matrix. For what I've been able to understand the Stats package is only able to compute these coeficients/statistics only in defined pairs. This becomes time consuming when we want to determine these
2013 Feb 05
1
plot significant spearman correlation
Hello, I calculate the correlation between two matrices cor(x,y, method="spearman") and I am wondering if it possible to see only the significant correlations. I can do that for single OTUs with cor.test() command but I would like to have an output for whole matrix. Besides,I would like to plot the relative abundance of each OTU, against the number of significant pair-wise correlations
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]]
2006 Feb 28
1
Spearman correlation confidence interval
R-help(ers), Does anyone know of an R function available for calculating a confidence interval for a Spearman correlation? If no such resource is available, is using the confidence interval from a Pearson correlation a reasonable proxy if the vectors come from normal distributions (i.e. likely indistinguishable from the true confidence interval in error bars of an autocorrelogram or correlation