Learn R Programming

BwQuant (version 0.1.0)

bwYJ: Computing the plug-in bandwidth proposed by Yu and Jones (1998)

Description

Function to compute a bandwidth selector for local linear quantile regression following the plug-in rule proposed by Yu and Jones (1998).

Usage

bwYJ(x, y, tau)

Arguments

x

numeric vector of x data.

y

numeric vector of y data. This must be the same length as x.

tau

the quantile order where the regression function is to be estimated. It must be a number strictly between 0 and 1.

Value

Returns a bandwidth for a local linear estimate of the tau-quantile regression function.

References

Ruppert, D., Sheather, S. J. and Wand, M. P. (1995). An efective bandwidth selector for local least squares regression. Journal of the American Statistical Association. 90, 1257-1270.

Yu, K. and Jones, M. C. (1998). Local linear quantile regression. Journal of the American Statistical Association, 93, 228-237.

See Also

The obtained bandwidth can be used in the function llqr to produce a local linear estimate of the tau-quantile regression function.

Examples

Run this code
# NOT RUN {
set.seed(1234)
x=runif(100)
y=10*(x^4+x^2-x)+rexp(100)
tau=0.25
bwYJ(x,y,tau)
# }

Run the code above in your browser using DataLab