Displaying 20 results from an estimated 2000 matches similar to: "PCA with spearman and kendall correlations"
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
2005 Aug 13
1
R/S-Plus/SAS yield different results for Kendall-tau and Spearman nonparametric regression
Colleagues,
I ran some nonparametric regressions in R (run in RedHat Linux), then
a colleague repeated the analyses in SAS. When we obtained different
results, I tested S-Plus (same Linux box). And, got yet different
results. I replicated the results with a small dataset:
DATA:
37.5
23
37.5
13
25
16
25
12
100
15
12.5
19
50
20
100
13
100
10
100
10
100
16
50
10
87.5
2011 May 16
2
about spearman and kendal correlation coefficient calculation in "cor"
Hi,
I have the following two measurements stored in mat:
> print(mat)
[,1] [,2]
[1,] -14.80976 -265.786
[2,] -14.92417 -54.724
[3,] -13.92087 -58.912
[4,] -9.11503 -115.580
[5,] -17.05970 -278.749
[6,] -25.23313 -219.513
[7,] -19.62465 -497.873
[8,] -13.92087 -659.486
[9,] -14.24629 -131.680
[10,] -20.81758 -604.961
[11,] -15.32194 -18.735
To calculate the ranking
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]]
2010 Feb 08
2
Incorrect Kendall's tau for ordered variables (PR#14207)
Full_Name: Marek Ancukiewicz
Version: 2.10.1
OS: Linux
Submission from: (NULL) (74.0.49.2)
Both cor() and cor.test() incorrectly handle ordered variables with
method="kendall", cor() incorrectly handles ordered variables for
method="spearman" (method="person" always works correctly, while
method="spearman" works for cor.test, but not for cor()).
In
2002 Apr 25
3
Kendall's tau
A search of the archives did not reveal an answer:
For basic tests of association, where one has no a priori knowledge of the
form of the relation or of the distributions of the variables, rank
correlation seems like a good start. Why is cor.test() with Kendall and
Spearman options relegated to the ctest package, rather than in the base
package? Does this suggest that the developers consider
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
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 Jun 25
2
Fast Kendall's Tau
Hello.
Has any further action been taken regarding implementing David Simcha's fast Kendall tau code (now found in the package pcaPP as cor.fk) into R-base? It is literally hundreds of times faster, although I am uncertain as to whether he wrote code for testing the significance of the parameter. The last mention I have seen of this was in 2010
2005 Aug 18
2
kendall tau correlation test for ties: Potential error (PR#8076)
Full_Name: Dirk Koschuetzki
Version: 2.1.1
OS: source code
Submission from: (NULL) (194.94.136.34)
Hello,
>From the source code (R-2.1.1, file: .../R-2.1.1/src/library/stats/R/)
******************************
cor.test.default <-
function(x, y, alternative = c("two.sided", "less", "greater"),
method = c("pearson", "kendall",
2007 Mar 15
1
Incorrect matrix of spearman correlations .... in 64-bit Linux ... (PR#9568)
Full_Name: Vladimir Obolonkin
Version: tested in 2.0 to 2.4.1
OS: linux, win, mac
Submission from: (NULL) (202.14.96.194)
{{ Subject shortened manually -- to pass anti-spam filters
Original-subject: Incorrect matrix of spearman correlations working \
large (24000 by 425 and 78 by 425 data frames) in 64-bit Linux machines;\
the same code gives correct results in 32-bits Win and
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 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
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
2005 Feb 16
2
phi correlation
Hello my big problem is, i can´t find the phi-correlation instruction in the
R - programm. (correlation method= spearman, pearson, kendall, I have
found)
I also cant find the transform instruction which I can transform rational
vector into nominal vectors (binary)
Transforming into ordinaI I have found with the “rank” instruction, but I
have no found into nominal dates.
Please help
2007 Oct 26
2
calculating correlation of a Supply/Demand measure and price change (in high frequency time series data)
Regarding "financial" data: I have a high frequency (1 minute) measure of
supply/demand and I'd like to know if it has any influence on short term
price changes (also 1 minute).
Question: How do I calculate the correlation between this supply/demand
measure and price changes (correctly)?
Some facts about that data:
The price changes and supply/demand measure are non-normal. An
2009 Jan 24
1
Help with dudi.pca
Dear R-helpers,
I have two data frames, op and em4:
> str(op)
'data.frame': 37 obs. of 5 variables:
$ m : num 0.202 0.336 0.122 0.139 0.14 ...
$ lln : num 0.798 0.643 0.863 0.835 0.823 ...
$ rrn : num 0.789 0.702 0.894 0.895 0.923 ...
$ asym2: num 0.177 0.304 0.108 0.187 0.274 ...
$ asym3: num 0.0755 0.0975 0.0818 0.0651 0.13 ...
> str(rownames(op))
chr
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
2008 Nov 21
1
Bug in Kendall for n<4?
> library(Kendall)
> Kendall(1:3,1:3)
WARNING: Error exit, tauk2. IFAULT = 12 <<<<<<
tau = 1, 2-sided pvalue =1
I believe Kendall tau is well-defined for this case and the reported
value is correct; isn't it a bug to give a warning? (And if, e.g.,
the pvalue is not well-defined in this case, wouldn't it be better to
return NA or NaN or something?) Also,
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"))