[R] ks.test not working?
Uwe Ligges
ligges at statistik.uni-dortmund.de
Sun Jan 14 12:30:42 CET 2007
Benjamin Dickgiesser wrote:
> Hi,
>
> I am trying the following:
>
> library(ismev)
> library(evd)
>
> fit <- gev.fit(x,show=FALSE)
> ks.test(x,pgev,fit$mle[1],fit$mle[2],fit$mle[3])
1. The test *is* working. It simply warns (and does not report an error)
that you have ties in your data and the assumption for calculating
p-values do not hold.
2. The KS tests tends to be very conservative given you specify
estimated parameters of the distribution.
Uwe Ligges
>
> but I am getting:
> Warning message:
> cannot compute correct p-values with ties in: ks.test(x, pgev,
> fit$mle[1], fit$mle[2], fit$mle[3])
>
> where x is:
> [1] 239 38 1 43 22 1 5 9 15 6 1 9 156
> 25 3 100 6
> [18] 5 100 10 103 25 5 1 2 11 8 68 13 154
> 67 12 5 15
> [35] 5 130 47 143 176 573 592 213 54 10 17 9 198
> 293 77 11 44
> [52] 6 22 2 10 8 1 2 16 4 70 12 4 7
> 134 41 515 8
> [69] 200 169 2 13 49 218 48 34 74 19 44 128 6
> 96 238 17 167
> [86] 308 204 41 6 32 77 14 62 10 3 6 4 2
> 1 1 1 4
> [103] 22 15 13 12 34 14 13 3 1 1 2 2 52
> 34 6 9 31
> [120] 342 348 2 7 52 39 79 5 88 238 40 294 69
> 878 75 1 6
> [137] 5 381 58 84 588 345 161 1293 6 403 516 16 1
> 1112 54 381 2
> [154] 526 38 17 20 17 800 189 1 57 90 92 16 17
> 31 11 4 17
> [171] 12 9 10 46 14 23 1 1 1 313
>
>
> Can anyone tell me why that could be?
>
> Thank you very much,
> Benjamin
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list