bwCV {BwQuant}R Documentation

Computing the cross-validation bandwidth proposed by Abberger (1998)

Description

Function to compute a bandwidth for local linear quantile regression following the cross-validation criteria presented by Abberger (1998).

Usage

bwCV(x, y, hseq, tau)

Arguments

x

numeric vector of x data.

y

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

hseq

sequence of values where the cross-validation function will be evaluated.

tau

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

Details

The cross-validation function is evaluated at each element of hseq. Then, the cross-validation selector will be the element of hseq that minimizes the cross-validation function.

Value

Returns a number with the chosen bandwidth.

Author(s)

Mercedes Conde-Amboage and Cesar Sanchez-Sellero.

References

Abberger, K. (1998). Cross-validation in nonparametric quantile regression. Allgemeines Statistisches Archiv, 82, 149-161.

Abberger, K. (2002). Variable data driven bandwidth choice in nonparametric quantile regression. Technical Report.

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

set.seed(1234)
x=runif(100)
y=10*(x^4+x^2-x)+rexp(100)
hseq=seq(0.05,0.8,length=21)
tau=0.25
bwCV(x,y,hseq,tau)

[Package BwQuant version 0.1.0 Index]