Yihui Xie


Bootstrapping with LOWESS

Yihui Xie & Lijia Yu / 2017-04-04

Sample the original data with replacement and fit LOWESS curves accordingly.

We keep on resampling the data and finally we will see several bootstrapped LOWESS curves, which may give us a rough idea about a confidence interval of the LOWESS fit.

ani.options(nmax = 100, interval = 0.02)

boot.lowess(cars, pch = 20, xlab = "speed", ylab = "dist")
boot.lowess(cars, f = 1/3, pch = 20)