GS.Warping(haerdle) | R Documentation |
Golden section bootstrap for WARPing regression
GS.Warping(x, y, h, locations, samplenumber, M=10, M.large=20, kernel=4)
x |
predictor |
y |
response |
h |
bandwidth |
locations |
suggested locations to evaluate the regression curve |
samplenumber |
number of bootstrap samples |
M |
number of small bins |
M.large |
oversmoothing bandwidth |
kernel |
coded kernel: 1 = uniform, 2 = triangle (ASH), 3 = Epanchenikov, 4 = quartic, 5 = triweight. |
mM |
the WARPing regression estimate, |
mM.large |
the oversmoothed WARPing estimate and |
mMstar |
the bootstrap regression estimate. |
`Smoothing Techniques with Implementation in S', Wolfgang Haerdle, Springer, 1991
data(faithful) # Figure 7.1 gs <- GS.Warping(faithful$eruptions, faithful$waiting, h=0.4, c(0:33)/10+1.7, 5) plot(gs$locations, gs$mMstar[1,], xlab="", ylab="", type="l") for(i in 2:5) lines(gs$locations, gs$mMstar[i,],lty=i) data(reg.dat) # Figure 7.2 gs <- GS.Warping(dat.reg$x, dat.reg$y, h=0.1, c(1:28)/30, 5) plot(dat.reg$x, dat.reg$m, ylim= c(-1.0,1.0), xlab="", ylab="", type="l") for(i in 1:5) lines(gs$locations, gs$mMstar[i,]-gs$mM.large+gs$mM,lty=i)