Displaying 20 results from an estimated 2000 matches similar to: "correlation matrix in Hmisc"
2003 May 11
2
rank correlation and distance between two different matrices
Dear all,
in package Hmisc `rcorr' computes a matrix of Spearman's `rho' rank
correlation coefficients for all possible pairs of columns of a matrix.
What if I want a matrix of rank correlation coefficients for pair of
columns of two different matrices?
I have the same question about distance metrics in package Vegan. The
function 'vegdist' computes distance indexes for all
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
2002 Sep 05
1
rcorr in Hmisc
Dear list,
I get the following message when I use rcorr in library "Hmisc"
------------------------------------------------------
> rcorr(lskPox0t30, type=c("spearman"))
Error in "[<-.data.frame"(*tmp*, is.na(x), value = 1e+30) :
matrix subscripts not allowed in replacement
------------------------------------------------------
I do not understand
2009 Jul 01
1
Rcorr
Hi,
I've just run an rcorr on some data in Spearman's mode and it's just
produced the following values;
[,1] [,2]
[1,] 1.00 -0.55
[2,] -0.55 1.00
n= 46
P
[,1] [,2]
[1,] 0
[2,] 0
I presume this means the p-value is lower than 0.00005, but is there any
way of increasing the number of significant figures used? How should I
interpret this value?
Cheers
Jim
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)
2003 Apr 01
2
cor.test observations limit
Hi,
Is there a limit on the number of observations for using cor.test. For
example,
> library(ctest)
> cor.test(rnorm(3000), rnorm(3000), method="spearman")
Error in if (q > (n^3 - n)/6) pspearman(q - 1, n, lower.tail = FALSE) else
pspearman(q, :
missing value where logical needed
In addition: Warning message:
NAs introduced by coercion
I mainly want to calculate
2008 Jul 31
0
Sperman Correlation with rcorr (Hmisc)
Hello R-User!
I have a data.frame with 82 variables (columns) and 290 rows.
The variables are set to classes factor, ordered factor and numeric.
I used the following code
Matrix.My.data<-as.matrix(Df.My.Data[2:82])
Matrix.My.data.rcorr<-rcorr(Matrix.My.data, type="spearman")
and got the following message:
Fehler in storage.mode(x) <- if (.R.) "double" else
2011 Aug 19
1
Hmisc::rcorr on a 'data.frame'?
Dear all
?Hmisc::rcorr states that it takes as main argument "a numeric
matrix". But is it normal that it fails in such an ugly way on a data
frame? (See below.) If the function didn't attempt any conversion to a
matrix, I would have expected it to state that in the error message
that it didn't accept 'data.frame' objects in its input. Also, I
vaguely remember having used
2008 Aug 06
1
Correlation dichotomous factor, continous (numerical) and ordered factor
Hello R-User!
I appologise in advance if this should also go into statistics but I am
presently puzzled.
I have a data.frame (about 300 rows and about 80 variables) and my variables
are dichotomous factors, continuous (numerical) and ordered factors.
I would like to calculate the linear correlation between every pair of my
variables, because I would like to perform a logistic regression (glm())
2011 Mar 01
1
which does the "S.D." returned by {Hmisc} rcorr.cens measure?
Dear R-help,
This is an example in the {Hmisc} manual under rcorr.cens function:
> set.seed(1)
> x <- round(rnorm(200))
> y <- rnorm(200)
> round(rcorr.cens(x, y, outx=F),4)
C Index Dxy S.D. n missing
uncensored Relevant Pairs Concordant Uncertain
0.4831 -0.0338 0.0462 200.0000
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
2008 Apr 01
1
SEM with a categorical predictor variable
Hi,
we are trying to do structural equation modelling on R. However, one of our
predictor variables is categorical (smoker/nonsmoker). Now, if we want to
run the sem() command (from the sem library), we need to specify a
covariance matrix (cov). However, Pearson's correlation does not work on the
dichotomous variable, so instead we produced a covariance matrix using the
Spearman's (or
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))
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
2010 May 05
1
rcorr p-values for pearson's correlation coefficients
Hi! All,
To find co-expressed genes from a expression matrix of dimension (9275
X 569), I used rcorr function from library(Hmisc) to calculate pearson
correlation coefficient (PCC) and their corresponding p-values. From
the correlation matrix (9275 X 9275) and pvalue matrix (9275 X 9275)
obtained using rcorr function, I wanted to select those pairs whose
PCC's are above 0.8 cut-off and then
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
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
2005 Feb 05
2
Problem installing Hmisc (more info)
Frank Harrell suggested I re-post with information about the version of
R
Heres's the information:
> > version
> _
> platform powerpc-apple-darwin6.8
> arch powerpc
> os darwin6.8
> system powerpc, darwin6.8
> status
> major 2
> minor 0.1
> year 2004
> month 11
> day 15
> language R
Here's what happens
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 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,