View source: R/proportions.onetwo.R
| power.exact.oneprop | R Documentation |
Calculates power, sample size or effect size (only one can be NULL at a time) for test of a proportion against a constant using the exact method.
Formulas are validated using PASS documentation.
power.exact.oneprop(
prob = NULL,
req.sign = "+",
null.prob = 0.5,
n = NULL,
power = NULL,
alpha = 0.05,
alternative = c("two.sided", "one.sided", "two.one.sided"),
verbose = 1,
utf = FALSE
)
prob |
probability of success under alternative. |
req.sign |
whether |
null.prob |
probability of success under null. |
n |
integer; sample size. |
power |
statistical power, defined as the probability of
correctly rejecting a false null hypothesis, denoted as
|
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 margin to the
null hypothesis value and use
|
verbose |
|
utf |
logical; whether the output should show Unicode
characters (if encoding allows for it). |
parms |
list of parameters used in calculation. |
test |
type of the statistical test ("exact"). |
delta |
difference between |
odds.ratio |
Odds-ratio |
prob |
probability of success under alternative. |
null.prob |
probability of success under null. |
binom.alpha |
critical value(s). |
power |
statistical power |
n |
sample size. |
Bulus, M., & Polat, C. (2023). pwrss R paketi ile istatistiksel guc analizi [Statistical power analysis with pwrss R package]. Ahi Evran Universitesi Kirsehir Egitim Fakultesi Dergisi, 24(3), 2207-2328. https://doi.org/10.29299/kefad.1209913
# power'
power.exact.oneprop(prob = 0.45, null.prob = 0.50,
alpha = 0.05, n = 500,
alternative = "one.sided")
# sample size
power.exact.oneprop(prob = 0.45, null.prob = 0.50,
alpha = 0.05, power = 0.80,
alternative = "one.sided")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.