loc_est_bw | R Documentation |
Computes the optimal bootstrap bandwidth proposed by Hall and Park (2004) for the local linear frontier estimator.
loc_est_bw(xtab, ytab, x, hini, B = 5, method = "u",
fix.seed = FALSE, control = list("tm_limit" = 700))
xtab |
a numeric vector containing the observed inputs |
ytab |
a numeric vector of the same length as |
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). |
For a detailed description of the bootstrap procedure, see Hall and Park (2004).
Returns the optimal bootstrap bandwidth.
The computational burden here is very demanding, so be forewarned.
Hohsuk Noh.
Hall, P. and Park, B.U. (2004). Bandwidth choice for local polynomial estimation of smooth boundaries. Journal of Multivariate Analysis, 91, 240-261.
loc_est
.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.