View source: R/generic.binom.test.R
| power.binom.test | R Documentation |
Calculates power or find Probability (Non-Centrality) for the generic binomial test with (optional) Type 1 and Type 2 error plots.
power.binom.test(
power = NULL,
size = NULL,
prob = NULL,
null.prob = 0.5,
req.sign = "+",
alpha = 0.05,
alternative = c("two.sided", "one.sided", "two.one.sided"),
plot = TRUE,
verbose = 1,
utf = FALSE
)
power |
statistical power |
size |
number of trials (zero or more); either |
prob |
probability of success on each trial under alternative;
either |
null.prob |
probability of success on each trial under null. |
req.sign |
whether 'prob' is expected to be greater '+1', less than '-1', or within '0' the null.prob' bounds. |
alpha |
type 1 error rate, defined as the probability of
incorrectly rejecting a true null hypothesis, denoted as
|
alternative |
character; the direction or type of the hypothesis test: "two.sided", "one.sided", or "two.one.sided". For non-inferiority or superiority tests, add or subtract the margin from the null hypothesis value and use alternative = "one.sided". |
plot |
logical; |
verbose |
|
utf |
logical; whether the output should show Unicode
characters (if encoding allows for it). |
power |
statistical power |
size |
number of trials (zero or more). |
prob |
probability of success on each trial under alternative. |
null.prob |
probability of success on each trial under null. |
alpha |
type 1 error rate. |
alternative |
direction or type of the hypothesis test. |
binom.alpha |
critical value(s). |
# one-sided
power.binom.test(size = 200, prob = 0.6, null.prob = 0.5, alpha = 0.05,
alternative = "one.sided")
power.binom.test(power = 0.80, size = 200, req.sign = "+", null.prob = 0.5,
alpha = 0.05, alternative = "one.sided")
# two-sided
power.binom.test(size = 200, prob = 0.4, null.prob = 0.5, alpha = 0.05,
alternative = "two.sided")
power.binom.test(power = 0.80, size = 200, req.sign = "+", null.prob = 0.5,
alpha = 0.05, alternative = "two.sided")
# equivalence
power.binom.test(size = 200, prob = 0.5, null.prob = c(0.4, 0.6),
alpha = 0.05, alternative = "two.one.sided")
power.binom.test(power = 0.80, size = 200, req.sign = "0",
null.prob = c(0.4, 0.6), alpha = 0.05,
alternative = "two.one.sided")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.