# ASE_reg: The ASE function for the local linear estimator (LLE) in the... In OSCV: One-Sided Cross-Validation

## Description

Computing ASE(h), the value of the ASE function for the local linear estimator in the regression context, for the given vector of h values.

## Usage

 `1` ```ASE_reg(h, desx, y, rx) ```

## Arguments

 `h` numerical vector of bandwidth values, `desx` numerical vecror of design points, `y` numerical vecror of data points corresponding to the design points desx, `rx` numerical vecror of values of the regression function at desx.

## Details

The average squared error (ASE) is used as a measure of performace of the local linear estimator based on the Gaussian kernel.

## Value

The vector of values of ASE(h) for the correponsing vector of h values.

## References

Hart, J.D. and Yi, S. (1998) One-sided cross-validation. Journal of the American Statistical Association, 93(442), 620-631.

`loclin`, `h_ASE_reg`, `CV_reg`, `OSCV_reg`.
 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18``` ```## Not run: # Example (ASE function for a random sample of size n=100 generated from the function reg3 that # has six cusps. The function originates from the article of Savchuk et al. (2013). # The level of the added Gaussian noise is sigma=1/1000). n=100 dx=(1:n-0.5)/n regx=reg3(dx) ydat=regx+rnorm(n,sd=1/1000) harray=seq(0.003,0.05,len=300) ASEarray=ASE_reg(harray,dx,ydat,regx) hmin=round(h_ASE_reg(dx,ydat,regx),digits=4) dev.new() plot(harray,ASEarray,'l',lwd=3,xlab="h",ylab="ASE",main="ASE function for a random sample from r3",cex.lab=1.7,cex.axis=1.7,cex.main=1.5) legend(0.029,0.0000008,legend=c("n=100","sigma=1/1000"),cex=1.7,bty="n") legend(0.005,0.000002,legend=paste("h_ASE=",hmin),cex=2,bty="n") ## End(Not run) ```