Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

binom.power

Power curves for binomial parameterizations


Description

Uses Wald statistics to compute power curves for several parameterizations.

Usage

binom.power(p.alt,
            n = 100,
            p = 0.5,
            alpha = 0.05,
            phi = 1,
            alternative = c("two.sided", "greater", "less"),
            method = c("cloglog", "logit", "probit", "asymp", "lrt", "exact"))

Arguments

p.alt

A vector of success probabilities under the alternative hypothesis.

n

A vector representing the number of independent trials in the binomial experiment.

p

A vector of success probabilities under the null hypothesis.

alpha

A vector of type-I error rates.

phi

A vector determining the overdispersion parameter for each binomial experiment.

alternative

Type of alternative hypothesis.

method

The method used to compute power.

Details

For derivations see doc/binom.pdf. p.alt, n, p, alpha, and phi can all be vectors. The length of each argument will be expanded to the longest length. The function assumes the lengths are equal or can be wrapped for multiple values.

Value

The estimated probability of detecting the difference between p.alt and p.

Author(s)

Sundar Dorai-Raj (sdorairaj@gmail.com)

See Also

Examples

binom.power(0.95, alternative = "greater")

binom

Binomial Confidence Intervals For Several Parameterizations

v1.1-1
GPL
Authors
Sundar Dorai-Raj <sundar.dorai-raj@pdf.com>
Initial release
2014-01-01

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.