# sampleSizeWilcoxTwoSample: Compute sample size for two sample Wilcoxon (Mann-Whitney)... In biostatUZH: Misc Tools of the Department of Biostatistics, EBPI, University of Zurich

## Description

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.

## Usage

 ```1 2``` ```sampleSizeWilcoxTwoSample(a = 0.05, b = 0.2, c = 0.5, pxy = 0.75, two.sided = TRUE) ```

## Arguments

 `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 `TRUE` a two-sided test is assumed, otherwise one-sided.

## Details

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.

## Value

 `m` Sample size of the first group. `n` Sample size of the second group.

## Author(s)

Kaspar Rufibach
[email protected]

## References

Nother, G.E. (1987). Sample Size Determination for Some Common Nonparametric Tests JASA, 82, 644–647.

## Examples

 ```1 2 3 4 5 6 7 8``` ```# 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 ```

biostatUZH documentation built on March 18, 2018, 1:12 p.m.