
Extract Confidence Intervals from bbnp_regression Object
confint.bbnp_regression.RdExtracts confidence intervals for conditional expectation estimates
Usage
# S3 method for class 'bbnp_regression'
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)
y <- 2 * x - x^2 + rnorm(length(x), sd = 0.3)
fit <- bias_bound_regression(x, y, bw = 0.1)
#> Warning: Fitted envelope slope r-hat = 1.84 is below the smoothness floor r >= 2 the method assumes: the Fourier transform does not show a clear power-law decay over the window (likely a supersmooth density or a non-power-law/non-monotone cross-spectrum). The returned envelope dominates the fitted frequency grid, but Schennach's coverage theorem may not apply. Inspect plot(fit, type = "ft").
confint(fit)
#> lower upper
#> [1,] -Inf Inf
#> [2,] -Inf Inf
#> [3,] -Inf Inf
#> [4,] -Inf Inf
#> [5,] -7.555240881 10.499027
#> [6,] -3.231296695 5.082147
#> [7,] -1.909599316 3.464389
#> [8,] -1.260840116 2.698261
#> [9,] -0.870075531 2.258957
#> [10,] -0.605279677 1.979265
#> [11,] -0.411604441 1.789724
#> [12,] -0.261905822 1.656056
#> [13,] -0.141293441 1.559495
#> [14,] -0.066223615 1.488754
#> [15,] -0.020701834 1.436561
#> [16,] 0.022573530 1.398198
#> [17,] 0.063816504 1.370264
#> [18,] 0.103212123 1.350413
#> [19,] 0.140932329 1.336830
#> [20,] 0.177091996 1.328195
#> [21,] 0.211781131 1.323454
#> [22,] 0.245053271 1.321724
#> [23,] 0.276977624 1.322302
#> [24,] 0.307584765 1.324604
#> [25,] 0.336893268 1.328194
#> [26,] 0.364940267 1.332672
#> [27,] 0.391744221 1.337713
#> [28,] 0.417292701 1.343023
#> [29,] 0.441584569 1.348315
#> [30,] 0.464625252 1.353463
#> [31,] 0.486409919 1.358316
#> [32,] 0.506944854 1.362809
#> [33,] 0.526225562 1.366897
#> [34,] 0.544252617 1.370584
#> [35,] 0.561026299 1.373871
#> [36,] 0.576570041 1.376796
#> [37,] 0.590914215 1.379401
#> [38,] 0.604083617 1.381750
#> [39,] 0.616108091 1.383905
#> [40,] 0.627019811 1.385949
#> [41,] 0.636844636 1.387933
#> [42,] 0.645595599 1.389905
#> [43,] 0.653295721 1.391922
#> [44,] 0.659972640 1.394070
#> [45,] 0.665644581 1.396390
#> [46,] 0.670318357 1.398896
#> [47,] 0.673991931 1.401609
#> [48,] 0.676664353 1.404521
#> [49,] 0.678328036 1.407611
#> [50,] 0.678982754 1.410836
#> [51,] 0.678607231 1.414149
#> [52,] 0.677187011 1.417505
#> [53,] 0.674693472 1.420821
#> [54,] 0.671107009 1.424018
#> [55,] 0.666404584 1.426979
#> [56,] 0.660552643 1.429609
#> [57,] 0.653543563 1.431810
#> [58,] 0.645366682 1.433470
#> [59,] 0.636011340 1.434474
#> [60,] 0.625469110 1.434691
#> [61,] 0.613750738 1.434041
#> [62,] 0.600884072 1.432452
#> [63,] 0.586914544 1.429866
#> [64,] 0.571884006 1.426272
#> [65,] 0.555845919 1.421681
#> [66,] 0.538857959 1.416164
#> [67,] 0.520971769 1.409801
#> [68,] 0.502261683 1.402746
#> [69,] 0.482785935 1.395167
#> [70,] 0.462599883 1.387297
#> [71,] 0.441764590 1.379360
#> [72,] 0.420316093 1.371639
#> [73,] 0.398284383 1.364415
#> [74,] 0.375677288 1.358009
#> [75,] 0.352495952 1.352770
#> [76,] 0.328717704 1.349100
#> [77,] 0.304306748 1.347419
#> [78,] 0.279163873 1.348168
#> [79,] 0.253224114 1.351859
#> [80,] 0.226358453 1.359126
#> [81,] 0.198459706 1.370672
#> [82,] 0.169425918 1.387358
#> [83,] 0.139116511 1.410288
#> [84,] 0.107368037 1.440832
#> [85,] 0.074016705 1.480781
#> [86,] 0.038874668 1.532634
#> [87,] 0.001744337 1.599801
#> [88,] -0.037589022 1.687192
#> [89,] -0.079325127 1.802100
#> [90,] -0.171227444 1.955845
#> [91,] -0.309926274 2.166755
#> [92,] -0.496142654 2.466985
#> [93,] -0.762810436 2.918482
#> [94,] -1.182721310 3.657798
#> [95,] -1.953060224 5.055353
#> [96,] -3.865058575 8.596859
#> [97,] -17.372844303 33.906844
#> [98,] -Inf Inf
#> [99,] -Inf Inf
#> [100,] -Inf Inf
# }