Learn R Programming

npbr (version 1.8)

poly_est: Polynomial frontier estimators

Description

Computes the polynomial-type estimators of frontiers and boundaries proposed by Hall, Park and Stern (1998).

Usage

poly_est(xtab, ytab, x, deg, control = list("tm_limit" = 700))

Value

Returns a numeric vector with the same length as x. Returns a vector of NA if no solution has been found by the solver (GLPK).

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.

deg

an integer (polynomial degree).

control

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

Author

Hohsuk Noh.

Details

The data edge is modeled by a single polynomial \(\varphi_{\theta}(x) = \theta_0+\theta_1 x+\cdots+\theta_p x^p\) of known degree \(p\) that envelopes the full data and minimizes the area under its graph for \(x\in[a,b]\), with \(a\) and \(b\) being respectively the lower and upper endpoints of the design points \(x_1,\ldots,x_n\). The implemented function is the estimate \(\hat\varphi_{n,p}(x) = \hat\theta_0+\hat\theta_1 x+\cdots+\hat\theta_p x^p\) of \(\varphi(x)\), where \(\hat\theta=(\hat\theta_0,\hat\theta_1,\cdots,\hat\theta_p)^T\) minimizes \(\int_{a}^b \varphi_{\theta}(x) \,dx\) over \(\theta\in\R^{p+1}\) subject to the envelopment constraints \(\varphi_{\theta}(x_i)\geq y_i\), \(i=1,\ldots,n\).

References

Hall, P., Park, B.U. and Stern, S.E. (1998). On polynomial estimators of frontiers and boundaries. Journal of Multivariate Analysis, 66, 71-98.

See Also

loc_est

Examples

Run this code
data("air")
x.air <- seq(min(air$xtab), max(air$xtab), 
 length.out = 101)
# Optimal polynomial degrees via the AIC criterion
(p.aic.air <- poly_degree(air$xtab, air$ytab, 
 type = "AIC"))
# Polynomial boundaries estimate 
y.poly.air<-poly_est(air$xtab, air$ytab, x.air, 
 deg = p.aic.air)
# Representation
plot(x.air, y.poly.air, lty = 1, lwd = 4, 
 col = "magenta", type = "l")
points(ytab~xtab, data = air)  
legend("topleft",legend = paste("degree =", p.aic.air), 
 col = "magenta", lwd = 4, lty = 1)  

Run the code above in your browser using DataLab