Description Usage Arguments Value References Examples
View source: R/h_GenROT_bivariate.R
General Rule-of-Thumb bandwidth selector for the expectile regression
proposed by Adam and Gijbels (2021b) see Formula (26) for a bivariate covariate setting.
The weight functions are chosen to be equal to the indicator
functions on [min(Z_{ki})+0.1,max(Z_{ki})-0.1] for k=1,2
(i.e. for the two covariates) and j=0
and p=1
.
1 | h_GenROT_bivariate(Z1, Z2, Y, omega, kernel = gaussK)
|
Z1 |
The first covariate data values. |
Z2 |
The second covariate data values. |
Y |
The response data values. |
omega |
Numeric vector of level between 0 and 1 where 0.5 corresponds to the mean. |
kernel |
The kernel used to perform the estimation. In default setting,
|
h_GenROT_bivariate
provides the general Rule-of-Thumb bandwidth selector
for the expectile regression, in the bivariate covariate setting,
proposed by Adam and Gijbels (2021b).
Adam, C. and Gijbels, I. (2021b). Partially linear expectile regression using local polynomial fitting. In Advances in Contemporary Statistics and Econometrics: Festschrift in Honor of Christine Thomas-Agnan, Chapter 8, pages 139–160. Springer, New York.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | library(locpol)
library(lestat)
set.seed(6)
dist <- muniformdistribution(rep(0, 2), rep(1, 2))
values<-simulate(dist,200)
Z_1<-values[,1]
Z_2<-values[,2]
Z<-rbind(Z_1,Z_2)
gamma=cbind(3,-0.4)
set.seed(7)
eta_1<-rnorm(100,0,1)
X1=(gamma%*%Z)+(1.5*eta_1)
set.seed(8)
eta_2<-rnorm(100,0,2)
X2=(gamma%*%Z)+(1.5*eta_2)
X<-rbind(X1,X2)
set.seed(9)
epsilon<-rt(100,3)
delta_true<-rbind(0,-0.8)
Y=as.numeric((t(delta_true)%*%X)+(0.2*exp(1.5*(gamma%*%Z)))+epsilon)
h=h_GenROT_bivariate(Z1=Z_1,Z2=Z_2,Y=Y,kernel=gaussK,omega=0.1)
#h=0.1241427
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.