Skip to content

help with kolmogorov smirnov test

3 messages · Agnes Gault, Uwe Ligges, James Reilly

#
Hello!

I am an 'R beginner'. I am trying to check if my data follow a negative 
binomial function.
the command i've typed in is:

 >  nbdo=rnegbin(58,mu=27.82759,theta=0.7349851)
 > ks.test(do$DO,nbdo)
Each time i do that, p given is different and i get this warning message:

'Warning message:
cannot compute correct p-values with ties in: ks.test(do$DO, nbdo) '

Could someone tell me what's wrong? What does 'with ties in' mean?

Thank you!


-------------------------------------------------------------------------------------------------------------------

Agn?s GAULT
graduate student
UMR 5173 MNHN-CNRS
case postale 50
Species Conservation, Restoration and Population Survey (CERSP)
61 rue Buffon, 1er ?tage
75005 PARIS
FRANCE
Tel: 33 (0)1 40 79 57 64
Fax: 33 (0)1 40 79 38 35
Email: gault at mnhn.fr
#
Agnes Gault wrote:

            
If some values are duplicated, you have so called ties. Please read some 
textbook on this problem. This is not an R issue.

Uwe Ligges
#
Agnes Gault wrote:
The p-values are different each time because you are using a two-sample 
test, where one of the samples is randomly generated (and thus will be 
different each time). ks.test offers a one-sample test against a 
specified distribution, but this will still have problems with the ties.

---
James Reilly
Department of Statistics, University of Auckland
Private Bag 92019, Auckland, New Zealand