# Tag Info

22

Ties.method specifies the method rank uses to break ties. Suppose you have a vector c(1,2,3,3,4,5). It's obvious that 1 is first, and 2 is second. However, it's not clear what ranks should be assigned to the first and second 3s. Ties.method determines how this is done. There are a few options: average assigns each tied element the "average" rank. The ranks ...

16

Here is a graph that shows the same point the FAQ Bernd linked to explains in detail. The two groups have equal medians but very different distributions. The P value from the Mann-Whitney test is tiny (0.0288), demonstrating that it doesn't really compare medians.

11

There is a fairly standard notation: given a vector $x=(x_1, x_2, \ldots, x_n)$, its order statistics $(x_{}, x_{}, \ldots, x_{[n]})$ are the permutation of $x$ for which $x_{} \le x_{} \le \cdots \le x_{[n]}$. Some people use parentheses instead of square brackets around the indexes, as in $x_{(i)}$ instead of $x_{[i]}$. After you have ...

10

(Pulls Conover  off the bookshelf...) This idea is quite old; it dates back at least to van der Waerden (1952/1953) , who suggested a test that corresponds to the Kruskal Wallis but with ranks replaced by normal scores. (The idea of using ordered random normal values rather than an approximation of their expectation or their median - is perhaps ...

9

@Hotaka's answer is quite correct. Ranking makes transformation unnecessary; it is itself a transformation that ignores exact values except in so far as they lead to differences in rank. In fact, a little thought, or some example calculations, will show that the results after ranking logarithms or square roots or any other monotonic transformation are ...

9

No. When the data are ranked, an outlier will simply be recognized as a case that is ranked one above (or below) the next less extreme case. Regardless of whether there is .01 or 5 standard deviations between the most and second most extreme value, that degree of difference is thrown away when data are ranked. In fact, one of the many reasons why someone ...

8

This is an excellent question. As you found, quantiles do not work when there are many ties in the data, because they are too discontinuous as estimators. I often find means work best, if you can assume that the spacing between the categories are at least "halfway meaningful." Exceedance probabilities are always valid. In your case these would be ...

7

Normality is not required to calculate a Pearson correlation; it's just that some forms of inference about the corresponding population quantity are based on the normal assumptions (CIs and hypothesis tests). If you don't have normality, the implied properties of that particular form of inference won't hold. In the case of the Spearman correlation, you ...

7

Does that mean they just test the same hypothesis/are useful in the same situations or are they are supposed to give the exact same p-values? It means: (i) the test statistics will be monotonic transformations of each other. (ii) they give the same p-values, if you work out the p-values correctly. Your problem is that the t-test on ranks doesn't have ...

7

Your data are ordinal ratings, so you need some form of ordinal logistic regression. But I also gather that your data are not independent ("... 15 measures per patient..."), so that needs to be taken into account as well. Thus, the appropriate method here is a mixed effects ordinal logistic regression. In R, mixed effects OLR models can be fit with the ...

6

The Streitberg-Röhmel shift algorithm is described in two manuscripts: Streitberg B, Röhmel J (1986). "Exact Distributions for Permutation and Rank Tests: An Introduction to Some Recently Published Algorithms." Statistical Software Newsletter, 12(1), 10-17. ISSN 1609-3631. Streitberg B, Röhmel J (1987). "Exakte Verteilungen für Rang- und ...

4

Given that your area tends to favor non-parametric tests, my answer will assume that the ordinal properties of your dependent variable are more important than the interval properties, and so back-transformation is less important to you than is determining whether or not some monotonic relationship exists (please correct if I'm wrong). Box-Cox transformation ...

4

I will give a hint. The key concept is exchangeability, meaning that the random vector $(X_1, \dotsc, X_n)$ has the same distribution as $(X_{\pi 1}, \dotsc, X_{\pi n})$ for all permutations $\pi$ of $(1,2,\dotsc, n)$. Then you can check that the vector of ranks $(R_1, \dotsc, R_n)$ also will be exchangeable. Exchangeability is a generalization of iid, so ...

3

What this formula computes is the Proportion Estimation based on rankit method. It is what percentile ranks are. X R F PE 25 1.0 .0909 .0455 28 2.0 .1818 .1364 29 3.5 .3182 .2727 29 3.5 .3182 .2727 31 5.0 .4545 .4091 32 6.0 .5455 .5000 33 8.0 .7273 .6818 33 8.0 .7273 .6818 33 8.0 .7273 .6818 35 10.0 .9091 .8636 37 ...

3

R lists 5 ways to calculate ranks. The first ("average") is by far the most commonly used: it has the advantage that the ranks computed this way are scale/permutation invariant

3

This is an awfully general question. Rank tests are not necessarily special cases of permutation tests. Huge advantages of rank tests and their generalizations (semiparametric regression models) include not being dependent on the correct transformation of $Y$, being robust, and being more powerful than parametric tests on the average (and only losing a tiny ...

3

Without the original scores, all you can do is say what percentage of the way up from the bottom of the rankings you are. Here are the general formula and your specific case: \begin{align} {\rm percentage} &= 100\times \frac{(N_r - r_i)}{N_r} \\[10pt] 23.5\% &= 100\times \frac{(200−153)}{200} \end{align} where $N-r$ is the total number of ...

3

I think it's important to clearly distinguish between a. using a parametric statistic on the ranks as the basis for a nonparametric test b. using a parametric test as is, on the ranks (we might also consider a third option -- like "b." but in some way scaling or adjusting the statistic to get a better approximation to the "true" p-value from ordinary ...

3

From what I can tell, the rank-based estimation this paper is referring to is slightly different than what you're interested in. Note that least-squares estimation is based on the idea that $\boldsymbol \beta$ should be chosen to minimize $||\boldsymbol y - \boldsymbol X \boldsymbol \beta||^2$. This isn't suitable in your case because the distribution of $y$ ...

3

The population Kendall correlation is the population probability of concordance minus population probability of discordance; $P[(X_1 − X_2) (Y_1−Y_2)>0] − P[(X_1−X_2) (Y_1−Y_2)<0]$ where $(X_1,Y_1)$ and $(X_2,Y_2)$ are independent pairs from the bivariate distribution. This corresponds directly to the sample definition (the sample proportion of ...

2

when I ran a few examples, the p-values for rho and for the t-test of the Pearson correlation of ranks always matched, save for the last few digits Well you've been running the wrong examples then! a = c(1,2,3,4,5,6,7,8,9) b = c(1,2,3,4,5,6,7,8,90) cor.test(a,b,method='pearson') Pearson's product-moment correlation data: a and b t = 2.0528, df = 7, ...

2

Ranks range from 1 to N. The sum of all ranks is a constant N(N+1)/2. So there are mathematically equivalent ways to express the test. I am not sure that you have properly described the two equivalent formulations. As an aside a different rank test the Wilcoxon-Mann-Whitney rank sum test has the formulation in terms of the sum of the ranks for the ...

2

The Wikipedia formula of "rank-biserial correlation" that you show was introduced by Glass (1966) and it is not equivalent to usual Pearson $r$ when the latter is computed on ranks data (that is, $r$ which actually will be Spearman's $rho$). Let define $Y$ to be the quantitative variable already turned into ranks; and $X$ be the dichotomous variable with ...

2

I think you have one of two problems, depending on the what exactly R#A and R#B are. For example, does the 5 in R#A mean that the first element has a rank of 5, or does it mean that the fifth element has a rank of 1? If it is the former, then you have not selected the top 5 elements. If it is the latter then R#A and R#B contain different elements. You can ...

2

This is a really interesting question. I think the simulation makes sense, but I'd look at it from the point of view of a randomization test, though in this case it's essentially the same as a bootstrap test; they're both resampling tests and once you go to ranks, they work essentially the same. In effect, under the null, and conditional on the group ...

2

The question is of fundamental importance: What is a tied observation/data/pair ? Altough often mentioned only in nonparametric methods, this notion is independent of nonparametric methods. It is mentioned in nonparametric methods because this situation will cause calculation complication in obtaining the statistics used in nonparametric methods, like ...

2

I don't have commenting privileges, so I will attempt an answer here. Perhaps your original question is unclear, but here are answers depending on your exact meaning: "I want to penalise R2 more as the differences in position is towards the head than tail. Thus, along with the ranking, I also want to take into consideration the position." If you want to ...

2

I don't know if it is possible with Kendall tau, but some ranking measures such as Discounted cumulative gain naturally penalize more inversions towards some extreme of the list.

2

You can simply calculate conversion (i.e. LtS), $$C = {n_l \over n_s}.$$ In "Bayesian averaging" you need a correction for total number of leads, adding "dummy" leads (e.g. $200$), so $$C' = {n_l \over n_s + 200 }.$$ Attributes with a large number of leads see their modified conversion alter very little from their real one, while attributes with ...

2

It sounds like you have the potential for two different models here, one that predicts rank and one that predicts premium. For the rank model, something like an ordinal logistic regression may be appropriate. For the premium model, a linear regression may work. Both models can accommodate continuous and categorical predictors and can be implemented in a ...

Only top voted, non community-wiki answers of a minimum length are eligible