This is a followup question to what Frank Harrell wrote here:
In my experience the required sample size for the t distribution to be accurate is often larger than the sample size at hand. The Wilcoxon signed-rank test is extremely efficient as you said, and it is robust, so I almost always prefer it over the t test
If I understand it correctly - when comparing the location of two unmatched samples, we would prefer to use the Wilcoxon rank-sum test over the unpaired t-test, if our sample sizes are small.
Is there a theoretical situation where we would prefer the Wilcoxon rank-sum test over the unpaired t-test, even that the sample sizes of our two groups are relatively large?
My motivation for this question stems from the observation that for a single sample t-test, using it for a not-so-small sample of a skewed distribution will yield a wrong type I error:
n1 <- 100
mean1 <- 50
R <- 100000
P_y1 <- numeric(R)
for(i in seq_len(R))
{
y1 <- rexp(n1, 1/mean1)
P_y1[i] <- t.test(y1 , mu = mean1)$p.value
}
sum(P_y1<.05) / R # for n1=n2=100 -> 0.0572 # "wrong" type I error