Useful Prepanel Function for Lattice
These are predefined prepanel functions available in Lattice.
prepanel.lmline(x, y, …) prepanel.qqmathline(x, y = x, distribution = qnorm, probs = c(0.25, 0.75), qtype = 7, groups, subscripts, …) prepanel.loess(x, y, span, degree, family, evaluation, horizontal = FALSE, …) prepanel.spline(x, y, npoints = 101, horizontal = FALSE, …, keep.data = FALSE)
- x, y
x and y values, numeric or factor
quantile function for theoretical distribution. This is automatically passed in when this is used as a prepanel function in
numeric vector of length two, representing probabilities. If used with
aspect="xy", the aspect ratio will be chosen to make the line passing through the corresponding quantile pairs as close to 45 degrees as possible.
- span, degree, family, evaluation
Arguments controlling the underlying
- horizontal, npoints
See documentation for corresponding panel function.
Ignored. Present to capture argument of the same name in
- groups, subscripts
xyplot. Whenever appropriate, calculations are done separately for each group and then combined.
Other arguments. These are passed on to other functions if appropriate (in particular,
smooth.spline), and ignored otherwise.
All these prepanel functions compute the limits to be large enough to contain all points as well as the relevant smooth.
prepanel.lmline computes the
dy such that it reflects the slope of the linear regression
prepanel.qqmathline, this is the slope of the line
passing through the quantile pairs specified by
dy reflect the piecewise slopes of the nonlinear smooth.
usually a list with components
dy, the first two being used to calculate panel axes limits,
the last two for banking computations. The form of these components
are described under
xyplot. There are also several
prepanel functions that serve as the default for high level functions,