Ties refer to equal values observed in the data. When multiple, ties can pose a problem for some methods of data analysis.
Questions tagged [ties]
45 questions
21
votes
4 answers
Survival analysis: continuous vs discrete time
I am confused about how to decide whether to treat time as continuous or discrete in survival analysis. Specifically, I want to use survival analysis to identify child- and household-level variables that have the largest discrepancy in their impact…

smm
- 211
- 1
- 2
- 3
21
votes
2 answers
Understanding Kolmogorov-Smirnov test in R
I'm trying to understand the output of the Kolmogorov-Smirnov test function (two samples, two sided).
Here is a simple test.
x <- c(1,2,2,3,3,3,3,4,5,6)
y <- c(2,3,4,5,5,6,6,6,6,7)
z <- c(12,13,14,15,15,16,16,16,16,17)
ks.test(x,y)
# Two-sample…

Nonancourt
- 377
- 1
- 2
- 7
19
votes
4 answers
Dealing with ties, weights and voting in kNN
I am programming a kNN algorithm and would like to know the following:
Tie-breaks:
What happens if there is no clear winner in the majority voting? E.g. all k nearest neighbors are from different classes, or for k=4 there are 2 neighbors from class…

Fletcher Duran
- 191
- 1
- 1
- 3
16
votes
2 answers
"Ties should not be present" in one-sample Kolmgorov-Smirnov test in R
I am going to use the Kolmogorov-Smirnov test to test normality of MYDATA in R. This is an example of what I do
ks.test(MYDATA,"pnorm",mean(MYDATA),sd(MYDATA))
Here is the result R gives me:
data: MYDATA
D = 0.13527, p-value = 0.1721
…

unes
- 161
- 1
- 1
- 3
15
votes
1 answer
Why are ties so difficult in nonparametric statistics?
My nonparametric text, Practical Nonparametric Statistics, often gives clean formulas for expectations, variances, test statistics, and the like, but includes the caveat that this only works if we ignore ties. When calculating the Mann-Whitney U…

Christopher Aden
- 1,775
- 4
- 24
- 43
14
votes
1 answer
Is there an alternative to the Kolmogorov-Smirnov test for tied data with correction?
I've got a bunch of data from two samples (control and treated), each containing several thousand values which are to undergo significance testing in R. Theoretically, the values should be continuous, but due to rounding done by measurement software…

AnjaM
- 255
- 2
- 6
11
votes
1 answer
How does ties.method argument of R's rank function work?
I am using rank(a, ties.method="max") to rank a. But I am not quite sure what does ties.method="max" do. Can you please help?

Joy
- 121
- 1
- 1
- 4
10
votes
1 answer
Understanding warning message "Ties are present" in Kruskal-Wallis post hoc
I'm running post-hoc comparisons after a Kruskal-Wallis test. I'm using the PMCMR package.
> posthoc.kruskal.nemenyi.test( preference ~ instrument)
Pairwise comparisons using Tukey and Kramer (Nemenyi) test
with Tukey-Dist…

dB'
- 225
- 3
- 15
9
votes
3 answers
Is it wrong to jitter before performing Wilcoxon test?
I wrote a script tests the data using the wilcox.test, but when I got the results, all the p-values where equal to 1.
I read in some websites that you could use jitter before testing the data (to avoid ties as they said), I did this and now I have…

weblover
- 91
- 3
9
votes
1 answer
Slight inconsistency between the Kruskal-Wallis built-in R function and manual calculation
I'm confused by the following, and I haven't been able to dig up the answer elsewhere.
I'm trying to learn R while doing some statistics, and, as an exercise, I try to double-check the results of the built-in R functions by also doing these 'by…

MSR
- 93
- 5
9
votes
2 answers
ks.test and ks.boot - exact p-values and ties
I am confused by the behaviour of ks.test (package stat) a) in the presence of ties and b) if one-sided while doing a two-sample test. Documentation: "Exact p-values are not available for the two-sample case if one-sided or in the presence of…

Hermann Norpois
- 121
- 1
- 1
- 3
6
votes
1 answer
Autoencoders' gradient when using tied weights
In autoencoders when using tied weights, it was mentioned the gradient with respect to w is the sum of two weights. I didn't understand this, can someone elucidate this.
it is mentioned here on slide 4 in the end.

Abhishek Bhatia
- 461
- 4
- 13
5
votes
3 answers
What to do about ties in voting results?
Imagine a committee of people in charge of hiring a CEO. A committee member can vote "No hire" (+0), "Maybe"(+1), "Hire"(+2) for a potential CEO candidate. Each CEO is scored based on the votes, and the CEO with the highest score is hired.
Now,…

varuman
- 53
- 4
5
votes
0 answers
Exact Null Distribution with Ties
I am interested in deriving exact null distributions for small-sample test statistics with non-trivial ties. Not fundamentally continuous variables that happen to have a few repeated values, but ordinal variables like grades (F to A) or Likert (very…

David Wright
- 2,181
- 12
- 12
5
votes
1 answer
Kolmogorov-Smirnov vs Mann-Whitney U When There Are Ties
I have a dataset consisting of rank data, some 100 cases and 2 groups. (The 2 groups contain about 1/3 and 2/3 of the cases.) I would like to test whether the two groups differ with respect to median rank. I used a Mann-Whitney U test. A…

Joel W.
- 3,096
- 3
- 31
- 45