panel.smooth(x, y, span = 2/3, degree = 1, family = c("symmetric", "gaussian"), zero.line = FALSE, evaluation = 50, ...)
1
is locally linear fitting and
2
is locally quadratic fitting.
"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.
TRUE
, the line
y = 0
is drawn on the panel.
This function adds smooth curves to the scatterplots on multipanel
displays made by graphical functions such as
pairs
and
coplot
.
The smoothing method used is
loess
.
The fit is evaluated
at
evaluation
equally spaced points from
min(x)
to
max(x)
and then graphed by connecting the successive plotting
locations by line segments.
Graphical parameters may also be supplied as arguments to
this function (see
).
panel.smooth
does not recognize graphics parameters.
The function allows a scatterplot smoothing of the points in a plot. It adds the curves using loess smoothing.
E.intervals <- co.intervals(ethanol$E, 16, 0.25) coplot(NOx ~ C | E, given = E.intervals, data = ethanol, panel = function(x, y) panel.smooth(x, y, span = 1, degree = 1))