Package 'locpolExpectile'

Title: Local Polynomial Expectile Regression
Description: Provides the local polynomial expectile regression method and different bandwidth selection procedures. The codes include local polynomial univariate expectile regression with several data-driven methods for bandwidth selection; local linear bivariate and trivariate expectile regression; and partially linear expectile regression, allowing for different errors structures (homoscedastic error and various heteroscedastic error structures). For more details, see Adam and Gijbels (2021a) <doi:10.1007/s10463-021-00799-y> and Adam and Gijbels (2021b) <doi:10.1007/978-3-030-73249-3_8>.
Authors: Cécile Adam [aut, cre] Irène Gijbels [aut]
Maintainer: Cécile Adam <[email protected]>
License: GPL (>= 2)
Version: 0.1.1
Built: 2024-11-02 03:57:55 UTC
Source: https://github.com/cran/locpolExpectile

Help Index


Local linear expectile regression (iterative procedure) for a bivariate covariate case

Description

Formula interface for the local linear expectile estimation for a bivariate covariate case.

Usage

expectreg_loclin_bivariate(
  Z1,
  Z2,
  Y,
  omega,
  kernel = gaussK,
  h,
  grid = cbind(seq(min(Z1), max(Z1), length.out = length(Z1)), seq(min(Z2), max(Z2),
    length.out = length(Z2)))
)

Arguments

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, kernel=gaussK. See details in Kernels.

h

Smoothing parameter, bandwidth.

grid

Matrix of evaluation points. In default setting, a grid of equispaced grid-values on the domain of the variables Z1 and Z2.

Value

expectreg_loclin_bivariate local linear expectile estimator proposed and studied by Adam and Gijbels (2021b) for a bivariate covariate case. expectreg_loclin_bivariate returns a matrix whose components are the estimation of the bivariate expectile surface, of order ω\omega according to the grid matrix. The rows are the grid on the first covariate data values (i.e. Z1) and the columns the grid on the second covariate data values (i.e. Z2).

References

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.

Examples

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)

expectreg_loclin_bivariate(Z1=Z_1,Z2=Z_2,Y=Y,omega=0.1
,kernel=gaussK,h=0.1,grid=cbind(seq(min(Z_1),max(Z_1)
,length.out=10),seq(min(Z_2),max(Z_2),length.out=10)))

Local linear expectile regression (iterative procedure) for a trivariate covariate case

Description

Formula interface for the local linear expectile estimation for a trivariate covariate setting.

Usage

expectreg_loclin_trivariate(Z, X1, X2, Y, omega, h, kernel = gaussK)

Arguments

Z

The first covariate data values.

X1

The second covariate data values.

X2

The third covariate data values.

Y

The response data values.

omega

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

h

Smoothing parameter, bandwidth.

kernel

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

Value

expectreg_loclin_trivariate local linear expectile estimator proposed and studied by Adam and Gijbels (2021b) for a trivariate covariate matrix. expectreg_loclin_trivariate returns a vector whose components are the estimation of the nonparametric part according to the observed values (i.e. (Zi,X1i,X2i)(Z_i,X_{1i},X_{2i})).

References

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.


Local polynomial expectile regression (iterative procedure), univariate covariate

Description

Formula interface for the local polynomial expectile estimation.

Usage

expectreg_locpol(
  X,
  Y,
  j = 0,
  p = 1,
  omega,
  h,
  kernel = gaussK,
  starting_value = c("mean", "median", "omega-quantile"),
  grid = seq(min(X), max(X), length.out = 100)
)

Arguments

X

The covariate data values.

Y

The response data values.

j

The order of derivative of the expectile to be estimated. In default setting, j=0 (i.e. estimating the expectile regression function).

p

The order of the local polynomial estimator. In default setting, p=1 (i.e. local linear estimator).

omega

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

h

Smoothing parameter, bandwidth.

kernel

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

starting_value

Method for the starting point. Choice between the estimated (unconditional) mean, median and omega-quantile.

grid

Vector of evaluation points. In default setting, a grid of 100 equispaced grid-values on the domain of the variable XX.

Value

expectreg_locpol local polynomial expectile estimator proposed and studied by Adam and Gijbels (2021a).

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

library(locpol)
data(mcycle)
y=mcycle$accel
x=mcycle$times

