panel.locfit {locfit}R Documentation

Locfit panel function

Description

This panel function can be used to add locfit fits to plots generated by trellis.

At the time of writing, it works with xyplot for 1-d fits and crudely with wireframe for 2-d fits.

Usage

panel.locfit(x, y, subscripts, z, xyz.labs, xyz.axes, xyz.mid, xyz.minmax,
  xyz.range, col.regions, at, drape, contour, region, groups, ...)

Arguments

x, y x and y data.
subscripts Subscripts of indices in the original data frame.
z z data.
xyz.labs, xyz.axes, xyz.mid, xyz.minmax, xyz.range, col.regions, at, drape, contour, region Arguments to be passed to 3D trellis panel functions.
groups Currently not used.
... Most Locfit arguments can be passed through xyplot.

See Also

locfit, plot.locfit.3d, xyplot.

Examples

library("lattice")

# a simple multi-panel display
data(ethanol)
xyplot(NOx~E|C,data=ethanol,panel=panel.locfit)

# The second example uses some Locfit optional arguments.
# Note we can pass the alpha (bandwidth) and family arguments directly to
# xyplot. The cens argument must be given in full; not as a data frame variable.
# The resulting plot does not (yet) distinguish the censored points, but
# the fit will correctly apply censoring.
data(border)
xyplot(runs~day,data=border,panel=panel.locfit,family="poisson",
 alpha=0.3,cens=border$no)

[Package locfit version 1.1-9 Index]