Description Usage Arguments Details Value Author(s) References Examples
Function computes sample size for the two-sided Wilcoxon test when applied to two independent samples with ordered categorical responses.
1 | n.wilcox.ord(power = 0.8, alpha = 0.05, t, p, q)
|
power |
required Power |
alpha |
required two-sided Type-I-error level |
t |
sample size fraction n/N, where n is sample size of group B and N is the total sample size |
p |
vector of expected proportions of the categories in group A, should sum to 1 |
q |
vector of expected proportions of the categories in group B, should be of equal length as p and should sum to 1 |
This function approximates the total sample size, N, needed for the two-sided Wilcoxon test when comparing two independent samples, A and B, when data are ordered categorical according to Equation 12 in Zhao et al.(2008). Assuming that the response consists of D ordered categories C_1 ,..., C_D. The expected proportions of these categories in two treatments A and B must be specified as numeric vectors p_1,...,p_D and q_1,...,q_D, respectively. The argument t allows to compute power for an unbalanced design, where t=n_B/N is the proportion of sample size in treatment B.
total sample size |
Total sample size |
m |
Sample size group 1 |
n |
Sample size group 2 |
Ralph Scherer
Zhao YD, Rahardja D, Qu Yongming. Sample size calculation for the Wilcoxon-Mann-Whitney test adjsuting for ties. Statistics in Medicine 2008; 27:462-468
1 2 3 4 5 |
$`total sample size`
[1] 8390
$m
[1] 3943
$n
[1] 4447
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.