Skip to content

Commit 1d42b1f

Browse files
author
hornik
committed
Updated.
git-svn-id: https://svn.r-project.org/R/trunk@88749 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 75871a6 commit 1d42b1f

File tree

3 files changed

+65
-101
lines changed

3 files changed

+65
-101
lines changed

src/library/stats/tests/ks-test.Rout.save

Lines changed: 36 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
R Under development (unstable) (2025-08-29 r88740) -- "Unsuffered Consequences"
2+
R Under development (unstable) (2025-08-31 r88747) -- "Unsuffered Consequences"
33
Copyright (C) 2025 The R Foundation for Statistical Computing
44
Platform: x86_64-pc-linux-gnu
55

@@ -311,17 +311,25 @@ greater.(pseudo)median 2.0 2.0e+00
311311
+ lapply(seq_along(x0), function(k)
312312
+ wilcox.test(x = x.set$s0[[k]], y = x.set$s.[[k]],
313313
+ exact=TRUE, conf.int=TRUE, alternative = alt)))
314-
There were 27 warnings (use warnings() to see them)
314+
Warning messages:
315+
1: In .wilcox_test_two_cint_exact(x, y, n.x, n.y, STAT$z, alternative, :
316+
Requested conf.level not achievable
317+
2: In .wilcox_test_two_cint_exact(x, y, n.x, n.y, STAT$z, alternative, :
318+
Requested conf.level not achievable
319+
3: In .wilcox_test_two_cint_exact(x, y, n.x, n.y, STAT$z, alternative, :
320+
Requested conf.level not achievable
321+
4: In .wilcox_test_two_cint_exact(x, y, n.x, n.y, STAT$z, alternative, :
322+
Requested conf.level not achievable
323+
5: In .wilcox_test_two_cint_exact(x, y, n.x, n.y, STAT$z, alternative, :
324+
Requested conf.level not achievable
325+
6: In .wilcox_test_two_cint_exact(x, y, n.x, n.y, STAT$z, alternative, :
326+
Requested conf.level not achievable
315327
> length(w2 <- warnings()) # 27
316-
[1] 27
328+
[1] 6
317329
> unique(w2) # 3 different ones
318-
Warning messages:
319-
1: In .wilcox_test_two_cint_exact(x, y, n.x, n.y, alternative, ... :
330+
Warning message:
331+
In .wilcox_test_two_cint_exact(x, y, n.x, n.y, STAT$z, ... :
320332
Requested conf.level not achievable
321-
2: In wilcox.test.default(x = x.set$s0[[k]], y = x.set$s.[[k]], ... :
322-
cannot compute exact p-value with ties
323-
3: In wilcox.test.default(x = x.set$s0[[k]], y = x.set$s.[[k]], ... :
324-
cannot compute exact confidence intervals with ties
325333
>
326334
> table(uc2 <- unlist(c2 <- lapply(R2, function(A) lapply(A, class))))
327335

@@ -344,31 +352,31 @@ W 7.5 7.5 7.5
344352
W 12.0 12.0 12.0
345353

346354
$p.value
347-
two.sided less greater
348-
[1,] 1 0.5 1.0000000
349-
[2,] 1 0.5 0.7928919
350-
[3,] 1 0.5 0.6734524
351-
[4,] 1 0.5 0.6156105
352-
[5,] 1 0.5 0.5837406
355+
two.sided less greater
356+
[1,] 1.0000000 0.5000000 1.0000000
357+
[2,] 1.0000000 0.5000000 0.8333333
358+
[3,] 1.0000000 0.5000000 0.7000000
359+
[4,] 0.9714286 0.4857143 0.6285714
360+
[5,] 0.9682540 0.4841270 0.5873016
353361

354362
$estimate
355-
two.sided less greater
356-
difference in location -1.000000e-09 -1.000000e-09 -1.000000e-09
357-
difference in location -4.467848e-05 -4.467848e-05 -4.467848e-05
358-
difference in location -4.692131e-05 -4.692131e-05 -4.692131e-05
359-
difference in location 1.937902e-05 1.937902e-05 1.937902e-05
360-
difference in location 3.741417e-05 3.741417e-05 3.741417e-05
363+
two.sided less greater
364+
difference in location -1e-09 -1e-09 -1e-09
365+
difference in location -5e-10 -5e-10 -5e-10
366+
difference in location 0e+00 0e+00 0e+00
367+
difference in location 0e+00 0e+00 0e+00
368+
difference in location 0e+00 0e+00 0e+00
361369

362370
>
363371
> noquote(sapply(stR2[["conf.int"]], function(.) vapply(., formatCI, "")))
364-
two.sided less greater
365-
[1,] [-1e-09, -1e-09] (0%) [-Inf, -1e-09] (50%) [-1e-09, Inf] (50%)
366-
[2,] [-1, 1] (95%) [-Inf, 1] (95%) [-1, Inf] (95%)
367-
[3,] [-2, 2] (95%) [-Inf, 2] (95%) [-2, Inf] (95%)
368-
[4,] [-3, 3] (95%) [-Inf, 2.00005] (95%) [-2.00003, Inf] (95%)
369-
[5,] [-2.99998, 2.99996] (95%) [-Inf, 2.00005] (95%) [-2.00006, Inf] (95%)
372+
two.sided less greater
373+
[1,] [-1e-09, -1e-09] (0%) [-Inf, -1e-09] (50%) [-1e-09, Inf] (50%)
374+
[2,] [-1, 1] (67%) [-Inf, 1] (83%) [-1, Inf] (83%)
375+
[3,] [-2, 2] (95%) [-Inf, 2] (95%) [-2, Inf] (95%)
376+
[4,] [-3, 2] (95%) [-Inf, 2] (95%) [-3, Inf] (95%)
377+
[5,] [-3, 2] (95%) [-Inf, 2] (95%) [-3, Inf] (95%)
370378
>
371379
>
372380
> proc.time()
373381
user system elapsed
374-
0.246 0.024 0.250
382+
0.202 0.034 0.215

tests/Examples/stats-Ex.Rout.save

Lines changed: 24 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
R Under development (unstable) (2025-08-11 r88568) -- "Unsuffered Consequences"
2+
R Under development (unstable) (2025-08-31 r88747) -- "Unsuffered Consequences"
33
Copyright (C) 2025 The R Foundation for Statistical Computing
44
Platform: x86_64-pc-linux-gnu
55

@@ -5124,7 +5124,7 @@ function (V)
51245124
r[seq.int(from = 1L, by = p + 1L, length.out = p)] <- 1
51255125
r
51265126
}
5127-
<bytecode: 0x55ad678570e0>
5127+
<bytecode: 0x563b2649c7a8>
51285128
<environment: namespace:stats>
51295129
> stopifnot(all.equal(Cl, cov2cor(cov(longley))),
51305130
+ all.equal(cor(longley, method = "kendall"),
@@ -7772,7 +7772,7 @@ attr(,".Environment")
77727772
> environment(as.formula("y ~ x"))
77737773
<environment: R_GlobalEnv>
77747774
> environment(as.formula("y ~ x", env = new.env()))
7775-
<environment: 0x55ad6780b2c8>
7775+
<environment: 0x563b259d6d40>
77767776
>
77777777
>
77787778
> ## Create a formula for a model with a large number of variables:
@@ -12074,69 +12074,29 @@ P value adjustment method: holm
1207412074
> Month <- factor(Month, labels = month.abb[5:9])
1207512075
> ## These give warnings because of ties :
1207612076
> pairwise.wilcox.test(Ozone, Month)
12077-
Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
12078-
cannot compute exact p-value with ties
12079-
Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
12080-
cannot compute exact p-value with ties
12081-
Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
12082-
cannot compute exact p-value with ties
12083-
Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
12084-
cannot compute exact p-value with ties
12085-
Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
12086-
cannot compute exact p-value with ties
12087-
Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
12088-
cannot compute exact p-value with ties
12089-
Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
12090-
cannot compute exact p-value with ties
12091-
Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
12092-
cannot compute exact p-value with ties
12093-
Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
12094-
cannot compute exact p-value with ties
12095-
Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
12096-
cannot compute exact p-value with ties
1209712077

12098-
Pairwise comparisons using Wilcoxon rank sum test with continuity correction
12078+
Pairwise comparisons using Wilcoxon rank sum exact test
1209912079

1210012080
data: Ozone and Month
1210112081

12102-
May Jun Jul Aug
12103-
Jun 0.5775 - - -
12104-
Jul 0.0003 0.0848 - -
12105-
Aug 0.0011 0.1295 1.0000 -
12106-
Sep 0.4744 1.0000 0.0060 0.0227
12082+
May Jun Jul Aug
12083+
Jun 0.59876 - - -
12084+
Jul 0.00011 0.07531 - -
12085+
Aug 0.00058 0.12296 1.00000 -
12086+
Sep 0.48080 1.00000 0.00423 0.01901
1210712087

1210812088
P value adjustment method: holm
1210912089
> pairwise.wilcox.test(Ozone, Month, p.adjust.method = "bonf")
12110-
Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
12111-
cannot compute exact p-value with ties
12112-
Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
12113-
cannot compute exact p-value with ties
12114-
Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
12115-
cannot compute exact p-value with ties
12116-
Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
12117-
cannot compute exact p-value with ties
12118-
Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
12119-
cannot compute exact p-value with ties
12120-
Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
12121-
cannot compute exact p-value with ties
12122-
Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
12123-
cannot compute exact p-value with ties
12124-
Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
12125-
cannot compute exact p-value with ties
12126-
Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
12127-
cannot compute exact p-value with ties
12128-
Warning in wilcox.test.default(xi, xj, paired = paired, ...) :
12129-
cannot compute exact p-value with ties
1213012090

12131-
Pairwise comparisons using Wilcoxon rank sum test with continuity correction
12091+
Pairwise comparisons using Wilcoxon rank sum exact test
1213212092

1213312093
data: Ozone and Month
1213412094

12135-
May Jun Jul Aug
12136-
Jun 1.0000 - - -
12137-
Jul 0.0003 0.1414 - -
12138-
Aug 0.0012 0.2591 1.0000 -
12139-
Sep 1.0000 1.0000 0.0074 0.0325
12095+
May Jun Jul Aug
12096+
Jun 1.00000 - - -
12097+
Jul 0.00011 0.12551 - -
12098+
Aug 0.00064 0.24591 1.00000 -
12099+
Sep 1.00000 1.00000 0.00528 0.02715
1214012100

1214112101
P value adjustment method: bonferroni
1214212102
> detach()
@@ -12713,14 +12673,14 @@ attr(,"class")
1271312673
$linkfun
1271412674
function (mu)
1271512675
mu^lambda
12716-
<bytecode: 0x55ad6718bf60>
12717-
<environment: 0x55ad6713aa08>
12676+
<bytecode: 0x563b246f9b48>
12677+
<environment: 0x563b2473f3e8>
1271812678

1271912679
$linkinv
1272012680
function (eta)
1272112681
pmax(eta^(1/lambda), .Machine$double.eps)
12722-
<bytecode: 0x55ad6718be10>
12723-
<environment: 0x55ad6713aa08>
12682+
<bytecode: 0x563b246f9ad8>
12683+
<environment: 0x563b2473f3e8>
1272412684

1272512685
>
1272612686
>
@@ -17079,8 +17039,8 @@ Step function with continuity 'f'= 0.2 , 3 knots at
1707917039
> unclass(sfun0)
1708017040
function (v)
1708117041
.approxfun(x, y, v, method, yleft, yright, f, na.rm)
17082-
<bytecode: 0x55ad67f59fe8>
17083-
<environment: 0x55ad66e6c268>
17042+
<bytecode: 0x563b266f0588>
17043+
<environment: 0x563b261aea08>
1708417044
attr(,"call")
1708517045
stepfun(1:3, y0, f = 0)
1708617046
> ls(envir = environment(sfun0))
@@ -19106,13 +19066,11 @@ difference in location
1910619066
> boxplot(Ozone ~ Month, data = airquality)
1910719067
> wilcox.test(Ozone ~ Month, data = airquality,
1910819068
+ subset = Month %in% c(5, 8))
19109-
Warning in wilcox.test.default(x = DATA[[1L]], y = DATA[[2L]], ...) :
19110-
cannot compute exact p-value with ties
1911119069

19112-
Wilcoxon rank sum test with continuity correction
19070+
Wilcoxon rank sum exact test
1911319071

1911419072
data: Ozone by Month
19115-
W = 127.5, p-value = 0.0001208
19073+
W = 127.5, p-value = 6.109e-05
1911619074
alternative hypothesis: true location shift is not equal to 0
1911719075

1911819076
>
@@ -19675,7 +19633,7 @@ Number of Fisher Scoring iterations: 6
1967519633
> cleanEx()
1967619634
> options(digits = 7L)
1967719635
> base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
19678-
Time elapsed: 6.623 0.156 6.783 0 0
19636+
Time elapsed: 5.053 0.132 5.188 0 0
1967919637
> grDevices::dev.off()
1968019638
null device
1968119639
1

tests/R-intro.Rout.save

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

2-
R Under development (unstable) (2023-04-19 r84284) -- "Unsuffered Consequences"
3-
Copyright (C) 2023 The R Foundation for Statistical Computing
4-
Platform: aarch64-apple-darwin22.4.0 (64-bit)
2+
R Under development (unstable) (2025-08-31 r88747) -- "Unsuffered Consequences"
3+
Copyright (C) 2025 The R Foundation for Statistical Computing
4+
Platform: x86_64-pc-linux-gnu
55

66
R is free software and comes with ABSOLUTELY NO WARRANTY.
77
You are welcome to redistribute it under certain conditions.
@@ -622,14 +622,12 @@ mean of x mean of y
622622
>
623623
> wilcox.test(A, B)
624624

625-
Wilcoxon rank sum test with continuity correction
625+
Wilcoxon rank sum exact test
626626

627627
data: A and B
628-
W = 89, p-value = 0.0075
628+
W = 89, p-value = 0.0065
629629
alternative hypothesis: true location shift is not equal to 0
630630

631-
Warning message:
632-
In wilcox.test.default(A, B) : cannot compute exact p-value with ties
633631
>
634632
> plot(ecdf(A), do.points=FALSE, verticals=TRUE, xlim=range(A, B))
635633
> plot(ecdf(B), do.points=FALSE, verticals=TRUE, add=TRUE)

0 commit comments

Comments
 (0)