Is Exact exact? [Nonparametrics]
Dear Jack,
was on holiday thus I can answer but now.
Thanks for sharing your view.
Interesting as Helmut already said. Is it documented elsewhere?
Interesting enough the SAS
Lehmann, E. L. (1963).
"Nonparametric Confidence Intervals for a Shift Parameter"
Annals of Mathematical Statistics, 34, 1507-1512
As noticed in the example above ... (sort of) ... is different from the HL estimate in case of ties.
No. The example I have shown has n<50 and in that case the calculations will be done "exact" whatever that "exact" means.
Here another peculiarity of the coin package:
This gives:
Uuuups!
was on holiday thus I can answer but now.
Thanks for sharing your view.
❝ The coin packages uses the midpoint of the confidence interval as the point estimate for the location difference (ie (0.5-1.5)/2=-0.5 while the exactRankTests packages uses (sort of) the median of the observed differences as the point estimate.
Interesting as Helmut already said. Is it documented elsewhere?
Interesting enough the SAS
Proc npar1way
gives me both point estimates, Hodges-Lehmann median of the pairwise differences and the CI midpoint. The latter attributed to Lehmann:Lehmann, E. L. (1963).
"Nonparametric Confidence Intervals for a Shift Parameter"
Annals of Mathematical Statistics, 34, 1507-1512
As noticed in the example above ... (sort of) ... is different from the HL estimate in case of ties.
❝ As for the differences in confidence intervals I presume that it has to do with either the approximation which is uses if n>50 and/or the continuity correction.
No. The example I have shown has n<50 and in that case the calculations will be done "exact" whatever that "exact" means.
Here another peculiarity of the coin package:
library(coin)
set.seed(130910)
n1 <- 10; n2 <-10
mu1 <- 0; mu2 <-0
grp <- as.factor(c(rep('A', n1), rep('B', n2)))
ptm <- proc.time()
nsim <- 500
equalCI <- 0
for(i in 1:nsim){
x <- c(round(rnorm(n1, mean=mu1, sd=1),1), round(rnorm(n2, mean=mu2, sd=1),1))
res1 <- confint(wilcox_test(x~grp,
distribution=exact(algorithm = c("shift")),
conf.int=TRUE, conf.level=0.90))$conf.int
res1a <- confint(wilcox_test(x~grp,
distribution=exact(algorithm = c("split-up")),
conf.int=TRUE, conf.level=0.90))$conf.int
if(all.equal(res1,res1a)==TRUE) {equalCI <- equalCI+1}
if (1000*trunc(i/1000)==i) cat("\n")
if (50*trunc(i/50)==i & i<nsim) cat(i+1,"") # give a sign of alive
}
cat("\n\n")
cat("shift vs. split-up: equal CIs",equalCI/nsim)
cat("\nsims time\n")
print(proc.time()-ptm)
This gives:
shift vs. split-up: equal CIs 0.73
sims time
user system elapsed
182.67 0.23 184.70
Uuuups!

—
Regards,
Detlew
Regards,
Detlew
Complete thread:
- tmax in case of ties: R vs. R vs. SAS d_labes 2010-09-10 12:05 [Nonparametrics]
- tmax in case of ties: StatXact, Phoenix, and... Helmut 2010-09-10 18:28
- Ties, no ties, ties, no ties ... d_labes 2010-09-13 13:21
- simulation martin 2010-09-14 08:33
- simulants of the world unite d_labes 2010-09-15 10:14
- simulants of the world unite martin 2010-09-15 14:53
- simulants of the world unite Helmut 2010-09-15 16:17
- simul ants with no ties d_labes 2010-09-16 11:19
- simul ants with no ties Helmut 2010-09-16 14:01
- two different approaches martin 2010-09-16 15:35
- simul ants with no ties Helmut 2010-09-16 14:01
- simul ants with no ties d_labes 2010-09-16 11:19
- simulants of the world unite Helmut 2010-09-15 16:17
- simulants of the world unite martin 2010-09-15 14:53
- simulants of the world unite d_labes 2010-09-15 10:14
- simulation martin 2010-09-14 08:33
- Ties, no ties, ties, no ties ... d_labes 2010-09-13 13:21
- evaluation of tmax: use of relative effects? martin 2010-09-16 18:04
- Not positive about that Helmut 2010-09-16 19:52
- Not positive about that martin 2010-09-16 21:00
- Stupidity Helmut 2010-09-17 13:10
- Not positive about that martin 2010-09-16 21:00
- Not positive about that Helmut 2010-09-16 19:52
- tmax in case of ties: R vs. R vs. SAS Jack 2010-09-20 14:03
- R packages Helmut 2010-09-20 14:20
- R packages code d_labes 2010-09-27 11:27
- R packages Jack 2010-09-27 16:14
- Is Exact exact?d_labes 2010-09-27 09:53
- R packages Helmut 2010-09-20 14:20
- tmax in case of ties: StatXact, Phoenix, and... Helmut 2010-09-10 18:28