
Extract Confidence Intervals from bbnp_density Object
confint.bbnp_density.RdExtracts confidence intervals for density estimates
Usage
# S3 method for class 'bbnp_density'
confint(object, parm = NULL, level = NULL, ...)Value
For range estimation: a matrix with columns "lower" and "upper" For point estimation: a named vector with elements "lower" and "upper"
Examples
# \donttest{
set.seed(1)
x <- runif(500) + runif(500)
fit <- bias_bound_density(x, bw = 0.1)
confint(fit)
#> lower upper
#> [1,] 0.00000000 0.1227684
#> [2,] 0.00000000 0.1227684
#> [3,] 0.00000000 0.1227684
#> [4,] 0.00000000 0.1227684
#> [5,] 0.00000000 0.1400639
#> [6,] 0.00000000 0.1549714
#> [7,] 0.00000000 0.1710650
#> [8,] 0.00000000 0.1888868
#> [9,] 0.00000000 0.2086318
#> [10,] 0.00000000 0.2303904
#> [11,] 0.00000000 0.2540918
#> [12,] 0.00000000 0.2796188
#> [13,] 0.00000000 0.3067886
#> [14,] 0.00000000 0.3354011
#> [15,] 0.00000000 0.3652693
#> [16,] 0.01564274 0.3961032
#> [17,] 0.03856372 0.4276752
#> [18,] 0.06222824 0.4596677
#> [19,] 0.08634571 0.4917557
#> [20,] 0.11066143 0.5236656
#> [21,] 0.13500829 0.5552381
#> [22,] 0.15924248 0.5863398
#> [23,] 0.18319616 0.6168024
#> [24,] 0.20675359 0.6465212
#> [25,] 0.22984745 0.6754482
#> [26,] 0.25240157 0.7035202
#> [27,] 0.27443739 0.7307914
#> [28,] 0.29598154 0.7573173
#> [29,] 0.31706824 0.7831589
#> [30,] 0.33779146 0.8084467
#> [31,] 0.35819305 0.8332438
#> [32,] 0.37833537 0.8576363
#> [33,] 0.39831283 0.8817464
#> [34,] 0.41815715 0.9056190
#> [35,] 0.43778378 0.9291584
#> [36,] 0.45711001 0.9522717
#> [37,] 0.47610157 0.9749244
#> [38,] 0.49457259 0.9969014
#> [39,] 0.51238483 1.0180456
#> [40,] 0.52941783 1.0382218
#> [41,] 0.54539504 1.0571106
#> [42,] 0.56007874 1.0744398
#> [43,] 0.57323511 1.0899427
#> [44,] 0.58461671 1.1033366
#> [45,] 0.59397119 1.1143330
#> [46,] 0.60116925 1.1227872
#> [47,] 0.60605864 1.1285263
#> [48,] 0.60852054 1.1314150
#> [49,] 0.60860600 1.1315153
#> [50,] 0.60635146 1.1288699
#> [51,] 0.60175874 1.1234793
#> [52,] 0.59506364 1.1156165
#> [53,] 0.58639389 1.1054265
#> [54,] 0.57592929 1.0931147
#> [55,] 0.56398897 1.0790498
#> [56,] 0.55087345 1.0635794
#> [57,] 0.53681601 1.0469725
#> [58,] 0.52208765 1.0295440
#> [59,] 0.50703047 1.0116946
#> [60,] 0.49176551 0.9935648
#> [61,] 0.47648200 0.9753775
#> [62,] 0.46134415 0.9573272
#> [63,] 0.44633931 0.9393983
#> [64,] 0.43147727 0.9216021
#> [65,] 0.41680748 0.9039977
#> [66,] 0.40218513 0.8864107
#> [67,] 0.38754001 0.8687550
#> [68,] 0.37276424 0.8508982
#> [69,] 0.35764033 0.8325732
#> [70,] 0.34196530 0.8135275
#> [71,] 0.32564502 0.7936375
#> [72,] 0.30853448 0.7727147
#> [73,] 0.29044944 0.7505183
#> [74,] 0.27139975 0.7270407
#> [75,] 0.25130813 0.7021631
#> [76,] 0.23018106 0.6758646
#> [77,] 0.20815131 0.6482775
#> [78,] 0.18534129 0.6195180
#> [79,] 0.16186244 0.5896845
#> [80,] 0.13793780 0.5590141
#> [81,] 0.11377728 0.5277261
#> [82,] 0.08960459 0.4960565
#> [83,] 0.06574357 0.4643750
#> [84,] 0.04248449 0.4330148
#> [85,] 0.02004580 0.4022188
#> [86,] 0.00000000 0.3722933
#> [87,] 0.00000000 0.3435165
#> [88,] 0.00000000 0.3160674
#> [89,] 0.00000000 0.2902024
#> [90,] 0.00000000 0.2660730
#> [91,] 0.00000000 0.2437305
#> [92,] 0.00000000 0.2232449
#> [93,] 0.00000000 0.2046694
#> [94,] 0.00000000 0.1879515
#> [95,] 0.00000000 0.1730361
#> [96,] 0.00000000 0.1598241
#> [97,] 0.00000000 0.1480154
#> [98,] 0.00000000 0.1370993
#> [99,] 0.00000000 0.1227684
#> [100,] 0.00000000 0.1227684
# }