Learn R Programming

npbr (version 1.0)

npbr-package: Nonparametric boundary regression

Description

This package provides a variety of nonparemtric regression methods and allows for comparison among these methods via Monte Carlo experiments. The package provides also illustrations with real datasets.

Arguments

Details

Suppose that we have $n$ pairs of observations $(x_i,y_i),~i=1,\ldots,n$, from a bivariate distribution with a density $f(x,y)$ in $R^2$. The support $\Psi$ of $f$ is assumed to be of the form $$\Psi = { (x,y) | y \leq \varphi(x) } \supseteq { (x,y) | f(x,y) > 0 }$$ $${ (x,y) | y > \varphi(x) } \subseteq { (x,y) | f(x,y) = 0 },$$ where $\varphi$ is a monotone increasing and/or concave function whose graph corresponds to the locus of the curve above which the density $f$ is zero. We consider the estimation of the frontier function $\varphi$ based on the sample ${ (x_i,y_i),~i=1,\ldots,n}$ in the general setting where the density $f$ may have sudden jumps at the frontier, decay to zero or rise up to infinity as it approaches its support boundary. The package provides functions for the best known nonparametric estimation procedures. The selected methods can be divided into a number of different categories: empirical, smooth, unconstrained and restricted estimates. The package provides some real data sets as well.

References

Daouia, A., Noh, H. and Park, B.U. (2013). Data Envelope fitting with constrained polynomial splines. TSE Working Paper, http://www.tse-fr.eu/images/doc/wp/etrie/wp_tse_449.pdf.

Examples

Run this code
data("green")
plot(log(OUTPUT)~log(COST), data=green)
x <- seq(min(log(green$COST)), max(log(green$COST)), length.out=1001)
# under the separate monotonicity constraint with the knots mesh being
# obtained via AIC and BIC criteria
lines(x, quad_spline_est(log(green$COST), log(green$OUTPUT), x, kn=9, cv=0),
lty=1, col="red")   
lines(x, quad_spline_est(log(green$COST), log(green$OUTPUT), x, kn=6, cv=0),
lty=1, col="blue")
# under both monotonicity and concavity constraints
# with the same optimal number of knots obtained using AIC and BIC criteria
lines(x, quad_spline_est(log(green$COST), log(green$OUTPUT), x, kn=1, cv=1), 
lty=2)   
legend("topleft",legend=c("monotonicity (kn=9)", "monotonicity (kn=6)",
"monotonicity + concavity (kn=1)"), col=c("red","blue","black"), lty=c(1,1,2))

Run the code above in your browser using DataLab