WMWSSP | R Documentation |
The function implements the sample size formula proposed by Happ et al. (see reference below). It estimates the sample size needed to detect the effect with pre-defined power at significance level alpha based on pilot data.
WMWSSP(x1, x2, alpha = 0.05, power = 0.8, t = 1/2)
x1 |
advance information for the first group |
x2 |
advance information for the second group |
alpha |
two sided type I error rate |
power |
power with the sample sizes of each group |
t |
proportion of subjects in the first group |
Returns a data frame
Brunner, E., Bathke A. C. and Konietschke, F. Rank- and Pseudo-Rank Procedures in Factorial Designs - Using R and SAS. Springer Verlag. Happ, M., Bathke, A. C., & Brunner, E. (2019). Optimal sample size planning for the Wilcoxon-Mann-Whitney test. Statistics in medicine, 38(3), 363-375.
x1 = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2) x2 = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3) WMWSSP(x1,x2,0.05,0.8,0.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.