This function plots the coverage for any interval confidence for p.
ci_p_coverage_plot(
n,
conf.level = 0.95,
intervalType,
plot = TRUE,
step_prop = 0.01,
col = "deepskyblue2",
linecolor = "tomato",
...
)
number of trials.
nominal confidence level for the returned confidence interval. By default is 0.95.
type of confidence interval, possible choices are listed in ci_p.
logical value to obtain the plot, TRUE by default.
minimum step value to create a p sequence from 0 to 1. By default is 0.01.
color for the coverage curve.
color for the line representing the conf.level.
further arguments and graphical parameters passed to plot function.
A dataframe with Method, n, p and true coverage and the plot.
This function was inspired by the binomTestCoveragePlot() function from conf package and Park & Leemis (2019).
Park, H., & Leemis, L. M. (2019). Ensemble confidence intervals for binomial proportions. Statistics in Medicine, 38(18), 3460-3475.
ci_p.
ci_p_coverage_plot(n=10,
intervalType="wald",
conf.level=0.95,
ylim=c(0.8, 1), las=1)
#> Method n p coverage
#> 1 ci_p_wald 10 0.00 1.00000000
#> 2 ci_p_wald 10 0.01 0.09550408
#> 3 ci_p_wald 10 0.02 0.18289669
#> 4 ci_p_wald 10 0.03 0.26242879
#> 5 ci_p_wald 10 0.04 0.33472476
#> 6 ci_p_wald 10 0.05 0.40023456
#> 7 ci_p_wald 10 0.06 0.45935559
#> 8 ci_p_wald 10 0.07 0.51244155
#> 9 ci_p_wald 10 0.08 0.55981022
#> 10 ci_p_wald 10 0.09 0.60175012
#> 11 ci_p_wald 10 0.10 0.64968662
#> 12 ci_p_wald 10 0.11 0.68566583
#> 13 ci_p_wald 10 0.12 0.71778296
#> 14 ci_p_wald 10 0.13 0.74627991
#> 15 ci_p_wald 10 0.14 0.77137216
#> 16 ci_p_wald 10 0.15 0.79325150
#> 17 ci_p_wald 10 0.16 0.81208863
#> 18 ci_p_wald 10 0.17 0.82803575
#> 19 ci_p_wald 10 0.18 0.84122902
#> 20 ci_p_wald 10 0.19 0.85179089
#> 21 ci_p_wald 10 0.20 0.88625644
#> 22 ci_p_wald 10 0.21 0.89712371
#> 23 ci_p_wald 10 0.22 0.90624867
#> 24 ci_p_wald 10 0.23 0.91371646
#> 25 ci_p_wald 10 0.24 0.91959949
#> 26 ci_p_wald 10 0.25 0.92395878
#> 27 ci_p_wald 10 0.26 0.92684531
#> 28 ci_p_wald 10 0.27 0.92830130
#> 29 ci_p_wald 10 0.28 0.92836150
#> 30 ci_p_wald 10 0.29 0.79409375
#> 31 ci_p_wald 10 0.30 0.84009958
#> 32 ci_p_wald 10 0.31 0.85277291
#> 33 ci_p_wald 10 0.32 0.86387911
#> 34 ci_p_wald 10 0.33 0.87344111
#> 35 ci_p_wald 10 0.34 0.88148133
#> 36 ci_p_wald 10 0.35 0.88802128
#> 37 ci_p_wald 10 0.36 0.89308130
#> 38 ci_p_wald 10 0.37 0.89668036
#> 39 ci_p_wald 10 0.38 0.89883602
#> 40 ci_p_wald 10 0.39 0.89956448
#> 41 ci_p_wald 10 0.40 0.89888072
#> 42 ci_p_wald 10 0.41 0.89679866
#> 43 ci_p_wald 10 0.42 0.94730870
#> 44 ci_p_wald 10 0.43 0.94889875
#> 45 ci_p_wald 10 0.44 0.94957749
#> 46 ci_p_wald 10 0.45 0.87304851
#> 47 ci_p_wald 10 0.46 0.87937543
#> 48 ci_p_wald 10 0.47 0.88429695
#> 49 ci_p_wald 10 0.48 0.88781251
#> 50 ci_p_wald 10 0.49 0.88992188
#> 51 ci_p_wald 10 0.50 0.89062500
#> 52 ci_p_wald 10 0.51 0.88992188
#> 53 ci_p_wald 10 0.52 0.88781251
#> 54 ci_p_wald 10 0.53 0.88429695
#> 55 ci_p_wald 10 0.54 0.87937543
#> 56 ci_p_wald 10 0.55 0.87304851
#> 57 ci_p_wald 10 0.56 0.94957749
#> 58 ci_p_wald 10 0.57 0.94889875
#> 59 ci_p_wald 10 0.58 0.94730870
#> 60 ci_p_wald 10 0.59 0.89679866
#> 61 ci_p_wald 10 0.60 0.89888072
#> 62 ci_p_wald 10 0.61 0.89956448
#> 63 ci_p_wald 10 0.62 0.89883602
#> 64 ci_p_wald 10 0.63 0.89668036
#> 65 ci_p_wald 10 0.64 0.89308130
#> 66 ci_p_wald 10 0.65 0.88802128
#> 67 ci_p_wald 10 0.66 0.88148133
#> 68 ci_p_wald 10 0.67 0.87344111
#> 69 ci_p_wald 10 0.68 0.86387911
#> 70 ci_p_wald 10 0.69 0.85277291
#> 71 ci_p_wald 10 0.70 0.84009958
#> 72 ci_p_wald 10 0.71 0.79409375
#> 73 ci_p_wald 10 0.72 0.92836150
#> 74 ci_p_wald 10 0.73 0.92830130
#> 75 ci_p_wald 10 0.74 0.92684531
#> 76 ci_p_wald 10 0.75 0.92395878
#> 77 ci_p_wald 10 0.76 0.91959949
#> 78 ci_p_wald 10 0.77 0.91371646
#> 79 ci_p_wald 10 0.78 0.90624867
#> 80 ci_p_wald 10 0.79 0.89712371
#> 81 ci_p_wald 10 0.80 0.88625644
#> 82 ci_p_wald 10 0.81 0.85179089
#> 83 ci_p_wald 10 0.82 0.84122902
#> 84 ci_p_wald 10 0.83 0.82803575
#> 85 ci_p_wald 10 0.84 0.81208863
#> 86 ci_p_wald 10 0.85 0.79325150
#> 87 ci_p_wald 10 0.86 0.77137216
#> 88 ci_p_wald 10 0.87 0.74627991
#> 89 ci_p_wald 10 0.88 0.71778296
#> 90 ci_p_wald 10 0.89 0.68566583
#> 91 ci_p_wald 10 0.90 0.64968662
#> 92 ci_p_wald 10 0.91 0.60175012
#> 93 ci_p_wald 10 0.92 0.55981022
#> 94 ci_p_wald 10 0.93 0.51244155
#> 95 ci_p_wald 10 0.94 0.45935559
#> 96 ci_p_wald 10 0.95 0.40023456
#> 97 ci_p_wald 10 0.96 0.33472476
#> 98 ci_p_wald 10 0.97 0.26242879
#> 99 ci_p_wald 10 0.98 0.18289669
#> 100 ci_p_wald 10 0.99 0.09550408
#> 101 ci_p_wald 10 1.00 1.00000000
ci_p_coverage_plot(n=10,
intervalType="clopper_pearson",
conf.level=0.95,
ylim=c(0.9, 1), las=1)
#> Method n p coverage
#> 1 ci_p_clopper_pearson 10 0.00 1.0000000
#> 2 ci_p_clopper_pearson 10 0.01 0.9957338
#> 3 ci_p_clopper_pearson 10 0.02 0.9838224
#> 4 ci_p_clopper_pearson 10 0.03 0.9972351
#> 5 ci_p_clopper_pearson 10 0.04 0.9937863
#> 6 ci_p_clopper_pearson 10 0.05 0.9884964
#> 7 ci_p_clopper_pearson 10 0.06 0.9811622
#> 8 ci_p_clopper_pearson 10 0.07 0.9964239
#> 9 ci_p_clopper_pearson 10 0.08 0.9941987
#> 10 ci_p_clopper_pearson 10 0.09 0.9911662
#> 11 ci_p_clopper_pearson 10 0.10 0.9872048
#> 12 ci_p_clopper_pearson 10 0.11 0.9822028
#> 13 ci_p_clopper_pearson 10 0.12 0.9760612
#> 14 ci_p_clopper_pearson 10 0.13 0.9947033
#> 15 ci_p_clopper_pearson 10 0.14 0.9926737
#> 16 ci_p_clopper_pearson 10 0.15 0.9901259
#> 17 ci_p_clopper_pearson 10 0.16 0.9869899
#> 18 ci_p_clopper_pearson 10 0.17 0.9831962
#> 19 ci_p_clopper_pearson 10 0.18 0.9786771
#> 20 ci_p_clopper_pearson 10 0.19 0.9951243
#> 21 ci_p_clopper_pearson 10 0.20 0.9936306
#> 22 ci_p_clopper_pearson 10 0.21 0.9918065
#> 23 ci_p_clopper_pearson 10 0.22 0.9896064
#> 24 ci_p_clopper_pearson 10 0.23 0.9869833
#> 25 ci_p_clopper_pearson 10 0.24 0.9838884
#> 26 ci_p_clopper_pearson 10 0.25 0.9802723
#> 27 ci_p_clopper_pearson 10 0.26 0.9760852
#> 28 ci_p_clopper_pearson 10 0.27 0.9943819
#> 29 ci_p_clopper_pearson 10 0.28 0.9929961
#> 30 ci_p_clopper_pearson 10 0.29 0.9913493
#> 31 ci_p_clopper_pearson 10 0.30 0.9894079
#> 32 ci_p_clopper_pearson 10 0.31 0.9626744
#> 33 ci_p_clopper_pearson 10 0.32 0.9633578
#> 34 ci_p_clopper_pearson 10 0.33 0.9632227
#> 35 ci_p_clopper_pearson 10 0.34 0.9622744
#> 36 ci_p_clopper_pearson 10 0.35 0.9817160
#> 37 ci_p_clopper_pearson 10 0.36 0.9825844
#> 38 ci_p_clopper_pearson 10 0.37 0.9830104
#> 39 ci_p_clopper_pearson 10 0.38 0.9829991
#> 40 ci_p_clopper_pearson 10 0.39 0.9825503
#> 41 ci_p_clopper_pearson 10 0.40 0.9816588
#> 42 ci_p_clopper_pearson 10 0.41 0.9803151
#> 43 ci_p_clopper_pearson 10 0.42 0.9785049
#> 44 ci_p_clopper_pearson 10 0.43 0.9762100
#> 45 ci_p_clopper_pearson 10 0.44 0.9734086
#> 46 ci_p_clopper_pearson 10 0.45 0.9722406
#> 47 ci_p_clopper_pearson 10 0.46 0.9745278
#> 48 ci_p_clopper_pearson 10 0.47 0.9762849
#> 49 ci_p_clopper_pearson 10 0.48 0.9775281
#> 50 ci_p_clopper_pearson 10 0.49 0.9782693
#> 51 ci_p_clopper_pearson 10 0.50 0.9785156
#> 52 ci_p_clopper_pearson 10 0.51 0.9782693
#> 53 ci_p_clopper_pearson 10 0.52 0.9775281
#> 54 ci_p_clopper_pearson 10 0.53 0.9762849
#> 55 ci_p_clopper_pearson 10 0.54 0.9745278
#> 56 ci_p_clopper_pearson 10 0.55 0.9722406
#> 57 ci_p_clopper_pearson 10 0.56 0.9734086
#> 58 ci_p_clopper_pearson 10 0.57 0.9762100
#> 59 ci_p_clopper_pearson 10 0.58 0.9785049
#> 60 ci_p_clopper_pearson 10 0.59 0.9803151
#> 61 ci_p_clopper_pearson 10 0.60 0.9816588
#> 62 ci_p_clopper_pearson 10 0.61 0.9825503
#> 63 ci_p_clopper_pearson 10 0.62 0.9829991
#> 64 ci_p_clopper_pearson 10 0.63 0.9830104
#> 65 ci_p_clopper_pearson 10 0.64 0.9825844
#> 66 ci_p_clopper_pearson 10 0.65 0.9817160
#> 67 ci_p_clopper_pearson 10 0.66 0.9622744
#> 68 ci_p_clopper_pearson 10 0.67 0.9632227
#> 69 ci_p_clopper_pearson 10 0.68 0.9633578
#> 70 ci_p_clopper_pearson 10 0.69 0.9626744
#> 71 ci_p_clopper_pearson 10 0.70 0.9894079
#> 72 ci_p_clopper_pearson 10 0.71 0.9913493
#> 73 ci_p_clopper_pearson 10 0.72 0.9929961
#> 74 ci_p_clopper_pearson 10 0.73 0.9943819
#> 75 ci_p_clopper_pearson 10 0.74 0.9760852
#> 76 ci_p_clopper_pearson 10 0.75 0.9802723
#> 77 ci_p_clopper_pearson 10 0.76 0.9838884
#> 78 ci_p_clopper_pearson 10 0.77 0.9869833
#> 79 ci_p_clopper_pearson 10 0.78 0.9896064
#> 80 ci_p_clopper_pearson 10 0.79 0.9918065
#> 81 ci_p_clopper_pearson 10 0.80 0.9936306
#> 82 ci_p_clopper_pearson 10 0.81 0.9951243
#> 83 ci_p_clopper_pearson 10 0.82 0.9786771
#> 84 ci_p_clopper_pearson 10 0.83 0.9831962
#> 85 ci_p_clopper_pearson 10 0.84 0.9869899
#> 86 ci_p_clopper_pearson 10 0.85 0.9901259
#> 87 ci_p_clopper_pearson 10 0.86 0.9926737
#> 88 ci_p_clopper_pearson 10 0.87 0.9947033
#> 89 ci_p_clopper_pearson 10 0.88 0.9760612
#> 90 ci_p_clopper_pearson 10 0.89 0.9822028
#> 91 ci_p_clopper_pearson 10 0.90 0.9872048
#> 92 ci_p_clopper_pearson 10 0.91 0.9911662
#> 93 ci_p_clopper_pearson 10 0.92 0.9941987
#> 94 ci_p_clopper_pearson 10 0.93 0.9964239
#> 95 ci_p_clopper_pearson 10 0.94 0.9811622
#> 96 ci_p_clopper_pearson 10 0.95 0.9884964
#> 97 ci_p_clopper_pearson 10 0.96 0.9937863
#> 98 ci_p_clopper_pearson 10 0.97 0.9972351
#> 99 ci_p_clopper_pearson 10 0.98 0.9838224
#> 100 ci_p_clopper_pearson 10 0.99 0.9957338
#> 101 ci_p_clopper_pearson 10 1.00 1.0000000
ci_p_coverage_plot(n=10,
intervalType="wilson",
conf.level=0.95,
ylim=c(0.9, 1), las=1)
#> Method n p coverage
#> 1 ci_p_wilson 10 0.00 1.0000000
#> 2 ci_p_wilson 10 0.01 0.9043821
#> 3 ci_p_wilson 10 0.02 0.9838224
#> 4 ci_p_wilson 10 0.03 0.9654934
#> 5 ci_p_wilson 10 0.04 0.9418462
#> 6 ci_p_wilson 10 0.05 0.9138616
#> 7 ci_p_wilson 10 0.06 0.9811622
#> 8 ci_p_wilson 10 0.07 0.9716579
#> 9 ci_p_wilson 10 0.08 0.9599246
#> 10 ci_p_wilson 10 0.09 0.9459600
#> 11 ci_p_wilson 10 0.10 0.9298092
#> 12 ci_p_wilson 10 0.11 0.9822028
#> 13 ci_p_wilson 10 0.12 0.9760612
#> 14 ci_p_wilson 10 0.13 0.9686952
#> 15 ci_p_wilson 10 0.14 0.9600358
#> 16 ci_p_wilson 10 0.15 0.9500302
#> 17 ci_p_wilson 10 0.16 0.9386423
#> 18 ci_p_wilson 10 0.17 0.9831962
#> 19 ci_p_wilson 10 0.18 0.9786771
#> 20 ci_p_wilson 10 0.19 0.9733675
#> 21 ci_p_wilson 10 0.20 0.9672065
#> 22 ci_p_wilson 10 0.21 0.9601376
#> 23 ci_p_wilson 10 0.22 0.9521103
#> 24 ci_p_wilson 10 0.23 0.9430804
#> 25 ci_p_wilson 10 0.24 0.9838884
#> 26 ci_p_wilson 10 0.25 0.9802723
#> 27 ci_p_wilson 10 0.26 0.9760852
#> 28 ci_p_wilson 10 0.27 0.9712776
#> 29 ci_p_wilson 10 0.28 0.9283615
#> 30 ci_p_wilson 10 0.29 0.9270544
#> 31 ci_p_wilson 10 0.30 0.9244035
#> 32 ci_p_wilson 10 0.31 0.9204284
#> 33 ci_p_wilson 10 0.32 0.9633578
#> 34 ci_p_wilson 10 0.33 0.9632227
#> 35 ci_p_wilson 10 0.34 0.9622744
#> 36 ci_p_wilson 10 0.35 0.9605130
#> 37 ci_p_wilson 10 0.36 0.9579331
#> 38 ci_p_wilson 10 0.37 0.9545255
#> 39 ci_p_wilson 10 0.38 0.9502769
#> 40 ci_p_wilson 10 0.39 0.9451717
#> 41 ci_p_wilson 10 0.40 0.9816588
#> 42 ci_p_wilson 10 0.41 0.9447968
#> 43 ci_p_wilson 10 0.42 0.9473087
#> 44 ci_p_wilson 10 0.43 0.9488988
#> 45 ci_p_wilson 10 0.44 0.9495775
#> 46 ci_p_wilson 10 0.45 0.9493511
#> 47 ci_p_wilson 10 0.46 0.9482214
#> 48 ci_p_wilson 10 0.47 0.9461862
#> 49 ci_p_wilson 10 0.48 0.9432396
#> 50 ci_p_wilson 10 0.49 0.9393719
#> 51 ci_p_wilson 10 0.50 0.9785156
#> 52 ci_p_wilson 10 0.51 0.9393719
#> 53 ci_p_wilson 10 0.52 0.9432396
#> 54 ci_p_wilson 10 0.53 0.9461862
#> 55 ci_p_wilson 10 0.54 0.9482214
#> 56 ci_p_wilson 10 0.55 0.9493511
#> 57 ci_p_wilson 10 0.56 0.9495775
#> 58 ci_p_wilson 10 0.57 0.9488988
#> 59 ci_p_wilson 10 0.58 0.9473087
#> 60 ci_p_wilson 10 0.59 0.9447968
#> 61 ci_p_wilson 10 0.60 0.9816588
#> 62 ci_p_wilson 10 0.61 0.9451717
#> 63 ci_p_wilson 10 0.62 0.9502769
#> 64 ci_p_wilson 10 0.63 0.9545255
#> 65 ci_p_wilson 10 0.64 0.9579331
#> 66 ci_p_wilson 10 0.65 0.9605130
#> 67 ci_p_wilson 10 0.66 0.9622744
#> 68 ci_p_wilson 10 0.67 0.9632227
#> 69 ci_p_wilson 10 0.68 0.9633578
#> 70 ci_p_wilson 10 0.69 0.9204284
#> 71 ci_p_wilson 10 0.70 0.9244035
#> 72 ci_p_wilson 10 0.71 0.9270544
#> 73 ci_p_wilson 10 0.72 0.9283615
#> 74 ci_p_wilson 10 0.73 0.9712776
#> 75 ci_p_wilson 10 0.74 0.9760852
#> 76 ci_p_wilson 10 0.75 0.9802723
#> 77 ci_p_wilson 10 0.76 0.9838884
#> 78 ci_p_wilson 10 0.77 0.9430804
#> 79 ci_p_wilson 10 0.78 0.9521103
#> 80 ci_p_wilson 10 0.79 0.9601376
#> 81 ci_p_wilson 10 0.80 0.9672065
#> 82 ci_p_wilson 10 0.81 0.9733675
#> 83 ci_p_wilson 10 0.82 0.9786771
#> 84 ci_p_wilson 10 0.83 0.9831962
#> 85 ci_p_wilson 10 0.84 0.9386423
#> 86 ci_p_wilson 10 0.85 0.9500302
#> 87 ci_p_wilson 10 0.86 0.9600358
#> 88 ci_p_wilson 10 0.87 0.9686952
#> 89 ci_p_wilson 10 0.88 0.9760612
#> 90 ci_p_wilson 10 0.89 0.9822028
#> 91 ci_p_wilson 10 0.90 0.9298092
#> 92 ci_p_wilson 10 0.91 0.9459600
#> 93 ci_p_wilson 10 0.92 0.9599246
#> 94 ci_p_wilson 10 0.93 0.9716579
#> 95 ci_p_wilson 10 0.94 0.9811622
#> 96 ci_p_wilson 10 0.95 0.9138616
#> 97 ci_p_wilson 10 0.96 0.9418462
#> 98 ci_p_wilson 10 0.97 0.9654934
#> 99 ci_p_wilson 10 0.98 0.9838224
#> 100 ci_p_wilson 10 0.99 0.9043821
#> 101 ci_p_wilson 10 1.00 0.0000000
ci_p_coverage_plot(n=10,
intervalType="jeffreys",
conf.level=0.95,
ylim=c(0.9, 1), las=1)
#> Method n p coverage
#> 1 ci_p_jeffreys 10 0.00 0.0000000
#> 2 ci_p_jeffreys 10 0.01 0.9043821
#> 3 ci_p_jeffreys 10 0.02 0.9838224
#> 4 ci_p_jeffreys 10 0.03 0.9654934
#> 5 ci_p_jeffreys 10 0.04 0.9418462
#> 6 ci_p_jeffreys 10 0.05 0.9884964
#> 7 ci_p_jeffreys 10 0.06 0.9811622
#> 8 ci_p_jeffreys 10 0.07 0.9716579
#> 9 ci_p_jeffreys 10 0.08 0.9599246
#> 10 ci_p_jeffreys 10 0.09 0.9459600
#> 11 ci_p_jeffreys 10 0.10 0.9872048
#> 12 ci_p_jeffreys 10 0.11 0.9822028
#> 13 ci_p_jeffreys 10 0.12 0.9760612
#> 14 ci_p_jeffreys 10 0.13 0.9686952
#> 15 ci_p_jeffreys 10 0.14 0.9600358
#> 16 ci_p_jeffreys 10 0.15 0.9500302
#> 17 ci_p_jeffreys 10 0.16 0.9869899
#> 18 ci_p_jeffreys 10 0.17 0.9831962
#> 19 ci_p_jeffreys 10 0.18 0.9786771
#> 20 ci_p_jeffreys 10 0.19 0.9733675
#> 21 ci_p_jeffreys 10 0.20 0.9672065
#> 22 ci_p_jeffreys 10 0.21 0.9601376
#> 23 ci_p_jeffreys 10 0.22 0.8687525
#> 24 ci_p_jeffreys 10 0.23 0.9137165
#> 25 ci_p_jeffreys 10 0.24 0.9195995
#> 26 ci_p_jeffreys 10 0.25 0.9239588
#> 27 ci_p_jeffreys 10 0.26 0.9268453
#> 28 ci_p_jeffreys 10 0.27 0.9283013
#> 29 ci_p_jeffreys 10 0.28 0.9283615
#> 30 ci_p_jeffreys 10 0.29 0.9270544
#> 31 ci_p_jeffreys 10 0.30 0.9244035
#> 32 ci_p_jeffreys 10 0.31 0.9626744
#> 33 ci_p_jeffreys 10 0.32 0.9633578
#> 34 ci_p_jeffreys 10 0.33 0.9632227
#> 35 ci_p_jeffreys 10 0.34 0.9622744
#> 36 ci_p_jeffreys 10 0.35 0.9605130
#> 37 ci_p_jeffreys 10 0.36 0.9579331
#> 38 ci_p_jeffreys 10 0.37 0.9545255
#> 39 ci_p_jeffreys 10 0.38 0.9502769
#> 40 ci_p_jeffreys 10 0.39 0.8995645
#> 41 ci_p_jeffreys 10 0.40 0.9413480
#> 42 ci_p_jeffreys 10 0.41 0.9447968
#> 43 ci_p_jeffreys 10 0.42 0.9473087
#> 44 ci_p_jeffreys 10 0.43 0.9488988
#> 45 ci_p_jeffreys 10 0.44 0.9495775
#> 46 ci_p_jeffreys 10 0.45 0.9493511
#> 47 ci_p_jeffreys 10 0.46 0.9482214
#> 48 ci_p_jeffreys 10 0.47 0.9461862
#> 49 ci_p_jeffreys 10 0.48 0.9432396
#> 50 ci_p_jeffreys 10 0.49 0.9393719
#> 51 ci_p_jeffreys 10 0.50 0.9785156
#> 52 ci_p_jeffreys 10 0.51 0.9393719
#> 53 ci_p_jeffreys 10 0.52 0.9432396
#> 54 ci_p_jeffreys 10 0.53 0.9461862
#> 55 ci_p_jeffreys 10 0.54 0.9482214
#> 56 ci_p_jeffreys 10 0.55 0.9493511
#> 57 ci_p_jeffreys 10 0.56 0.9495775
#> 58 ci_p_jeffreys 10 0.57 0.9488988
#> 59 ci_p_jeffreys 10 0.58 0.9473087
#> 60 ci_p_jeffreys 10 0.59 0.9447968
#> 61 ci_p_jeffreys 10 0.60 0.9413480
#> 62 ci_p_jeffreys 10 0.61 0.8995645
#> 63 ci_p_jeffreys 10 0.62 0.9502769
#> 64 ci_p_jeffreys 10 0.63 0.9545255
#> 65 ci_p_jeffreys 10 0.64 0.9579331
#> 66 ci_p_jeffreys 10 0.65 0.9605130
#> 67 ci_p_jeffreys 10 0.66 0.9622744
#> 68 ci_p_jeffreys 10 0.67 0.9632227
#> 69 ci_p_jeffreys 10 0.68 0.9633578
#> 70 ci_p_jeffreys 10 0.69 0.9626744
#> 71 ci_p_jeffreys 10 0.70 0.9244035
#> 72 ci_p_jeffreys 10 0.71 0.9270544
#> 73 ci_p_jeffreys 10 0.72 0.9283615
#> 74 ci_p_jeffreys 10 0.73 0.9283013
#> 75 ci_p_jeffreys 10 0.74 0.9268453
#> 76 ci_p_jeffreys 10 0.75 0.9239588
#> 77 ci_p_jeffreys 10 0.76 0.9195995
#> 78 ci_p_jeffreys 10 0.77 0.9137165
#> 79 ci_p_jeffreys 10 0.78 0.8687525
#> 80 ci_p_jeffreys 10 0.79 0.9601376
#> 81 ci_p_jeffreys 10 0.80 0.9672065
#> 82 ci_p_jeffreys 10 0.81 0.9733675
#> 83 ci_p_jeffreys 10 0.82 0.9786771
#> 84 ci_p_jeffreys 10 0.83 0.9831962
#> 85 ci_p_jeffreys 10 0.84 0.9869899
#> 86 ci_p_jeffreys 10 0.85 0.9500302
#> 87 ci_p_jeffreys 10 0.86 0.9600358
#> 88 ci_p_jeffreys 10 0.87 0.9686952
#> 89 ci_p_jeffreys 10 0.88 0.9760612
#> 90 ci_p_jeffreys 10 0.89 0.9822028
#> 91 ci_p_jeffreys 10 0.90 0.9872048
#> 92 ci_p_jeffreys 10 0.91 0.9459600
#> 93 ci_p_jeffreys 10 0.92 0.9599246
#> 94 ci_p_jeffreys 10 0.93 0.9716579
#> 95 ci_p_jeffreys 10 0.94 0.9811622
#> 96 ci_p_jeffreys 10 0.95 0.9884964
#> 97 ci_p_jeffreys 10 0.96 0.9418462
#> 98 ci_p_jeffreys 10 0.97 0.9654934
#> 99 ci_p_jeffreys 10 0.98 0.9838224
#> 100 ci_p_jeffreys 10 0.99 0.9043821
#> 101 ci_p_jeffreys 10 1.00 0.0000000
ci_p_coverage_plot(n=10,
intervalType="agresti_coull",
conf.level=0.95,
ylim=c(0.9, 1), las=1)
#> Method n p coverage
#> 1 ci_p_agresti_coull 10 0.00 1.0000000
#> 2 ci_p_agresti_coull 10 0.01 0.9957338
#> 3 ci_p_agresti_coull 10 0.02 0.9838224
#> 4 ci_p_agresti_coull 10 0.03 0.9654934
#> 5 ci_p_agresti_coull 10 0.04 0.9418462
#> 6 ci_p_agresti_coull 10 0.05 0.9884964
#> 7 ci_p_agresti_coull 10 0.06 0.9811622
#> 8 ci_p_agresti_coull 10 0.07 0.9716579
#> 9 ci_p_agresti_coull 10 0.08 0.9599246
#> 10 ci_p_agresti_coull 10 0.09 0.9459600
#> 11 ci_p_agresti_coull 10 0.10 0.9298092
#> 12 ci_p_agresti_coull 10 0.11 0.9822028
#> 13 ci_p_agresti_coull 10 0.12 0.9760612
#> 14 ci_p_agresti_coull 10 0.13 0.9686952
#> 15 ci_p_agresti_coull 10 0.14 0.9600358
#> 16 ci_p_agresti_coull 10 0.15 0.9500302
#> 17 ci_p_agresti_coull 10 0.16 0.9386423
#> 18 ci_p_agresti_coull 10 0.17 0.9831962
#> 19 ci_p_agresti_coull 10 0.18 0.9786771
#> 20 ci_p_agresti_coull 10 0.19 0.9733675
#> 21 ci_p_agresti_coull 10 0.20 0.9672065
#> 22 ci_p_agresti_coull 10 0.21 0.9601376
#> 23 ci_p_agresti_coull 10 0.22 0.9521103
#> 24 ci_p_agresti_coull 10 0.23 0.9430804
#> 25 ci_p_agresti_coull 10 0.24 0.9838884
#> 26 ci_p_agresti_coull 10 0.25 0.9802723
#> 27 ci_p_agresti_coull 10 0.26 0.9760852
#> 28 ci_p_agresti_coull 10 0.27 0.9712776
#> 29 ci_p_agresti_coull 10 0.28 0.9658006
#> 30 ci_p_agresti_coull 10 0.29 0.9596068
#> 31 ci_p_agresti_coull 10 0.30 0.9526510
#> 32 ci_p_agresti_coull 10 0.31 0.9448903
#> 33 ci_p_agresti_coull 10 0.32 0.9844971
#> 34 ci_p_agresti_coull 10 0.33 0.9632227
#> 35 ci_p_agresti_coull 10 0.34 0.9622744
#> 36 ci_p_agresti_coull 10 0.35 0.9605130
#> 37 ci_p_agresti_coull 10 0.36 0.9579331
#> 38 ci_p_agresti_coull 10 0.37 0.9545255
#> 39 ci_p_agresti_coull 10 0.38 0.9502769
#> 40 ci_p_agresti_coull 10 0.39 0.9451717
#> 41 ci_p_agresti_coull 10 0.40 0.9816588
#> 42 ci_p_agresti_coull 10 0.41 0.9803151
#> 43 ci_p_agresti_coull 10 0.42 0.9785049
#> 44 ci_p_agresti_coull 10 0.43 0.9488988
#> 45 ci_p_agresti_coull 10 0.44 0.9495775
#> 46 ci_p_agresti_coull 10 0.45 0.9493511
#> 47 ci_p_agresti_coull 10 0.46 0.9482214
#> 48 ci_p_agresti_coull 10 0.47 0.9461862
#> 49 ci_p_agresti_coull 10 0.48 0.9775281
#> 50 ci_p_agresti_coull 10 0.49 0.9782693
#> 51 ci_p_agresti_coull 10 0.50 0.9785156
#> 52 ci_p_agresti_coull 10 0.51 0.9782693
#> 53 ci_p_agresti_coull 10 0.52 0.9775281
#> 54 ci_p_agresti_coull 10 0.53 0.9461862
#> 55 ci_p_agresti_coull 10 0.54 0.9482214
#> 56 ci_p_agresti_coull 10 0.55 0.9493511
#> 57 ci_p_agresti_coull 10 0.56 0.9495775
#> 58 ci_p_agresti_coull 10 0.57 0.9488988
#> 59 ci_p_agresti_coull 10 0.58 0.9785049
#> 60 ci_p_agresti_coull 10 0.59 0.9803151
#> 61 ci_p_agresti_coull 10 0.60 0.9816588
#> 62 ci_p_agresti_coull 10 0.61 0.9451717
#> 63 ci_p_agresti_coull 10 0.62 0.9502769
#> 64 ci_p_agresti_coull 10 0.63 0.9545255
#> 65 ci_p_agresti_coull 10 0.64 0.9579331
#> 66 ci_p_agresti_coull 10 0.65 0.9605130
#> 67 ci_p_agresti_coull 10 0.66 0.9622744
#> 68 ci_p_agresti_coull 10 0.67 0.9632227
#> 69 ci_p_agresti_coull 10 0.68 0.9844971
#> 70 ci_p_agresti_coull 10 0.69 0.9448903
#> 71 ci_p_agresti_coull 10 0.70 0.9526510
#> 72 ci_p_agresti_coull 10 0.71 0.9596068
#> 73 ci_p_agresti_coull 10 0.72 0.9658006
#> 74 ci_p_agresti_coull 10 0.73 0.9712776
#> 75 ci_p_agresti_coull 10 0.74 0.9760852
#> 76 ci_p_agresti_coull 10 0.75 0.9802723
#> 77 ci_p_agresti_coull 10 0.76 0.9838884
#> 78 ci_p_agresti_coull 10 0.77 0.9430804
#> 79 ci_p_agresti_coull 10 0.78 0.9521103
#> 80 ci_p_agresti_coull 10 0.79 0.9601376
#> 81 ci_p_agresti_coull 10 0.80 0.9672065
#> 82 ci_p_agresti_coull 10 0.81 0.9733675
#> 83 ci_p_agresti_coull 10 0.82 0.9786771
#> 84 ci_p_agresti_coull 10 0.83 0.9831962
#> 85 ci_p_agresti_coull 10 0.84 0.9386423
#> 86 ci_p_agresti_coull 10 0.85 0.9500302
#> 87 ci_p_agresti_coull 10 0.86 0.9600358
#> 88 ci_p_agresti_coull 10 0.87 0.9686952
#> 89 ci_p_agresti_coull 10 0.88 0.9760612
#> 90 ci_p_agresti_coull 10 0.89 0.9822028
#> 91 ci_p_agresti_coull 10 0.90 0.9298092
#> 92 ci_p_agresti_coull 10 0.91 0.9459600
#> 93 ci_p_agresti_coull 10 0.92 0.9599246
#> 94 ci_p_agresti_coull 10 0.93 0.9716579
#> 95 ci_p_agresti_coull 10 0.94 0.9811622
#> 96 ci_p_agresti_coull 10 0.95 0.9884964
#> 97 ci_p_agresti_coull 10 0.96 0.9418462
#> 98 ci_p_agresti_coull 10 0.97 0.9654934
#> 99 ci_p_agresti_coull 10 0.98 0.9838224
#> 100 ci_p_agresti_coull 10 0.99 0.9957338
#> 101 ci_p_agresti_coull 10 1.00 1.0000000
ci_p_coverage_plot(n=10,
intervalType="arcsine",
conf.level=0.95,
ylim=c(0.9, 1), las=1)
#> Method n p coverage
#> 1 ci_p_arcsine 10 0.00 1.0000000
#> 2 ci_p_arcsine 10 0.01 0.9957338
#> 3 ci_p_arcsine 10 0.02 0.9838224
#> 4 ci_p_arcsine 10 0.03 0.9972351
#> 5 ci_p_arcsine 10 0.04 0.9937863
#> 6 ci_p_arcsine 10 0.05 0.9884964
#> 7 ci_p_arcsine 10 0.06 0.9811622
#> 8 ci_p_arcsine 10 0.07 0.9716579
#> 9 ci_p_arcsine 10 0.08 0.9941987
#> 10 ci_p_arcsine 10 0.09 0.9911662
#> 11 ci_p_arcsine 10 0.10 0.6385264
#> 12 ci_p_arcsine 10 0.11 0.6703856
#> 13 ci_p_arcsine 10 0.12 0.6975602
#> 14 ci_p_arcsine 10 0.13 0.7202718
#> 15 ci_p_arcsine 10 0.14 0.7713722
#> 16 ci_p_arcsine 10 0.15 0.7932515
#> 17 ci_p_arcsine 10 0.16 0.8120886
#> 18 ci_p_arcsine 10 0.17 0.8280358
#> 19 ci_p_arcsine 10 0.18 0.8412290
#> 20 ci_p_arcsine 10 0.19 0.8517909
#> 21 ci_p_arcsine 10 0.20 0.8598323
#> 22 ci_p_arcsine 10 0.21 0.8971237
#> 23 ci_p_arcsine 10 0.22 0.9062487
#> 24 ci_p_arcsine 10 0.23 0.9137165
#> 25 ci_p_arcsine 10 0.24 0.9195995
#> 26 ci_p_arcsine 10 0.25 0.9239588
#> 27 ci_p_arcsine 10 0.26 0.9268453
#> 28 ci_p_arcsine 10 0.27 0.9283013
#> 29 ci_p_arcsine 10 0.28 0.9283615
#> 30 ci_p_arcsine 10 0.29 0.9270544
#> 31 ci_p_arcsine 10 0.30 0.9611604
#> 32 ci_p_arcsine 10 0.31 0.9626744
#> 33 ci_p_arcsine 10 0.32 0.9633578
#> 34 ci_p_arcsine 10 0.33 0.9632227
#> 35 ci_p_arcsine 10 0.34 0.9622744
#> 36 ci_p_arcsine 10 0.35 0.8880213
#> 37 ci_p_arcsine 10 0.36 0.8930813
#> 38 ci_p_arcsine 10 0.37 0.8966804
#> 39 ci_p_arcsine 10 0.38 0.8988360
#> 40 ci_p_arcsine 10 0.39 0.8995645
#> 41 ci_p_arcsine 10 0.40 0.9413480
#> 42 ci_p_arcsine 10 0.41 0.9447968
#> 43 ci_p_arcsine 10 0.42 0.9473087
#> 44 ci_p_arcsine 10 0.43 0.9488988
#> 45 ci_p_arcsine 10 0.44 0.9495775
#> 46 ci_p_arcsine 10 0.45 0.9493511
#> 47 ci_p_arcsine 10 0.46 0.9482214
#> 48 ci_p_arcsine 10 0.47 0.9461862
#> 49 ci_p_arcsine 10 0.48 0.9432396
#> 50 ci_p_arcsine 10 0.49 0.8899219
#> 51 ci_p_arcsine 10 0.50 0.8906250
#> 52 ci_p_arcsine 10 0.51 0.8899219
#> 53 ci_p_arcsine 10 0.52 0.9432396
#> 54 ci_p_arcsine 10 0.53 0.9461862
#> 55 ci_p_arcsine 10 0.54 0.9482214
#> 56 ci_p_arcsine 10 0.55 0.9493511
#> 57 ci_p_arcsine 10 0.56 0.9495775
#> 58 ci_p_arcsine 10 0.57 0.9488988
#> 59 ci_p_arcsine 10 0.58 0.9473087
#> 60 ci_p_arcsine 10 0.59 0.9447968
#> 61 ci_p_arcsine 10 0.60 0.9413480
#> 62 ci_p_arcsine 10 0.61 0.8995645
#> 63 ci_p_arcsine 10 0.62 0.8988360
#> 64 ci_p_arcsine 10 0.63 0.8966804
#> 65 ci_p_arcsine 10 0.64 0.8930813
#> 66 ci_p_arcsine 10 0.65 0.8880213
#> 67 ci_p_arcsine 10 0.66 0.9622744
#> 68 ci_p_arcsine 10 0.67 0.9632227
#> 69 ci_p_arcsine 10 0.68 0.9633578
#> 70 ci_p_arcsine 10 0.69 0.9626744
#> 71 ci_p_arcsine 10 0.70 0.9611604
#> 72 ci_p_arcsine 10 0.71 0.9270544
#> 73 ci_p_arcsine 10 0.72 0.9283615
#> 74 ci_p_arcsine 10 0.73 0.9283013
#> 75 ci_p_arcsine 10 0.74 0.9268453
#> 76 ci_p_arcsine 10 0.75 0.9239588
#> 77 ci_p_arcsine 10 0.76 0.9195995
#> 78 ci_p_arcsine 10 0.77 0.9137165
#> 79 ci_p_arcsine 10 0.78 0.9062487
#> 80 ci_p_arcsine 10 0.79 0.8971237
#> 81 ci_p_arcsine 10 0.80 0.8598323
#> 82 ci_p_arcsine 10 0.81 0.8517909
#> 83 ci_p_arcsine 10 0.82 0.8412290
#> 84 ci_p_arcsine 10 0.83 0.8280358
#> 85 ci_p_arcsine 10 0.84 0.8120886
#> 86 ci_p_arcsine 10 0.85 0.7932515
#> 87 ci_p_arcsine 10 0.86 0.7713722
#> 88 ci_p_arcsine 10 0.87 0.7202718
#> 89 ci_p_arcsine 10 0.88 0.6975602
#> 90 ci_p_arcsine 10 0.89 0.6703856
#> 91 ci_p_arcsine 10 0.90 0.6385264
#> 92 ci_p_arcsine 10 0.91 0.9911662
#> 93 ci_p_arcsine 10 0.92 0.9941987
#> 94 ci_p_arcsine 10 0.93 0.9716579
#> 95 ci_p_arcsine 10 0.94 0.9811622
#> 96 ci_p_arcsine 10 0.95 0.9884964
#> 97 ci_p_arcsine 10 0.96 0.9937863
#> 98 ci_p_arcsine 10 0.97 0.9972351
#> 99 ci_p_arcsine 10 0.98 0.9838224
#> 100 ci_p_arcsine 10 0.99 0.9957338
#> 101 ci_p_arcsine 10 1.00 1.0000000