View source: R/ci_p_coverage.R
ci_p_coverage_plot2 | R Documentation |
This function plots the coverage for any confidence interval for p.
ci_p_coverage_plot2(
p = 0.5,
seq_n = seq(from = 10, to = 500, by = 10),
conf.level = 0.95,
intervalType = "wald",
plot = TRUE,
col = "deepskyblue2",
linecolor = "tomato",
...
)
p |
true proportion |
seq_n |
sequence with the values of sample size |
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. |
plot |
logical value to obtain the plot, TRUE by default. |
col |
color for the coverage curve. |
linecolor |
color for the line representing the conf.level. |
... |
further arguments and graphical parameters passed to plot function. |
This function was inspired by the binomTestCoveragePlot() function from conf package and Park & Leemis (2019).
A dataframe with Method, n, p and true coverage and the plot.
Laura Juliana Insignares Montes, linsignares@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_plot2(p=0.50,
conf.level=0.95,
intervalType="wald")
ci_p_coverage_plot2(p=0.75,
conf.level=0.95,
intervalType="wald")
ci_p_coverage_plot2(p=0.50,
conf.level=0.95,
intervalType="wilson")
ci_p_coverage_plot2(p=0.75,
conf.level=0.95,
intervalType="wilson",
col="orange", linecolor="purple")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.