Skip to contents

Extracts confidence intervals for conditional expectation estimates

Usage

# S3 method for class 'bbnp_regression'
confint(object, parm = NULL, level = 0.95, ...)

Arguments

object

An object of class bbnp_regression

parm

Not used (included for S3 generic compatibility)

level

Confidence level (default: 0.95). Note: this parameter is not used as the confidence level is fixed at object creation time.

...

Additional arguments (unused)

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)
Y <- 2 * X - X^2 + rnorm(length(X), sd = 0.3)
fit <- biasBound_condExpectation(Y, X, h = 0.1)
confint(fit)
#>                lower     upper
#>   [1,] -2.0883000265 2.0556689
#>   [2,] -1.6681340686 1.7475692
#>   [3,] -1.3474126633 1.5250201
#>   [4,] -1.0955838386 1.3613155
#>   [5,] -0.8928126877 1.2393250
#>   [6,] -0.7260135464 1.1477496
#>   [7,] -0.5862570222 1.0789527
#>   [8,] -0.4673157885 1.0275073
#>   [9,] -0.3645485069 0.9895017
#>  [10,] -0.2745220353 0.9619789
#>  [11,] -0.1947598050 0.9427846
#>  [12,] -0.1233042406 0.9302849
#>  [13,] -0.0586515319 0.9232426
#>  [14,]  0.0003681468 0.9206455
#>  [15,]  0.0546896095 0.9216480
#>  [16,]  0.1050829681 0.9256296
#>  [17,]  0.1521416994 0.9320200
#>  [18,]  0.1963441928 0.9403921
#>  [19,]  0.2380796701 0.9503545
#>  [20,]  0.2776245948 0.9615892
#>  [21,]  0.3151904407 0.9738060
#>  [22,]  0.3509144109 0.9867219
#>  [23,]  0.3849315997 1.0001066
#>  [24,]  0.4173167921 1.0137412
#>  [25,]  0.4481259610 1.0274575
#>  [26,]  0.4774201010 1.0410968
#>  [27,]  0.5052354003 1.0545203
#>  [28,]  0.5315693529 1.0675858
#>  [29,]  0.5564222630 1.0801509
#>  [30,]  0.5798152111 1.0921563
#>  [31,]  0.6017514797 1.1035236
#>  [32,]  0.6222532896 1.1142204
#>  [33,]  0.6413336791 1.1242204
#>  [34,]  0.6590162221 1.1335222
#>  [35,]  0.6753240893 1.1421255
#>  [36,]  0.6903068816 1.1500567
#>  [37,]  0.7040205498 1.1573477
#>  [38,]  0.7165189206 1.1640394
#>  [39,]  0.7278597966 1.1701762
#>  [40,]  0.7381054706 1.1758129
#>  [41,]  0.7473056143 1.1809852
#>  [42,]  0.7554972281 1.1857230
#>  [43,]  0.7627259432 1.1900638
#>  [44,]  0.7690455957 1.1940630
#>  [45,]  0.7744920600 1.1977493
#>  [46,]  0.7790834594 1.2011308
#>  [47,]  0.7828289850 1.2042141
#>  [48,]  0.7857319947 1.2069943
#>  [49,]  0.7877840758 1.2094531
#>  [50,]  0.7889775581 1.2115651
#>  [51,]  0.7892830321 1.2132938
#>  [52,]  0.7886752703 1.2146071
#>  [53,]  0.7871067591 1.2154463
#>  [54,]  0.7845378040 1.2157599
#>  [55,]  0.7809160934 1.2154721
#>  [56,]  0.7761835901 1.2145190
#>  [57,]  0.7703032389 1.2128437
#>  [58,]  0.7632325945 1.2103817
#>  [59,]  0.7549283812 1.2070685
#>  [60,]  0.7453465748 1.2028321
#>  [61,]  0.7344703315 1.1976375
#>  [62,]  0.7223010880 1.1914626
#>  [63,]  0.7088602553 1.1843001
#>  [64,]  0.6941749664 1.1761666
#>  [65,]  0.6782887197 1.1670972
#>  [66,]  0.6612592367 1.1571598
#>  [67,]  0.6431406731 1.1464241
#>  [68,]  0.6240201515 1.1350078
#>  [69,]  0.6039707088 1.1230273
#>  [70,]  0.5830706870 1.1106317
#>  [71,]  0.5613995086 1.0979627
#>  [72,]  0.5390172977 1.0851818
#>  [73,]  0.5159735836 1.0724444
#>  [74,]  0.4922943794 1.0599111
#>  [75,]  0.4679952965 1.0477503
#>  [76,]  0.4430641619 1.0361399
#>  [77,]  0.4174646074 1.0252496
#>  [78,]  0.3910814331 1.0152216
#>  [79,]  0.3638240842 1.0062298
#>  [80,]  0.3355224026 0.9984571
#>  [81,]  0.3060049425 0.9920918
#>  [82,]  0.2750850893 0.9873547
#>  [83,]  0.2425054710 0.9844946
#>  [84,]  0.2079478495 0.9837793
#>  [85,]  0.1710462094 0.9855258
#>  [86,]  0.1313553883 0.9901441
#>  [87,]  0.0883385085 0.9981111
#>  [88,]  0.0413380945 1.0100210
#>  [89,] -0.0104120749 1.0266276
#>  [90,] -0.0678891006 1.0488633
#>  [91,] -0.1322545844 1.0778723
#>  [92,] -0.2050106369 1.1150903
#>  [93,] -0.2879614475 1.1624041
#>  [94,] -0.3834883405 1.2222197
#>  [95,] -0.4945551944 1.2976573
#>  [96,] -0.6251286491 1.3928315
#>  [97,] -0.7807187709 1.5132906
#>  [98,] -0.9687069156 1.6665635
#>  [99,] -1.1994096211 1.8632905
#> [100,] -1.4877811068 2.1187901
# }