Displaying 20 results from an estimated 10000 matches similar to: "In need of help with correlations"
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
2006 Nov 15
1
Correlations not in sync with r2 from regression
I have two variables, minutereturnsa which can be thought of as my
independent variable and minutereturnsb which can be thought of as my
dependent variable. When I run correlations on the two variables,
depending on which of the three methods I use, I get values of between
-.15 through -.19.
Then, when I do a regression, I get an rsquared of .004 which is more in
line with my intuition. In other
2003 Sep 13
2
what does this error mean?
Dear R-users:
I am runing R 1.6.2 with Windows XP. I try to calculate Pearson correlation
and Spearman correlation of any pairwise columns of 8000 x 80 data matrix with
missing values and randomize the matix 1000 times and calculate this two
correlations again. The code bellow for Pearson is working fine but for
Spearman got the error bellow for randomized data matrix and R console is stop
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',
2013 Feb 28
1
PCA with spearman and kendall correlations
Hello,
I would like to do a PCA with dudi.pca or PCA, but also with the use of Spearman or Kendall correlations
Is it possible ?
Otherwise, how can I do, according to you ?
Thanking you in advance
Eric Bourgade
RTE
France
[[alternative HTML version deleted]]
2008 Sep 10
3
making spearman correlation cor() call fail with log(0) as input
Hi,
How can I make the cor(x, y, method="spearman") call to produce an
error when the input to it (x, y) produces an error? Here is a simple
example:
> a <- c(0, 1, 2)
> b <- c(100, 2, 4)
## error:
> log(a)
[1] -Inf 0.0000000 0.6931472
## error, as expected:
> cor(log(a), log(b), method="pearson")
[1] NaN
## not an error any more (not expected):
>
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
2011 Jul 12
3
Help in error removal
Dear all,
I am new to programming in R.
I deal with microarray data,which is a data frame object type. I need to carry out a few statistical procedures on this, one of them being the pearson corelation. I need to do this between each row which is a gene. So the desired result is a square matrix with the pearson corelation value between each row. So the first column would be (1,1)=0,(1,2),(1,3)
2004 May 27
2
Stats package
Hi
The cor function in the stats package calculates the correlation between
columns of data, does anyone know if it is at all possible to calculate
the correlation between rows instead ?
Or is there an appropriate package or function that is more appropriate
I'd like to calculate spearman & pearson correlations between rows.
Many thanks
Jason
--
--------------------------------
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]]
2010 Sep 29
1
cor() alternative for huge data set
Hi,
I am have a data set of around 43000 probes(rows), and have to calculate correlation matrix. When I run cor function in R, its throwing an error message of RAM shortage which was obvious for such huge number of rows. I am not getting a logical way to cut off this huge number of entities, is there an alternative to pearson correlation or with other dist() methods calculation(euclidean) that
2011 Dec 15
2
lm and R-squared (newbie)
Hello,
I've two data.frames (data1 and data4), dec="." and sep=";".
http://r.789695.n4.nabble.com/file/n4199964/data1.txt data1.txt
http://r.789695.n4.nabble.com/file/n4199964/data4.txt data4.txt
When I do
plot(data1$nx,data1$ny, col="red")
points(data4$nx,data4$ny, col="blue")
, results seem very similar (at least to me) but the R-squared of
2012 May 29
2
a question about "by" and "ddply"
Hi all,
I have a data set (df, n=10 for the sake of simplicity here) where I have two continuous variables (age and weight) and I also have a grouping variable (group, with two levels). I want to run correlations for each group separately (kind of similar to "split file" in SPSS). I've been experimenting with different functions, and I was able to do this correctly using ddply
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
2007 Oct 16
2
How to speed up multiple for loop over list of data frames
Hi there,
I have a multiple for loop over a list of data frames
for ( i in 1:(N-1) ) {
for ( j in (i+1):N ) {
for ( p in 1:M ) {
v_i[p] = alist[[p]][i,"v"]
v_j[p] = alist[[p]][j,"v"]
}
rho_s = cor(v_i, v_j, method = "spearman")
rho_p = cor(v_i, v_j, method = "pearson"
2004 Sep 03
2
Standard correlation
Hi
Is there a function for computing the standard correlation coefficient
(not pearson) in R?
Thanks
Mick
2012 Mar 07
2
how to see inbuilt function(cor.test) & how to get p-value from t-value(test of significance) ?
i can see source code of function
> cor
function (x, y = NULL, use = "everything", method = c("pearson",
"kendall", "spearman"))
{
na.method <- pmatch(use, c("all.obs", "complete.obs",
"pairwise.complete.obs",
"everything", "na.or.complete"))
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
2006 Jul 24
2
Correlations by group
I'm aware that S N Krishna asked the same
question. However, I have failed to implement the
posted solution for running rank order
correlations on multiple subsets of data using the by() function.
Here is my problem:
Take a set of data from two subjects, who
provided numerical infant mortality (IM) estimates for five countries:
sub <- c(1, 1, 1, 1, 1, 2, 2, 2, 2, 2)
2003 Aug 22
2
a pickle with ranks and reals?
I predicted that y would increase as x increased. However, I only made
the prediction on the ranks of the scores. The ranks don't correlate
with predicted. And, I don't think a regression on the ranks is
warranted. However, the actual scores do yield a significant slope for
b, and a significant R^2 using a linear regression (y is the value and
x is the predicted rank). What