R: Plot a smoothing line with standard error bounds.
panel.smoother
R Documentation
Plot a smoothing line with standard error bounds.
Description
Plot a smoothing line with standard error bounds.
This is based on the stat_smooth
function from ggplot2.
Usage
panel.smoother(x, y, form = y ~ x, method = "loess", ...,
se = TRUE, level = 0.95, n = 100,
col = plot.line$col, col.se = col,
lty = plot.line$lty, lwd = plot.line$lwd,
alpha = plot.line$alpha, alpha.se = 0.25, border = NA,
## ignored: ##
subscripts, group.number, group.value,
type, col.line, col.symbol, fill,
pch, cex, font, fontface, fontfamily)
Arguments
x, y
data points. If these are missing, they will be looked for in the
environment of form. So in many cases you can skip these if
passing form. In fact, for convenience, the formula
can be passed as the first argument (i.e. x).
form, method
the smoothing model is constructed (approximately) as
method(form, data = list(x=x, y=y), ...).
See the Examples section for common choices.
...
further arguments passed on to the model function (method).
se, level
estimate standard errors on the smoother, at the given level,
and plot these as a band.
n
number of equi-spaced points on which to evaluate the smooth function.
col, col.se, lty, lwd, alpha, alpha.se, border
graphical parameters. col and alpha apply to the
smoothing line, while col.se and alpha.se
apply to the shaded se region.