GS.Warping(haerdle)R Documentation

Golden section bootstrap for WARPing regression

Description

Golden section bootstrap for WARPing regression

Usage

GS.Warping(x, y, h, locations, samplenumber, M=10, M.large=20, kernel=4)

Arguments

Required:
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.

Value

list with components locations of the estimates:
mM the WARPing regression estimate,
mM.large the oversmoothed WARPing estimate and
mMstar the bootstrap regression estimate.

References

`Smoothing Techniques with Implementation in S', Wolfgang Haerdle, Springer, 1991

Examples

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)


[Package Contents]