wmwpow (version 0.1.3)

shiehpow: Power Calculation Using the Shieh et. al. Approach

Description

The purpose of shiehpow is to perform a power analysis for a one or two-sided Wilcoxon-Mann-Whitney test using the method developed by Shieh and colleagues.

Arguments

n

Sample size of first sample (numeric)

m

Sample size of second sample (numeric)

p

Effect size, P(X<Y) (numeric)

alpha

Type I error rate (numeric)

dist

The distribution type for the two groups (<U+201C>exp<U+201D>, <U+201C>dexp<U+201D>, or <U+201C>norm<U+201D>) (string)

sides

Options are <U+201C>two.sided<U+201D> and <U+201C>one.sided<U+201D> (string)

References

Shieh, G., Jan, S. L., Randles, R. H. (2006). On power and sample size determinations for the Wilcoxon<U+2013>Mann<U+2013>Whitney test. Journal of Nonparametric Statistics, 18(1), 33-43.

Mollan K.R., Trumble I.M., Reifeis S.A., Ferrer O., Bay C.P., Baldoni P.L., Hudgens M.G. Exact Power of the Rank-Sum Test for a Continuous Variable, arXiv:1901.04597 [stat.ME], Jan. 2019.

Examples

Run this code
# NOT RUN {
# We want to calculate the statistical power to compare the distance between mutations on a DNA 
# strand in two groups of people. Each group (X and Y) has 10 individuals. We assume that the 
# distance between mutations in the first group is exponentially distributed with rate 3. We assume 
# that the probability that the distance in the first group is less than the distance in the second 
# group (i.e., P(X<Y)) is 0.8. The desired type I error is 0.05.

shiehpow(n = 10, m = 10, p = 0.80, alpha = 0.05, dist = "exp", sides = "two.sided")

# }

Run the code above in your browser using DataCamp Workspace