Learn R Programming

BwQuant (version 0.1.0)

bwRT: Computing a bandwidth using a rule of thumb

Description

Function to compute a bandwidth selector for local linear quantile regression following the rule of thumb presented in Section 2.1 of Conde-Amboage and Sanchez-Sellero (2018).

Usage

bwRT(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

Conde-Amboage, M. and Sanchez-Sellero, C. (2018). A plug-in bandwidth selector for nonparametric quantile regression. TEST, 28, 423-450. <doi:10.1007/s11749-018-0582-6>.

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
bwRT(x,y,tau)
# }

Run the code above in your browser using DataLab