sampleSizeWilcoxTwoSample {biostatUZH} | R Documentation |
Compute sample size to test the hypothesis that two samples come from the same population against that Y's tend to be larger than X's.
sampleSizeWilcoxTwoSample(a = 0.05, b = 0.2, c = 0.5, pxy = 0.75, two.sided = TRUE)
a |
Significance level of test. |
b |
Desired power of test. |
c |
Proportion of observations in group 1: c = m / (m + n) (c = 0.5 means equally sized groups). |
pxy |
A value for the probability P(Y > X). |
two.sided |
If |
Given two independent samples X_1, ..., X_m and Y_1, ..., Y_n, we want to test the hypothesis that the two samples come from the same population against that Y's tend to be larger than X's.
m |
Sample size of the first group. |
n |
Sample size of the second group. |
Kaspar Rufibach
kaspar.rufibach@gmail.com
Nother, G.E. (1987). Sample Size Determination for Some Common Nonparametric Tests JASA, 82, 644–647.
# compute sample size for some pxy's pxys <- c(0.65, 0.7, 0.75) dat1 <- matrix(ncol = 3, nrow = length(pxys)) colnames(dat1) <- c("P(Y > X)", "m", "n") for (j in 1:length(pxys)){dat1[j, ] <- c(pxys[j], sampleSizeWilcoxTwoSample(a = 0.05, b = 0.1, c = 0.5, pxy = pxys[j], two.sided = TRUE))} dat1