View source: R/ci_p_coverage.R
ci_p_coverage | R Documentation |
This function calculates the true coverage for any interval confidence for p.
ci_p_coverage(n, p, conf.level = 0.95, intervalType = "wald")
n |
number of trials. |
p |
true value for p. |
conf.level |
nominal confidence level for the returned confidence interval. By default is 0.95. |
intervalType |
type of confidence interval, possible choices are listed in ci_p. |
This function was inspired by the binomTestCoveragePlot() function from conf package and Park & Leemis (2019).
A dataframe with Method, n, p and true coverage.
David Esteban Cartagena Mejía, dcartagena@unal.edu.co
Park, H., & Leemis, L. M. (2019). Ensemble confidence intervals for binomial proportions. Statistics in Medicine, 38(18), 3460-3475.
ci_p.
ci_p_coverage(n=10, p=0.45, intervalType="wald")
ci_p_coverage(n=10, p=0.45, intervalType="wilson")
ci_p_coverage(n=10, p=c(0.10, 0.25, 0.40), intervalType="wilson")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.