binom.ppow: Compute the power of a binomial experiment using pilot data.

Description Usage Arguments Value See Also Examples

Description

binom.ppow computes (through simulation) the power of a binomial experiment with a specified sample size, using pilot data.

Usage

1
2
binom.ppow(n, pilotdata, r = 10000, alternative = c("two.sided", "less",
  "greater"), alpha = 0.05, nullp = 0.5, conf.level = 0.95)

Arguments

n

sample size.

pilotdata

a list with numerical or categorical pilot data. Largest number of second category is treated as success.

r

number of simulations to compute power.

alternative

type of alternative hypothesis in binomial test. Must be "two.sided" (default), "greater", or "less".

alpha

significance threshhold.

nullp

probability of success in null hypothesis.

conf.level

size of confidence intervals.

Value

The probability of finding p < α with the experiment description and a 95

See Also

binom.power, binom.ppow, binom.explore, and binom.pexplore.

Examples

1
2
3
binom.ppow(n=16, pilotdata = (1, 1, 0, 0, 1, 1), p=0.8)
binom.ppow(n=16, pilotdata = ("a", "b", "b", "b"), p=0.8, alternative="greater")
binom.ppow(n=16, pilotdata = ("a", "b", "b", "b"), r=5000, nullp=0.25, alternative="greater")

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