TITLE(lowess @@ Scatter Plot Smoothing)
USAGE(
lowess(x, y, f=2/3, iter=3, delta=.01*diff(range(x)))
)
ALIAS(lowess)
ARGUMENTS(
ARG(x,y @@ vectors giving the coordinates of the points in the scatter plot.
Alternatively a single plotting structure can be specified.)
ARG(f @@ the smoother span.
This gives the proportion of points in the plot which
influence the smooth at each value.
Larger values give more smoothness.)
ARG(iter @@ the number of robustifying iterations which should be
performed.
Using smaller values of LANG(iter) will make LANG(lowess) run faster.)
ARG(delta @@ values of LANG(x) which lie within LANG(delta)
of each other replaced by a single value in the output from
LANG(lowess).)
)
DESCRIPTION(
This function performs the computations for the
ITALIC(LOWESS) smoother (see the reference below).
LANG(lowess) returns a list containing components
LANG(x) and LANG(y) which give the coordinates of the smooth.
The smooth should be added to a plot of the original
points with the function
LANG(lines).
)
REFERENCES(
Cleveland, W. S. (1979).
Robust locally weighted regression and smoothing scatterplots.
ITALIC(J. Amer. Statist. Assoc.) BOLD(74), 829-836.
PARA
Cleveland, W. S. (1981).
LOWESS: A program for smoothing scatterplots by robust locally weighted
regression.
ITALIC(The American Statistician), BOLD(35), 54.
)
EXAMPLES(
data(cars)
plot(cars, main = "lowess(cars)")
lines(lowess(cars), col= 2)
lines(lowess(cars,f=.2), col= 3)
legend(5,120,c(paste("f = ", c("2/3", ".2"))), lty=1, col=2:3)
)
