Learn R Programming

npbr (version 1.0)

poly_est: Polynomial-based edge estimators

Description

Computes polynomial-type estimators of frontiers and boundaries (Hall et al., 1998)

Usage

poly_est(xtab, ytab, x, deg)

Arguments

xtab
numeric vectors containing the observed inputs $x_1,\ldots,x_n$
ytab
numeric vectors 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)

Value

  • Returns a vector of numeric with the same length than x

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 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("nuclear")
plot(ytab~xtab, data=nuclear)
x <- seq(min(nuclear$xtab), max(nuclear$xtab), length.out=1001)
lines(x, poly_est(nuclear$xtab, nuclear$ytab, x, deg=2), lty=1, col="red")   
lines(x, poly_est(nuclear$xtab, nuclear$ytab, x, deg=4), lty=2, col="blue") 
legend("topleft",legend=c("degree=2", "degree=4"), col=c("red","blue"), 
lty=c(1,2))

Run the code above in your browser using DataLab