

   SSccaatttteerr PPlloott SSmmooootthhiinngg

        lowess(x, y, f=2/3, iter=3, delta=.01*diff(range(x)))

   AArrgguummeennttss::

        x,y: vectors giving the coordinates of the points in
             the scatter plot.  Alternatively a single plotting
             structure can be specified.

          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.

       iter: the number of robustifying iterations which should
             be performed.  Using smaller values of `iter' will
             make `lowess' run faster.

      delta: values of `x' which lie within `delta' of each
             other replaced by a single value in the output
             from `lowess'.

   DDeessccrriippttiioonn::

        This function performs the computations for the LOWESS
        smoother (see the reference below).  `lowess' returns a
        list containing components `x' and `y' which give the
        coordinates of the smooth.  The smooth should be added
        to a plot of the original points with the function
        `lines'.

   RReeffeerreenncceess::

        Cleveland, W. S. (1979).  Robust locally weighted
        regression and smoothing scatterplots.  J. Amer.
        Statist. Assoc. 74, 829-836.

        Cleveland, W. S. (1981).  LOWESS: A program for smooth-
        ing scatterplots by robust locally weighted regression.
        The American Statistician, 35, 54.

   EExxaammpplleess::

        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)

