Kolmogorov smirnov in r - cannot compute correct p-values with ties

  • Thread starter Thread starter joanne34567
  • Start date Start date
  • Tags Tags
    Kolmogorov
Click For Summary
The discussion centers on the challenges of using the Kolmogorov-Smirnov test in R when dealing with datasets that contain ties, which can lead to errors in computing p-values. The user is concerned that their datasets, with 2000 and 50000 values respectively, contain replicates that may affect the validity of the p-value. Suggestions include reviewing the R documentation for the ks.test function and empirically testing p-value sensitivity by adding small random perturbations to the data. This approach could help assess the impact of ties on the p-value. Understanding these factors is crucial for accurate statistical analysis in R.
joanne34567
Messages
12
Reaction score
0
Hi,
I'm trying to use the kolmogorov smirnov test in in R to compare one distribution with another. I'm getting the following error: cannot compute correct p-values with ties
I think this is because the dataset that I am using has in the first instance around 2000 values, and the second, 50000 values. A number of these are inherently going to be replicates of another number in the series (i.e. "ties"). I'm just wondering if this has implcations for the p value I have? Is the p value valid?
Cheers all
 
Physics news on Phys.org
Did you read the R documentation for the ks.test function?

You could test the sensitivity of the p-value empirically. Add small random perturbations to your data to generate new data sets that have more digits. See how much the p value changes.
 
The standard _A " operator" maps a Null Hypothesis Ho into a decision set { Do not reject:=1 and reject :=0}. In this sense ( HA)_A , makes no sense. Since H0, HA aren't exhaustive, can we find an alternative operator, _A' , so that ( H_A)_A' makes sense? Isn't Pearson Neyman related to this? Hope I'm making sense. Edit: I was motivated by a superficial similarity of the idea with double transposition of matrices M, with ## (M^{T})^{T}=M##, and just wanted to see if it made sense to talk...

Similar threads

  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 14 ·
Replies
14
Views
6K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 11 ·
Replies
11
Views
2K
Replies
3
Views
4K
Replies
12
Views
4K
  • · Replies 0 ·
Replies
0
Views
2K
  • · Replies 105 ·
4
Replies
105
Views
14K