Description Usage Arguments Value Examples
utest.ppow
computes (via simulation) the power of an experiment that will be analyzed using a u test (also called Wilcoxon test).
Rather than taking a theoretical distribution, this function takes empirical data and bootstraps them to calculate the power.
1 2 | utest.ppow(x, y = NULL, n, r = 10000, alternative = c("two.sided", "less",
"greater"), mu = NULL, alpha = 0.05, conf.level = 0.95)
|
x |
a data frame with two columns, or a list with pilot data. |
y |
a list with pilot data. When x is a list and y is not provided, a one-tailed t-test is used. |
The probability of finding p < α with the experiment description.
1 2 3 | utest.ppow(x=c(0, 5, 10), n=16) # Power for a one-sample u test with n=16. Pilot data consists of three data points.
utest.ppow(x=c(0, 5, 10), n=16, mu = -5) # Same as above, changing the avarege under the null to -5.
utest.ppow(x=c(0, 5, 10), y=c(9, 3, 2, 1), n=30) # Power for a two-sample u test with n=30 (per condition) using unbalanced pilot data.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.