expectreg_locpol(X=x,Y=y,omega=0.3,h=0.4,kernel=gaussK,starting_value="mean"
,grid=seq(min(x),max(x),length.out=10))

One-to-one mapping relating expectiles and quantiles

Description

Ont-to-one mapping (see Proposition 1 in Adam and Gijbels (2021a))

Usage

findroot(X, Y, omega, alpha, p = 1)

Arguments

X

The covariate data values.

Y

The response data values.

omega

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

alpha

Alpha value corresponding to the omega value given by the one-to-one mapping

p

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

Value

findroot returns the one-to-one mapping

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.


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 k0(x)k_0(x) is chosen to be equal to the indicator function on [min(Xi)+0.1,max(Xi)0.1][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 XX 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

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

Rule-of-Thumb bandwidth selectors for bivariate covariate setting

Description

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(Zki)+0.1,max(Zki)0.1][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.

Usage

h_GenROT_bivariate(Z1, Z2, Y, omega, kernel = gaussK)

Arguments

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, kernel=gaussK. See details in Kernels.

Value

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).

References

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.

Examples

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

Rule-of-Thumb bandwidth selectors in a location-scale setting using the one-to-one mapping

Description

Rule-of-Thumb bandwidth selector for the expectile regression in a location-scale setting using the one-to-one mapping. The weight function is chosen to be equal to the indicator function on [min(Xi)+0.1,max(Xi)0.1][min(X_i)+0.1,max(X_i)-0.1].

Usage

