boot.lowess: Bootstrapping with LOWESS

Description Usage Arguments Details Author(s) Examples

Description

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

Usage

1
boot.lowess(x, y = NULL, f = 2/3, iter = 3, line.col = "#FF000033", ...)

Arguments

x, y, f, iter

passed to lowess

line.col

the color of the LOWESS lines

...

other arguments passed to the scatterplot by plot

Details

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.

Author(s)

Yihui Xie

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
oopt = ani.options(nmax = if (interactive()) 100 else 2, 
    interval = 0.02)

boot.lowess(cars, pch = 20, xlab = "speed", ylab = "dist")

boot.lowess(cars, f = 1/3, pch = 20)

## save in HTML pages
saveHTML({
    par(mar = c(4.5, 4, 0.5, 0.5))
    boot.lowess(cars, f = 1/3, pch = 20, xlab = "speed", 
        ylab = "dist")
}, img.name = "boot_lowess", imgdir = "boot_lowess", 
    interval = 0.1, title = "Bootstrapping with LOWESS", 
    description = "Fit LOWESS curves repeatedly via bootstrapping.")

ani.options(oopt)


Search within the animation package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.