h_ASE_reg {OSCV} | R Documentation |
The ASE-optimal bandwidth in the regression context.
Description
Computing the ASE-optimal bandwidth for the Gaussian local linear regression estimator.
Usage
h_ASE_reg(desx, y, rx)
Arguments
desx |
numerical vecror of design points, |
y |
numerical vecror of data points corresponding to the design points |
rx |
numerical vecror of the regression function values at |
Details
Computing the ASE-optimal bandwidth for the local linear estimator in the regression context. The ASE-optimal bandwidth is the global minimizer of the ASE function ASE_reg
. This bandwidth is optimal for the data set at hand.
Value
The ASE-optimal bandwidth (scalar).
See Also
Examples
## Not run:
# Simulated example.
n=300
dx=runif(n) #uniform design
regx=5*dx^10*(1-dx)^2+2.5*dx^2*(1-dx)^10
ydat=regx+rnorm(n,sd=1/250)
hase=round(h_ASE_reg(dx,ydat,regx),digits=4)
u=seq(0,1,len=1000)
fun=5*u^10*(1-u)^2+2.5*u^2*(1-u)^10
dev.new()
plot(dx,ydat,pch=20,cex=1.5,xlab="argument",ylab="function",cex.lab=1.7,cex.axis=1.7,
main="Function, data, and the ASE-optimal bandwidth",cex.main=1.5)
lines(u,fun,'l',lwd=3,col="blue")
legend(0,0.03,legend=paste("h_ASE=",hase),cex=1.8,bty="n")
legend(0.6,-0.002,legend=paste("n=",n),cex=2,bty="n")
## End(Not run)
[Package OSCV version 1.0 Index]