loc_est_bw {npbr}R Documentation

Bandwidth selection for the local linear frontier estimator

Description

Computes the optimal bootstrap bandwidth proposed by Hall and Park (2004) for the local linear frontier estimator.

Usage

loc_est_bw(xtab, ytab, x, hini, B = 5, method = "u", 
 fix.seed = FALSE, control = list("tm_limit" = 700))

Arguments

xtab

a numeric vector containing the observed inputs x_1,\ldots,x_n.

ytab

a numeric vector of the same length as xtab containing the observed outputs y_1,\ldots,y_n.

x

a numeric vector of evaluation points in which the estimator is to be computed.

hini

the initial bandwidth at which the local linear estimate will be computed.

B

number of bootstrap replications.

method

a character equal to "u" (unconstrained estimator) or "m" (improved version of the unconstrained estimator).

fix.seed

a boolean equal to TRUE for fixing the seed (bootstrap sampling).

control

a list of parameters to the GLPK solver. See *Details* of help(Rglpk_solve_LP).

Details

For a detailed description of the bootstrap procedure, see Hall and Park (2004).

Value

Returns the optimal bootstrap bandwidth.

Note

The computational burden here is very demanding, so be forewarned.

Author(s)

Hohsuk Noh.

References

Hall, P. and Park, B.U. (2004). Bandwidth choice for local polynomial estimation of smooth boundaries. Journal of Multivariate Analysis, 91, 240-261.

See Also

loc_est.

Examples

## Not run: 
data("nuclear")
x.nucl <- seq(min(nuclear$xtab), max(nuclear$xtab), 
 length.out = 101) 
# 1. Unconstrained case 
# Optimal bandwidths over 100 bootstrap replications
system.time(
h.nucl.u <- loc_est_bw(nuclear$xtab, nuclear$ytab, 
 x.nucl, hini = 40, B = 1, method = "u")
)
# result is 79.11877

# 2. Monotonicity constraint
# Optimal bandwidths over 100 bootstrap replications
h.nucl.m <- loc_est_bw(nuclear$xtab, nuclear$ytab, 
 x.nucl, hini = 40, B = 100, method = "m") 
# result is 79.12

## End(Not run)

[Package npbr version 1.8 Index]