
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 = 0.95, ...)Value
For range estimation: a matrix with columns "lower" and "upper" For point estimation: a named vector with elements "lower" and "upper"
Examples
# \donttest{
X <- gen_sample_data(size = 500, dgp = "2_fold_uniform", seed = 1)
fit <- biasBound_density(X, h = 0.1)
confint(fit)
#> lower upper
#> [1,] 0.0000000000 0.05833388
#> [2,] 0.0000000000 0.05833388
#> [3,] 0.0000000000 0.05833388
#> [4,] 0.0000000000 0.05833388
#> [5,] 0.0000000000 0.07562939
#> [6,] 0.0000000000 0.09053695
#> [7,] 0.0000000000 0.10663049
#> [8,] 0.0000000000 0.12445235
#> [9,] 0.0000000000 0.14419729
#> [10,] 0.0000000000 0.16595590
#> [11,] 0.0000000000 0.18965732
#> [12,] 0.0007969346 0.21518429
#> [13,] 0.0183293610 0.24235414
#> [14,] 0.0375137666 0.27096663
#> [15,] 0.0581790123 0.30083479
#> [16,] 0.0800772306 0.33166872
#> [17,] 0.1029982107 0.36324067
#> [18,] 0.1266627363 0.39523325
#> [19,] 0.1507802031 0.42732117
#> [20,] 0.1750959258 0.45923109
#> [21,] 0.1994427861 0.49080365
#> [22,] 0.2236769800 0.52190528
#> [23,] 0.2476306515 0.55236787
#> [24,] 0.2711880874 0.58208666
#> [25,] 0.2942819493 0.61101368
#> [26,] 0.3168360659 0.63908572
#> [27,] 0.3388718809 0.66635688
#> [28,] 0.3604160387 0.69288283
#> [29,] 0.3815027331 0.71872445
#> [30,] 0.4022259594 0.74401218
#> [31,] 0.4226275406 0.76880930
#> [32,] 0.4427698649 0.79320179
#> [33,] 0.4627473207 0.81731194
#> [34,] 0.4825916488 0.84118452
#> [35,] 0.5022182779 0.86472388
#> [36,] 0.5215445015 0.88783721
#> [37,] 0.5405360690 0.91048987
#> [38,] 0.5590070899 0.93246686
#> [39,] 0.5768193294 0.95361112
#> [40,] 0.5938523295 0.97378731
#> [41,] 0.6098295339 0.99267609
#> [42,] 0.6245132319 1.01000534
#> [43,] 0.6376696085 1.02550823
#> [44,] 0.6490512100 1.03890211
#> [45,] 0.6584056860 1.04989847
#> [46,] 0.6656037408 1.05835269
#> [47,] 0.6704931400 1.06409183
#> [48,] 0.6729550399 1.06698052
#> [49,] 0.6730404989 1.06708078
#> [50,] 0.6707859577 1.06443545
#> [51,] 0.6661932343 1.05904478
#> [52,] 0.6594981327 1.05118196
#> [53,] 0.6508283817 1.04099203
#> [54,] 0.6403637879 1.02868021
#> [55,] 0.6284234616 1.01461531
#> [56,] 0.6153079440 0.99914488
#> [57,] 0.6012505009 0.98253802
#> [58,] 0.5865221446 0.96510950
#> [59,] 0.5714649702 0.94726008
#> [60,] 0.5562000078 0.92913035
#> [61,] 0.5409164920 0.91094304
#> [62,] 0.5257786476 0.89289268
#> [63,] 0.5107738027 0.87496377
#> [64,] 0.4959117671 0.85716762
#> [65,] 0.4812419764 0.83956322
#> [66,] 0.4666196273 0.82197618
#> [67,] 0.4519745059 0.80432051
#> [68,] 0.4371987306 0.78646369
#> [69,] 0.4220748302 0.76813874
#> [70,] 0.4063997935 0.74909298
#> [71,] 0.3900795193 0.72920298
#> [72,] 0.3729689791 0.70828024
#> [73,] 0.3548839321 0.68608380
#> [74,] 0.3358342486 0.66260622
#> [75,] 0.3157426215 0.63772859
#> [76,] 0.2946155514 0.61143015
#> [77,] 0.2725858091 0.58384303
#> [78,] 0.2497757899 0.55508349
#> [79,] 0.2262969337 0.52525003
#> [80,] 0.2023722981 0.49457965
#> [81,] 0.1782117789 0.46329158
#> [82,] 0.1540390900 0.43162197
#> [83,] 0.1301780652 0.39994054
#> [84,] 0.1069189896 0.36858027
#> [85,] 0.0844802931 0.33778433
#> [86,] 0.0631206903 0.30785881
#> [87,] 0.0430693814 0.27908199
#> [88,] 0.0244772420 0.25163295
#> [89,] 0.0075371245 0.22576794
#> [90,] 0.0000000000 0.20163851
#> [91,] 0.0000000000 0.17929604
#> [92,] 0.0000000000 0.15881040
#> [93,] 0.0000000000 0.14023492
#> [94,] 0.0000000000 0.12351696
#> [95,] 0.0000000000 0.10860158
#> [96,] 0.0000000000 0.09538956
#> [97,] 0.0000000000 0.08358088
#> [98,] 0.0000000000 0.07266477
#> [99,] 0.0000000000 0.05833388
#> [100,] 0.0000000000 0.05833388
# }