h_GenROT_with(X, Y, j = 0, p = 1, kernel = gaussK, 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_with provides the Rule-of-Thumb bandwidth selector in a location-scale setting using the one-to-one mapping for univariate expectile regression proposed by Adam and Gijbels (2021a).

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

library(locpol)
data(mcycle)
y=mcycle$accel
x=mcycle$times

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

Rule-of-Thumb bandwidth selectors in a location-scale setting without using the one-to-one mapping

Description

Rule-of-Thumb bandwidth selector for the expectile regression in a location scale without using the one-to-one mapping. The weight function is chosen to be equal to the indicator function on [min(Xi)+0.1,max(Xi)0.1][min(X_i)+0.1,max(X_i)-0.1].

Usage

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

compDerEstError_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_without provides the Rule-of-Thumb bandwidth selector in a location-scale setting without using the one-to-one mapping for univariate expectile regression proposed by Adam and Gijbels (2021a).

compDerEstError_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.

  • der The derivative estimation at XX values.

  • err The estimation of the error vector

  • err_fit The ω\omegath expectile of the residuals

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

library(locpol)
data(mcycle)
y=mcycle$accel
x=mcycle$times

h=h_GenROT_without(X=x,Y=y,j=0,p=1,kernel=gaussK,omega=0.3)
#h=1.937706

Quantile-based bandwidth selectors based on the plug-in bandwidth selector for mean regression

Description

Quantile-based bandwidth selector for univariate expectile regression based on the plug-in bandwidth selector proposed by Fan and Gijbels (1996).

Usage

h_pluginBw(X, Y, p = 1, kernel = gaussK, omega)

Arguments

X

The covariate data values.

Y

The response data values.

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_pluginBw provides the quantile-based bandwidth based on the plugin bandwidth selector for mean regression proposed by Fan and Gijbels (1996) as discussed in Adam and Gijbels (2021a).

References

Fan, J. and Gijbels, I. (1996). Local Polynomial Modelling and Its Applications. Number 66 in Monographs on statistics and applied probability series. Chapman and Hall, London.

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

library(locpol)
data(mcycle)
y=mcycle$accel
x=mcycle$times

h=h_pluginBw(X=x,Y=y,p=1,kernel=gaussK,omega=0.1)
#h=0.8602156

Quantile-based bandwidth selectors based on the Rule-of-Thumb selector for mean regression

Description

Quantile-based bandwidth selector for univariate expectile regression based on the Rule-of-Thumb for mean regression proposed by Fan and Gijbels (1996).

Usage

h_thumbBw(X, Y, p = 1, kernel = gaussK, omega)

Arguments

X

The covariate data values.

Y

The response data values.

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_thumbBw provides the quantile-based bandwidth based on the Rule-of-Thumb for mean regression proposed by Fan and Gijbels (1996) as discussed in Adam and Gijbels (2021a).

References

Fan, J. and Gijbels, I. (1996). Local Polynomial Modelling and Its Applications. Number 66 in Monographs on statistics and applied probability series. Chapman and Hall, London.

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

library(locpol)
data(mcycle)
y=mcycle$accel
x=mcycle$times

h=h_thumbBw(X=x,Y=y,p=1,kernel=gaussK,omega=0.1)
#h=1.824103

Data from a Simulated Motorcycle Accident

Description

A detailed description of these data is available in Schmidt et al. (1981) and in Silverman (1985). The dataset is available in the MASS package. This dataset is also used in Adam and Gijbels (2021a). A data frame giving a series of measurements of head acceleration in a simulated motorcycle accident, used to test crash helmets.

Usage

mcycle

Format

A data frame with 142 rows and 2 variables:

times

in milliseconds after impact.

accel

in g.

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.

Schmidt, G., Mattern, R., and Schuler, F. (1981). Biomechanical investigation to determine physical and traumatological differentiation criteria for the maximum load capacity of head and vertebral column with and without protective helmet under the effects of impact. EEC Research Program on Biomechanics of Impacts. Final report Phase III, Project G5, Institut fur Rechtsmedizin, Universitat Heidelberg.

Silverman, B. W. (1985). Some aspects of the spline smoothing approach to non-parametric curve fitting. Journal of the Royal Statistical Society Series B, 47, 1–52.

Examples

data(mcycle)
y=mcycle$accel
x=mcycle$times
plot(x,y)

Partially linear expectile regression with different possible heteroscedastic error and univariate variable in the nonparametric function

Description

Formula interface for the partially linear expectile regression using local linear expectile estimation for different heteroscedastic error structure and a univariate variable in the nonparametric function g(.)g(.). The model is of the form Y=δTX+g(Z)+σ(X)ϵY=\delta^T X + g(Z) + \sigma(X) \epsilon, Y=δTX+g(Z)+σ(Z)ϵY=\delta^T X + g(Z) + \sigma(Z) \epsilon or Y=δTX+g(Z)+σ(Z,X)ϵY=\delta^T X + g(Z) + \sigma(Z,X) \epsilon. See Table 1 in Adam and Gijbels (2021b) for more details.

Usage

ParLin_expectreg_hetero(
  X,
  Y,
  Z,
  omega = 0.3,
  kernel = gaussK,
  heteroscedastic = c("X", "Z", "Z and X")
)

Arguments

X

The covariates data values for the linear part (of size n×kn \times k with k=1 or k=2).

Y

The response data values.

Z

The covariate data values for the nonparametric part.

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, kernel=gaussK. See details in Kernels.

heteroscedastic

Heteroscedastic error depending on X, or onZ or on Z and X

Value

ParLin_expectreg_hetero partially linear expectile estimators for different heteroscedastic error structures and a univariare variable in the nonparametric part, proposed and studied by Adam and Gijbels (2021b). ParLin_expectreg_hetero returns a list whose components are:

  • If the heteroscedastic error depends on ZZ:

    • Linear The delta estimators for the linear part

    • Nonlinear The estimation of the nonparametric part according to the observed values ZiZ_i.

  • If the heteroscedastic error depends on XX:

    • Linear The delta estimators for the linear part

    • Nonlinear_g The estimation of the nonparametric part according to the observed values ZiZ_i.

    • Nonlinear_g_omega The estimation of the nonparametric part according to the observed values XiX_i (if XX is univariate) or to the couple of observed values (X1i,X2j)(X_{1i},X_{2j}).

  • If the heteroscedastic error depends on ZZ and XX:

    • Linear The delta estimators for the linear part

    • Nonlinear_g The estimation of the nonparametric part according to the couple of the observed values (Zi,Xj)(Z_i,X_j) (if XX is univariate) or to the observed values (Zi,X1i,X2i)(Z_i,X_{1i},X_{2i}).

References

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.

Examples

library(locpol)
set.seed(123)
Z<-runif(100,-3,3)
eta_1<-rnorm(100,0,1)
X1<-(0.9*Z)+(1.5*eta_1)
set.seed(1234)
eta_2<-rnorm(100,0,2)
X2<-(0.9*Z)+(1.5*eta_2)
X<-rbind(X1,X2)

set.seed(12345)
epsilon<-rnorm(100,0,1)
delta<-rbind(0.8,-0.8)

Y<-as.numeric((t(delta)%*%X)+(10*sin(0.9*Z))+(0.6*X1^2)*epsilon)

ParLin_expectreg_hetero(X=t(X),Y=Y,Z=Z,omega=0.3,kernel=gaussK,heteroscedastic="X")

Partially linear expectile regression with a homoscedastic error and a bivariate variable in the nonparametric function

Description

Formula interface for the partially linear expectile regression using local linear expectile estimation for a homoscedastic error and a bivariate variable in the nonparametric function. For the nonparametric part, the general Rule-of-Thumb bandwidth selector proposed in Adam and Gijbels (2021b) is used. See Adam and Gijbels (2021b) for more details.

Usage

ParLin_expectreg_homo_biv(
  X,
  Y,
  Z,
  omega = 0.3,
  kernel = gaussK,
  grid = cbind(seq(min(Z[, 1]), max(Z[, 1]), length.out = 10), seq(min(Z[, 2]), max(Z[,
    2]), length.out = 10))
)

Arguments

X

The covariates data values for the linear part (of size n×kn \times k).

Y

The response data values.

Z

The covariates data values for the nonparametric part (of size n×2n \times 2).

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, kernel=gaussK. See details in Kernels.

grid

Matrix of evaluation points used for the nonparametric part. In default setting, a grid of 10 equispaced grid-values in each direction on the domain of the variable Z.

Value

ParLin_expectreg_homo_biv partially linear expectile estimators assuming a homoscedastic error and a bivariate covariate in the nonparametric part, proposed and studied by Adam and Gijbels (2021b). ParLin_expectreg_homo_biv returns a list whose components are:

  • Linear The delta estimators for the linear part

  • Nonlinear The estimation of the nonparametric part according to the grid. The rows of the estimation matrix are the grid on the first covariate data values (i.e. Z[,1]) and the columns the grid on the second covariate data values (i.e. Z[,2]).

References

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.

Examples

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)

