utest.ppow: Compute the power using a one- or two-sample unpaired u test...

Description Usage Arguments Value Examples

Description

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.

Usage

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)

Arguments

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.

Value

The probability of finding p < α with the experiment description.

Examples

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.

julianje/mcpa documentation built on May 13, 2019, 6:14 p.m.