similar to: lm() with spearman corr option ?

Displaying 20 results from an estimated 1000 matches similar to: "lm() with spearman corr option ?"

2012 May 03
1
NA's when subset in a dataframe
Dear community, I'm having this silly problem. I've a linear model. After fixing it, I wanted to know which data had studentized residuals larger than 3, so i tried this: d1 <- cooks.distance(lmmodel) r <- sqrt(abs(rstandard(lmmodel))) rstu <- abs(rstudent(lmmodel)) a <- cbind( mydata, d1, r,rstu) alargerthan3 <- a[rstu >3, ] And suddenly a[rstu >3, ] has
2008 Aug 05
1
Extracting variable names of final model in stepAIC
Hello there. I uses the following codes for the purpose of variable selection. > lmModel <- lm(y~.,data.frame(y=y, x=x)) > step <- stepAIC(lmModel, direction="both") > step$anova Stepwise Model Path Analysis of Deviance Table Initial Model: y ~ x.Market.Price + x.Quantity + x.Country + x.Incoterm + x.Channel + x.PaymentTerm Final
2016 Apr 09
1
Run script R
hi all ,? i have an problem in script R . But when I execute the script R I face this error . can you help me please ???error:----------------------------------------- Error in FUN(X[[i]], ...) :?? Theme element 'text' has NULL property: margin, debugIn addition: Warning messages:1: Removed 361 rows containing non-finite values (stat_smooth).?2: Removed 361 rows containing missing values
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
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 =
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]]
2007 May 29
2
R's Spearman
Hi all, I am trying to figure out the formula used by R's Spearman rho (using cor(method="spearman")) because I can't seem to get the same value as by calculating "by hand". Perhaps I'm using "cor" wrong, but I don't know where. Basically, I am running these commands: > y=read.table(file="tmp",header=TRUE,sep="\t") >
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
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): >
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))
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',
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
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]]
2010 Jan 21
0
GGally - Plot Matrix Extension for GGplot2
GGally: a companion to GGplot2. GGally is a package built to produce plot matrices without the hassle of making viewports and labels yourself. GGally is built upon the GGplot2 framework. Keeping the functionality and feel of ggplot, GGally has shortened common function calls and added a few new ones. ggpairs, the main function within GGally, will take your data set and produce a plots
2010 Jan 21
0
GGally - Plot Matrix Extension for GGplot2
GGally: a companion to GGplot2. GGally is a package built to produce plot matrices without the hassle of making viewports and labels yourself. GGally is built upon the GGplot2 framework. Keeping the functionality and feel of ggplot, GGally has shortened common function calls and added a few new ones. ggpairs, the main function within GGally, will take your data set and produce a plots
2004 Aug 30
1
Wrong result with cor(x, y, method="spearman", use="complete.obs") with NA's???
Hallo! Is there an error in cor to calculate Spearman correlation with cor if there are NA's? cor.test gives the correct result. At least there is a difference. Or am I doing something wrong??? Does anybody know something about this? a<-c(2,4,3,NA) b<-c(4,1,2,3) cor(a, b, method="spearman", use="complete.obs") # -0.9819805 cor.test(a, b,
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 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:
2010 Jan 22
0
[R-pkgs] GGally - Plot Matrix Extension for GGplot2
Barret Schloerke wrote: > GGally: a companion to GGplot2. > Where is it available? I don't find it on CRAN or R-Forge -- Michael Friendly Email: friendly AT yorku DOT ca Professor, Psychology Dept. York University Voice: 416 736-5115 x66249 Fax: 416 736-5814 4700 Keele Street http://www.math.yorku.ca/SCS/friendly.html Toronto, ONT M3J 1P3 CANADA
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