Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

panel.locfit

Locfit panel function


Description

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

Currently it works with xyplot for 1-d fits and crudely with wireframe for 2-d fits.

Usage

panel.locfit(x, y, subscripts, z, rot.mat, distance, shade,
                 light.source, xlim, ylim, zlim, xlim.scaled,
                 ylim.scaled, zlim.scaled, region, col, lty, lwd,
                 alpha, col.groups, polynum, drape, at, xlab, ylab,
                 zlab, xlab.default, ylab.default, zlab.default,
                 aspect, panel.aspect, scales.3d, contour, labels,
                 ...)

Arguments

x, y, subscripts, z

usual arguments to a panel function

rot.mat, distance, shade, light.source, xlim, ylim, zlim, xlim.scaled, ylim.scaled, zlim.scaled, region, col, lty, lwd, alpha, col.groups, polynum, drape, at, xlab, ylab, zlab, xlab.default, ylab.default, zlab.default, aspect, panel.aspect, scales.3d, contour, labels

further arguments passed on to underlying plotting functions

...

Most Locfit arguments can be passed through xyplot.

See Also

Examples

## Not run: 
# a simple multi-panel display
data(ethanol, package="locfit")
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, package="locfit")
xyplot(runs ~ day, data=border, panel=panel.locfit, family="poisson",
 alpha=0.3, cens=border$no)

## End(Not run)

locfit

Local Regression, Likelihood and Density Estimation

v1.5-9.4
GPL (>= 2)
Authors
Catherine Loader [aut], Jiayang Sun [ctb], Lucent Technologies [cph], Andy Liaw [cre]
Initial release
2020-03-24

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.