wilcox.pow | R Documentation |
Computes an approximation to the power of the Wilcoxon signed rank or two-sample Wilcoxon rank sum test and one- or two-sample t-tests
wilcox.pow(n1, n2 = NULL, del, alpha2 = 0.05, tdist = FALSE)
n1 |
sample size in group 1 |
n2 |
Sample size in group 2. If NULL, assumes a 1-sample test. |
del |
difference as a fraction of the population standard deviation |
alpha2 |
two-sided significance level |
tdist |
if TRUE, uses t distribution for the critical value; if FALSE, uses a normal critical value |
Uses an approximations given in Lehman, Nonparametrics: Statistical Methods
Based on Ranks, for the power of the Wilcoxon signed rank and two-sample
Wilcoxon test. Assumes the data on a transformed scale is normally
distributed with constant variances. The difference del
is a
location shift on this transformed scale, expressed as a fraction of the
common standard deviation.
The critical value from the t-distribution with n1-1 (one-sample) or n1+n2-2
(two-sample) degrees of freedom can be used instead of the standard normal
by specifying tdist=TRUE
. However, the rejection probability is
still computed using the normal distribution.
A vector of length two giving the power for the Wilcoxon (first component) and t (second component) tests.
wilcox.pow(24, 24, 1)
wilcox.pow(24, 10, 1)
wilcox.pow(10, NULL, 0.5) ## one-sample test
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.