ParLin_expectreg_homo_biv(X=t(X),Y=Y,Z=t(Z),omega=0.1,kernel=gaussK
,grid=cbind(seq(min(Z[,1]),max(Z[,1]),length.out=10),seq(min(Z[,2]),max(Z[,2]),length.out=10)))

Partially linear expectile regression with a homoscedastic error and a univariate variable in the nonparametric function

Description

Formula interface for the partially linear expectile regression using local linear expectile estimation assuming a homoscedastic error and a univariate variable in the nonparametric function. For the nonparametric part, the general Rule-of-Thumb bandwidth selector proposed in Adam and Gijbels (2021a) is used. See Adam and Gijbels (2021b) for more details.

Usage

ParLin_expectreg_homo_uni(
  X,
  Y,
  Z,
  omega = 0.3,
  kernel = gaussK,
  grid = seq(min(Z), max(Z), length.out = 100)
)

Arguments

X

The covariates data values for the linear part (of size n×kn \times k).

Y

The response data values.

Z

The covariate data values for the nonparametric part.

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, kernel=gaussK. See details in Kernels.

grid

Vector of evaluation points used for the nonparametric part. In default setting, a grid of 100 equispaced grid-values on the domain of the variable Z.

Value

ParLin_expectreg_homo_uni partially linear expectile estimators for a homoscedastic error and a univariare variable in the nonparametric part proposed and studied by Adam and Gijbels (2021b). ParLin_expectreg_homo_uni returns a list whose components are:

  • Linear The delta estimators for the linear part

  • Nonlinear The estimation of the nonparametric part according to the grid.

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.

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.

Examples

library(locpol)
set.seed(123)
Z<-runif(100,-3,3)
eta_1<-rnorm(100,0,1)
X1<-(0.9*Z)+(1.5*eta_1)
set.seed(1234)
eta_2<-rnorm(100,0,2)
X2<-(0.9*Z)+(1.5*eta_2)
X<-rbind(X1,X2)

set.seed(12345)
epsilon<-rnorm(100,0,1)
delta<-rbind(0.8,-0.8)

Y<-as.numeric((t(delta)%*%X)+(10*sin(0.9*Z))+5*epsilon)

ParLin_expectreg_homo_uni(X=t(X),Y=Y,Z=Z,omega=0.3
,kernel=gaussK,grid=seq(min(Z),max(Z),length.out=10))