Learn R Programming

locpolExpectile (version 0.1.1)

h_GenROT: Rule-of-Thumb bandwidth selectors

Description

General Rule-of-Thumb bandwidth selector for univariate expectile regression proposed by Adam and Gijbels (2021a) see Formula (24). The weight function \(k_0(x)\) is chosen to be equal to the indicator function on \([min(X_i)+0.1,max(X_i)-0.1]\).

Usage

h_GenROT(X, Y, j = 0, p = 1, kernel = gaussK, omega)

compDerEst_exp(X, Y, p, omega)

Arguments

X

The covariate data values.

Y

The response data values.

j

The order of derivative to estimate. In default setting, j=0.

p

The order of the local polynomial estimator. In default setting, p=1.

kernel

The kernel used to perform the estimation. In default setting, kernel=gaussK. See details in Kernels.

omega

Numeric vector of level between 0 and 1 where 0.5 corresponds to the mean.

Value

h_GenROT provides the general Rule-of-Thumb bandwidth selector for the expectile regression proposed by Adam and Gijbels (2021a).

compDerEst_exp returns a data frame whose components are:

  • X The covariate data values.

  • Y The response data values.

  • fit The fitted values for the parametric estimation (leading to the Rule-of-Thumb expression).

  • der The derivative estimation at \(X\) values.

References

Adam, C. and Gijbels, I. (2021a). Local polynomial expectile regression. Annals of the Institute of Statistical Mathematics doi:10.1007/s10463-021-00799-y.

Examples

Run this code
# NOT RUN {
library(locpol)
data(mcycle)
y=mcycle$accel
x=mcycle$times

h=h_GenROT(X=x,Y=y,j=0,p=1,kernel=gaussK,omega=0.1)
#h=1.887636

# }

Run the code above in your browser using DataLab