1
1
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-29 r88740 ) -- "Unsuffered Consequences"
3
+ Copyright (C) 2025 The R Foundation for Statistical Computing
4
+ Platform: x86_64-pc-linux-gnu
5
5
6
6
R is free software and comes with ABSOLUTELY NO WARRANTY.
7
7
You are welcome to redistribute it under certain conditions.
@@ -170,17 +170,19 @@ $s.[[5]]
170
170
+ wilcox.test(x, exact=TRUE, conf.int=TRUE, alternative = alt)
171
171
+ ## )
172
172
+ )))
173
- There were 52 warnings (use warnings() to see them)
173
+ There were 55 warnings (use warnings() to see them)
174
174
> length(ww <- warnings()) # 52 (or 43 for x0 <- 0:3)
175
- [1] 52
175
+ [1] 55
176
176
> unique(ww) # 4 different ones
177
177
Warning messages:
178
- 1: In wilcox.test.default(x, exact = TRUE, conf.int = TRUE, ... :
179
- cannot compute exact p-value with zeroes
178
+ 1: cannot compute confidence interval when all observations are zero or tied
180
179
2: In wilcox.test.default(x, exact = TRUE, conf.int = TRUE, ... :
180
+ cannot compute exact p-value with zeroes
181
+ 3: In wilcox.test.default(x, exact = TRUE, conf.int = TRUE, ... :
181
182
cannot compute exact confidence interval with zeroes
182
- 3: cannot compute confidence interval when all observations are zero or tied
183
- 4: In wilcox.test.default(x, exact = TRUE, conf.int = TRUE, ... :
183
+ 4: In .wilcox_test_one_cint_asymp(x, n, alternative, conf.level, ... :
184
+ requested conf.level not achievable
185
+ 5: In .wilcox_test_one_cint_exact(x, n, alternative, conf.level) :
184
186
requested conf.level not achievable
185
187
>
186
188
> cc <- lapply(RR, function(A) lapply(A, function(bb) lapply(bb, class)))
@@ -225,10 +227,11 @@ character(0)
225
227
[5,] 0.0625 1 0.03125
226
228
>
227
229
> pv$s0$two.sided[1] <- 1 ## artificially
228
- > stopifnot(all.equal(pv$s0, pv$s., tol = 0.5 + 1e-6), # seen 0.5
230
+ > stopifnot(all.equal(pv$s0, pv$s., tolerance = 0.5 + 1e-6), # seen 0.5
229
231
+ ## "less" are close:
230
232
+ all.equal(unlist(pv[[c("s0","less")]]),
231
- + unlist(pv[[c("s.","less")]]), tol = 0.03),
233
+ + unlist(pv[[c("s.","less")]]),
234
+ + tolerance = 0.03),
232
235
+ 0 <= unlist(pv), unlist(pv) <= 1) # <- no further NA ..
233
236
> ## b)
234
237
> sapply(stR[["statistic"]], unlist)
@@ -252,21 +255,21 @@ greater.V 10 15
252
255
> ## c)
253
256
> sapply(stR[["estimate" ]], unlist)
254
257
s0 s.
255
- two.sided1 NaN 1.0e-09
256
- two.sided.midrange 1.0 5.0e-01
257
- two.sided.(pseudo)median 1.5 1.0e+00
258
- two.sided.(pseudo)median 2.0 1.5e+00
259
- two.sided.(pseudo)median 2.5 2.0e+00
260
- less1 NaN 1.0e-09
261
- less.midrange 1.0 5.0e-01
262
- less.(pseudo)median 1.5 1.0e+00
263
- less.(pseudo)median 2.0 1.5e+00
264
- less.(pseudo)median 2.5 2.0e+00
265
- greater1 NaN 1.0e-09
266
- greater.midrange 1.0 5.0e-01
267
- greater.(pseudo)median 1.5 1.0e+00
268
- greater.(pseudo)median 2.0 1.5e+00
269
- greater.(pseudo)median 2.5 2.0e+00
258
+ two.sided.midrange 0.0 1.0e-09
259
+ two.sided.(pseudo)median 0.5 5.0e-01
260
+ two.sided.(pseudo)median 1.0 1.0e+00
261
+ two.sided.(pseudo)median 1.5 1.5e+00
262
+ two.sided.(pseudo)median 2.0 2.0e+00
263
+ less.midrange 0.0 1.0e-09
264
+ less.(pseudo)median 0.5 5.0e-01
265
+ less.(pseudo)median 1.0 1.0e+00
266
+ less.(pseudo)median 1.5 1.5e+00
267
+ less.(pseudo)median 2.0 2.0e+00
268
+ greater.midrange 0.0 1.0e-09
269
+ greater.(pseudo)median 0.5 5.0e-01
270
+ greater.(pseudo)median 1.0 1.0e+00
271
+ greater.(pseudo)median 1.5 1.5e+00
272
+ greater.(pseudo)median 2.0 2.0e+00
270
273
> ## d) confidence interval
271
274
> formatCI <- function(ci)
272
275
+ sprintf("[%g, %g] (%g%%)", ci[[1]], ci[[2]],
@@ -277,12 +280,18 @@ greater.(pseudo)median 2.5 2.0e+00
277
280
+ matrix("", nx, length(alts))))
278
281
, , s0
279
282
280
- two.sided less greater
281
- [1,] [NaN, NaN] (0%) [-Inf, NaN] (0%) [NaN, Inf] (0%)
282
- [2,] [NaN, NaN] (0%) [-Inf, NaN] (0%) [NaN, Inf] (0%)
283
- [3,] [1.5, 1.5] (0%) [-Inf, 1.5] (0%) [1.50001, Inf] (20%)
284
- [4,] [1.00007, 2.99993] (60%) [-Inf, 2.00002] (60%) [1.00009, Inf] (80%)
285
- [5,] [1.00006, 3.99994] (80%) [-Inf, 3.00002] (80%) [1.00009, Inf] (90%)
283
+ two.sided less
284
+ [1,] [NaN, NaN] (0%) [-Inf, NaN] (0%)
285
+ [2,] [0.5, 0.5] (0%) [-Inf, 0.5] (0%)
286
+ [3,] [6.57258e-05, 1.99993] (60%) [-Inf, 1.00002] (60%)
287
+ [4,] [5.6384e-05, 2.99994] (80%) [-Inf, 2.00002] (80%)
288
+ [5,] [0.999997, 3] (80%) [-Inf, 2.99998] (80%)
289
+ greater
290
+ [1,] [NaN, Inf] (0%)
291
+ [2,] [0.500007, Inf] (20%)
292
+ [3,] [8.76344e-05, Inf] (80%)
293
+ [4,] [9.39734e-05, Inf] (90%)
294
+ [5,] [0.999983, Inf] (90%)
286
295
287
296
, , s.
288
297
@@ -307,7 +316,7 @@ There were 27 warnings (use warnings() to see them)
307
316
[1] 27
308
317
> unique(w2) # 3 different ones
309
318
Warning messages:
310
- 1: In wilcox.test.default(x = x.set$s0[[k]], y = x.set$s.[[k]] , ... :
319
+ 1: In .wilcox_test_two_cint_exact(x, y, n.x, n.y, alternative , ... :
311
320
Requested conf.level not achievable
312
321
2: In wilcox.test.default(x = x.set$s0[[k]], y = x.set$s.[[k]], ... :
313
322
cannot compute exact p-value with ties
@@ -362,4 +371,4 @@ difference in location 3.741417e-05 3.741417e-05 3.741417e-05
362
371
>
363
372
> proc.time()
364
373
user system elapsed
365
- 0.130 0.017 0.145
374
+ 0.246 0.024 0.250
0 commit comments