## 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")
## ---------------------------------------------
Run the code above in your browser using DataLab