Smooth Loess Curve

DESCRIPTION:

Returns a list of values at which the loess curve is evaluated.

USAGE:

loess.smooth(x, y, span = 2/3, degree = 1, family = c("symmetric", 
      "gaussian"), evaluation = 50) 

REQUIRED ARGUMENTS:

x
abscissas of points to be plotted on scatterplot.
y
ordinates of points to be plotted on scatterplot.

OPTIONAL ARGUMENTS:

span
smoothing parameter.
degree
overall degree of locally-fitted polynomial. 1 is locally-linear fitting and 2 is locally-quadratic fitting.
family
The values are "gaussian" or "symmetric". In the first case, local-fitting methods are used. In the second case, the default, local fitting is used together with a robustness feature that guards against distortion by outliers.
evaluation
number of values at which the loess curve is evaluated.

VALUE:

This is a support routine for panel.smooth and scatter.smooth. It returns a list of values at which the loess curve is evaluated, and the corresponding evaluations.

DETAILS:

When the data consists of bdVectors, the data will be aggregated before smoothing. The range of the "x" variable is divided into 1000 bins, and the mean for "x" and "y" computed in each bin. A weighted smooth is then computed on the bin means weighted based on the bin counts. This gives values that differ somewhat from those when the smoother is applied to the unaggregated data. The values are generally close enough to be indistinguishable when used in a plot, but the difference could be important when the smoother is used for prediction or optimization.

SEE ALSO:

, , .

EXAMPLES:

loess.smooth(x, y, span = 1, degree = 1)