Learn R Programming

spatialEco (version 0.1-7)

loess.boot: Loess Bootstrap

Description

Bootstrap of a Local Polynomial Regression (loess)

Usage

loess.boot(x, y, nreps = 100, confidence = 0.95, ...)

Arguments

x
Independent variable
y
Dependent variable
nreps
Number of bootstrap replicates
confidence
Fraction of replicates contained in confidence region
...
Additional arguments passed to loess function

Value

nreps Number of bootstrap replicates confidence Confidence interval (region) span alpha (span) parameter used loess fit degree polynomial degree used in loess fit normalize Normalized data (TRUE/FALSE) family Family of statistic used in fit parametric Parametric approximation (TRUE/FALSE) surface Surface fit, see loess.control data data.frame of x,y used in model fit data.frame including: x Equally-spaced x index (see NOTES) y.fit loess fit up.lim Upper confidence interval low.lim Lower confidence interval stddev Standard deviation of loess fit at each x value

References

Cleveland, WS, (1979) Robust Locally Weighted Regression and Smoothing Plots Journal of the American Statistical Association 74:829-836 Efron, B., and R. Tibshirani (1993) An Introduction to the Bootstrap Chapman and Hall, New York Hardle, W., (1989) Applied Nonparametric Regression Cambridge University Press, NY. Tibshirani, R. (1988) Variance stabilization and the bootstrap. Biometrika 75(3):433-44.

Examples

Run this code
 n=1000
 x <- seq(0, 4, length.out=n)	 
 y <- sin(2*x)+ 0.5*x + rnorm(n, sd=0.5)
 sb <- loess.boot(x, y, nreps=99, confidence=0.90, span=0.40)
 plot(sb)

Run the code above in your browser using DataLab