similar to: rank (PR#7850)

Displaying 20 results from an estimated 10000 matches similar to: "rank (PR#7850)"

2005 May 04
4
rank of a matrix
how do I check the rank of a matrix ? say A= 1 0 0 0 1 0 then rank(A)=2 what is this function? thanks I did try help.search("rank"), but all the returned help information seem irrelevant to what I want. I would like to know how people search for help information like this. rank(base) Sample Ranks SignRank(stats) Distribution of the
2006 Oct 10
3
Rank Function
Does anyone know why the two rank functions gives different results? I need to use the rank function in a "for" loop, so the sequence to be ranked is given values in the form of part (1). How can I use assignment like in part (1) to get correct ranks as in part (2)? Thank You Part (1) i<-1.94 b<-0.95-i c<-1.73-i d<-2.62-i y<-c(0.68,0.95,b,c,d) y 0.68 0.95 -0.99
2010 Apr 05
3
A questionb about the Wilcoxon signed rank test
Hi guys,   I have two data sets of prices: endprice0, endprice1   I use the Wilcox test:   wilcox.test(endprice0, endprice1, paired = TRUE, alternative = "two.sided",  conf.int = T, conf.level = 0.9)   The result is with V = 1819, p-value = 0.8812.   Then I calculated the z-value of the test: z-value = -2.661263. The corresponding p-value is: p-value = 0.003892, which is different from
2006 Oct 10
1
How to assign a rank to a range of values..
>From the following: basin.map <- readAsciiGrid("c:/temp/area.asc", colname="area") I have a SpatialGridDataFrame which has the x and y cordinate of a cell, and the drainage area of that cell. There are many cells with a low drainage area (in my case, 33000 with an area of 37.16) and one cell with the highest drainage area (again, in my case, a drainage area of of
2007 Aug 06
1
rank in decreasing order
Hi All, I want to give ranks to elements in a column so I used: total_list$field1.rank <- rank(total_list$field1,ties.method="min") But this gives me the rank in increasing order. How do I get the ranks in decreasing order? I know decreasing = FALSE is not a legal argument here. Thanks. Jiong The email message (and any attachments) is for the sole use of the intended recipient(s)
2007 Aug 17
2
problem using "rank"
Hi All, I had 12766 elements in a column, 12566 are values and 200 are "NA"s. I used the following line to get the ranks: total_list$MB.rank <- rank(-total_list$MB,ties.method="min",na.last=NA) but I got an error message: Error in `$<-.data.frame`(`*tmp*`, "BCRP_PW_F.rank", value = c(3949, 6182, : replacement has 12199 rows, data has 12766 What
2010 Feb 11
2
Question about rank() function
Hello, I am trying to get the 'rank' function to work for me, but not sure what I am doing wrong. Please help. I ran the following commands: data = read.table("test1.csv", head=T, as.is=T, na.string=".", row.nam=NULL) X1 = as.factor(data[[3]]) X2 = as.factor(data[[4]]) X3 = as.factor(data[[5]]) Y = data[[2]] model = lm(Y ~ X1*X2*X3, na.action = na.exclude) fmodel =
2002 May 06
3
Spearman rank-order correlation matrix
I"ve got a data frame with a selection of columns I want to compute a rank-order correlation matrix from without disturbing the original data frame. foo[,c("a","b","d","f","g")] What I wanted to do, intuitively, was: > cor(rank(foo[,c("a","b","d","f","g")])) but rank in that context
2003 Jul 22
1
rank with ties
Hi, Is there a function like rank but that solves the ties by randomly assigning a value (doesn't average ranks of ties). This is what I actually need: I want to make NA all elements of each column in an array that are ranked in a position larger that rankmax for each column. # Say I've got an array b: b<-cbind(c(1:5,5:1),c(1,12,14,2,5,4:8)) #> b # [,1] [,2] #[1,] 1 1
2001 Nov 28
2
Problems with rank()
If you enter the following values for x and y: x: 2.2 3.7 2.1 0.4 2.8 0.3 0.4 1.4 5.4 6.0 y: 6.0 8.1 1.8 1.3 5.2 0.6 1.0 1.9 6.8 6.5 and do rank(abs(y-x)), you should get two ties, one at 0.3 and one at 0.5. R, and S-Plus5 by that matter recognise the tie at 0.5 and give it rank 3.5, but gives one of the two 0.3 values rank 1 and one of them 2, whereas they should boh be 1.5. Any suggestions? when
2008 Jan 07
1
Rank sum in friedman test
Dear all, I'm using friedman rank test in R. Need to know how to calculate rank sum in friedman test (R options to get rank sum in friedman test). Kindly help me. With regards jeevitesh
2012 Feb 22
2
rank with uniform count for each rank
Hello, What is the best way to get ranks for a vector of values, limit the range of rank values and create equal count in each group? I call this uniform ranking...uniform count/number in each group. Here is an example using three groups: Say I have values: x = c(3, 2, -3, 1, 0, 5, 10, 30, -1, 4) names(x) = letters[1:10] > x a b c d e f g h i j 3 2 -3 1 0 5 10 30 -1 4 I
2004 Mar 30
4
rank() vs SAS proc rank
SAS proc rank has ties options of high and low that would allow producing ranks of the type found in the sports pages, e.g., rank (c(1,1,2,2,2,2,3)) == 1 1 3 3 3 3 7 Could R support these ties.methods?
2007 Jan 11
1
rank function and NA in 2.3.1
Hi. I am using R 2.3.1 on WIndows XP, and I am having trouble with the rank function in the presence of numerical NA data. I want the NA's all to get the same rank, but they don't. Here is an example from my session: >ct_align_rets_f2$liq[6851:6859] [1] 115396 NA 362595 NA 242986 340805 NA 692905 251533
2005 May 16
1
Mann-Whitney & Wilcoxon Rank Sum
Hello, I am hoping someone could shed some light into the Wilcoxon Rank Sum Test for me? In looking through Stats references, the Mann-Whitney U-test and the Wilcoxon Rank Sum Test are statistically equivalent. When using the following dataset: m <- c(2.0863,2.1340,2.1008,1.9565,2.0413,NA,NA) f <- c(1.8938,1.9709,1.8613,2.0836,1.9485,2.0630,1.9143) and the wilcox.test command as
2004 Dec 01
2
rank in descending order?
Hi, Is there any simple solution to get ranks in descending order? Example, a <- c(10, 98, 98, 98, 99, 100) r <- rank(a, ties.method="average") produces 1 3 3 3 5 6 I would want this instead: 6 5 3 3 3 1 Note that reversing r doesn't work but in small examples. Thanks, -Jose -- jquesada at andrew.cmu.edu Research associate http://lsa.colorado.edu/~quesadaj Dept. of
2011 Apr 12
2
The three routines in R that calculate the wilcoxon signed-rank test give different p-values.......which is correct?
I have a question concerning the Wilcoxon signed-rank test, and specifically, which R subroutine I should use for my particular dataset. There are three different commands in R (that I'm aware of) that calculate the Wilcoxon signed-rank test; wilcox.test, wilcox.exact, and wilcoxsign_test. When I run the three commands on the same dataset, I get different p-values. I'm hoping that
2007 Mar 12
1
replicating SAS's "proc rank" procedure
Hello- I wonder if there's a way to replicate SAS rank procedure where it ranks a variable by a certain number of groups. For example, it's very easy to calculate quintile rank in SAS, but I couldn't find the similar function in R. Does anyone know how to do this? Thanks. -- View this message in context:
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 Apr 29
1
Conditonal Rank
Suppose I have data such as tmp <- data.frame(score = c(1,2,3,4, 4,3,2,1), trial = gl(2,4), Gender = gl(2,2,8, labels=c('M', 'F'))) Now I would like to compute a rank on the variable score conditional on trial and gender. I could do res <- with(tmp, tapply(score, list(Gender, trial), rank)) res[,1] res[,2] and then finagle a way to create a new variable in the dataframe