Is this my mistake or a bug?(K-S test and EVT)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Is this my mistake or a bug?(K-S test and EVT)

T Mu
Hi,

I was doing a Kolmogrov test on x, y shown below. They are both 151 long.
According to the help file, exact p-value is not available so I set "exact =
FALSE", but still got the warning. There are no duplicated values in either
X or Y.

Thank you for your tips.

BTW, is there functions in R about Extreme value theory?

********************************************

> ks.test(x, y, exact=FALSE)

        Two-sample Kolmogorov-Smirnov test

data:  x and y
D = 0.0199, p-value = 1
alternative hypothesis: two.sided

Warning message:
cannot compute correct p-values with ties in: ks.test(x, y, exact = FALSE)
> x
  [1] 9324.66 9226.63 9397.07 9336.05 9311.13 9295.35 9234.10 9387.89
9234.78
 [10] 9324.92 9331.89 9319.24 9326.54 9310.27 9312.58 9341.65 9343.52
9386.91
 [19] 9358.34 9352.19 9249.91 9361.72 9319.32 9319.37 9322.68 9279.11
9338.51
 [28] 9234.44 9327.80 9278.45 9326.84 9362.44 9372.29 9307.02 9326.59
9271.31
 [37] 9358.62 9309.49 9286.66 9360.42 9273.30 9456.41 9356.02 9251.48
9272.03
 [46] 9364.74 9304.96 9315.76 9436.05 9274.48 9458.17 9342.87 9265.94
9291.11
 [55] 9376.97 9334.13 9267.81 9202.62 9258.91 9395.10 9343.39 9321.01
9383.03
 [64] 9348.42 9388.16 9417.30 9319.62 9268.10 9326.50 9334.72 9336.15
9253.60
 [73] 9286.50 9279.55 9300.88 9307.10 9288.33 9278.62 9333.43 9363.46
9359.79
 [82] 9366.34 9277.10 9359.35 9293.66 9419.21 9291.88 9353.83 9300.62
9356.84
 [91] 9379.34 9251.84 9363.74 9348.23 9264.89 9244.54 9441.93 9288.55
9294.39
[100] 9283.17 9264.91 9349.70 9310.12 9252.40 9309.53 9247.44 9308.80
9373.26
[109] 9314.16 9282.95 9276.30 9360.82 9321.95 9322.66 9293.76 9283.36
9355.10
[118] 9388.32 9359.18 9245.24 9349.34 9255.59 9258.65 9337.42 9373.01
9346.65
[127] 9330.47 9184.83 9428.09 9266.24 9431.26 9305.65 9395.79 9389.39
9280.70
[136] 9346.83 9316.69 9398.35 9279.59 9244.18 9344.09 9311.28 9263.81
9291.98
[145] 9388.35 9305.64 9298.52 9376.20 9297.70 9263.75 9320.70
> y
  [1] 9324.37 9226.09 9396.77 9337.22 9310.66 9295.10 9233.66 9387.45
9233.46
 [10] 9325.99 9329.84 9320.11 9326.78 9311.08 9312.93 9340.68 9343.94
9386.04
 [19] 9358.91 9351.88 9250.99 9361.56 9319.16 9319.74 9321.23 9278.78
9338.68
 [28] 9234.95 9328.50 9279.39 9327.13 9362.38 9372.54 9306.28 9326.95
9271.38
 [37] 9357.54 9310.51 9285.91 9360.93 9273.40 9456.10 9356.40 9251.98
9272.96
 [46] 9364.79 9304.87 9315.81 9435.96 9273.64 9458.27 9343.56 9264.07
9292.29
 [55] 9377.23 9333.94 9267.11 9204.19 9258.19 9394.69 9342.75 9321.39
9383.08
 [64] 9348.78 9388.03 9417.74 9319.23 9267.11 9327.78 9334.55 9336.99
9252.58
 [73] 9286.68 9279.37 9302.36 9306.77 9289.20 9277.80 9335.24 9363.06
9359.58
 [82] 9367.06 9277.62 9359.30 9293.55 9418.62 9290.20 9353.03 9300.96
9357.22
 [91] 9379.37 9252.66 9364.54 9348.90 9263.56 9244.39 9442.13 9288.08
9293.98
[100] 9282.82 9264.91 9349.14 9309.40 9254.01 9310.41 9247.66 9308.53
9372.40
[109] 9314.47 9283.26 9276.75 9360.88 9322.83 9322.79 9293.60 9283.66
9354.04
[118] 9387.31 9358.78 9245.56 9349.49 9255.28 9259.31 9338.26 9372.98
9347.06
[127] 9330.06 9184.03 9428.35 9266.33 9430.77 9305.97 9395.39 9389.28
9281.09
[136] 9347.54 9317.56 9399.33 9279.59 9244.15 9343.92 9310.93 9264.02
9292.07
[145] 9388.42 9303.67 9297.54 9376.03 9296.94 9263.79 9320.82

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: Is this my mistake or a bug?(K-S test and EVT)

P Ehlers

Mu Tian wrote:

> Hi,
>
> I was doing a Kolmogrov test on x, y shown below. They are both 151 long.
> According to the help file, exact p-value is not available so I set "exact =
> FALSE", but still got the warning. There are no duplicated values in either
> X or Y.
>
But I'll wager that there are some Xs equal to Ys.

> Thank you for your tips.
>
> BTW, is there functions in R about Extreme value theory?
>
Packages evd and evir and perhaps others.

Peter Ehlers

> ********************************************
>
>
>>ks.test(x, y, exact=FALSE)
>
>
>         Two-sample Kolmogorov-Smirnov test
>
> data:  x and y
> D = 0.0199, p-value = 1
> alternative hypothesis: two.sided
>
> Warning message:
> cannot compute correct p-values with ties in: ks.test(x, y, exact = FALSE)
>
[snip]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html