size_ci_one_prop {mcradds} | R Documentation |
Sample Size for Testing Confidence Interval of One Proportion
Description
This function performs sample size computation for testing a given lower confidence interval of one proportion with the using of the Simple Asymptotic(Wald), Wilson score, clopper-pearson and other methods.
Usage
size_ci_one_prop(
p,
lr,
alpha = 0.05,
interval = c(1, 1e+05),
tol = 1e-05,
alternative = c("two.sided", "less", "greater"),
method = c("simple-asymptotic", "wilson", "wald", "clopper-pearson")
)
Arguments
p |
( |
lr |
( |
alpha |
( |
interval |
( |
tol |
( |
alternative |
( |
method |
( |
Value
an object of size
class that contains the sample size and relevant parameters.
References
Newcombe, R. G. 1998. 'Two-Sided Confidence Intervals for the Single Proportion: Comparison of Seven Methods.' Statistics in Medicine, 17, pp. 857-872.
See Also
size_one_prop()
size_corr()
size_ci_corr()
Examples
size_ci_one_prop(p = 0.85, lr = 0.8, alpha = 0.05, method = "wilson")
size_ci_one_prop(p = 0.85, lr = 0.8, alpha = 0.05, method = "simple-asymptotic")
size_ci_one_prop(p = 0.85, lr = 0.8, alpha = 0.05, method = "wald")