coplot
function produces a Conditioning Plot in the current
graphics device which shows how a response depends on a predictor
given another predictor.
coplot(formula, data, given.values, panel = points, rows, columns, column.row, show.given = T, add = F, xlab, ylab, xlim, ylim, ...)
coplot
.
x
and
y
that
determines the method of plotting on the dependence panels.
k
be the number of given values; if
columns
is missing,
then it is
ceiling(sqrt(k))
and otherwise it is
ceiling(k/columns)
.
This argument is not used if there are two given predictors.
k
be the number of given values; if
rows
is missing,
it is
ceiling(k/ceiling(sqrt(k)))
and otherwise it is
ceiling(k/rows)
.
This argument is not used if there are two given predictors.
c(n,m)
where
n
and
m
are integers indicating
the number of columns and rows, respectively for the arrangement
of the dependence panels. The default
is given by the arguments
columns
and
rows
which are overriden
by this argument, if specified.
FALSE
, given panels are not included.
TRUE
, add to the current plot.
Graphical parameters may also be supplied as arguments to
this function (see
).
The arguments
xlab
and
ylab
are as for other graphics functions, except that the
former is a character vector of labels for predictors. If
the elements have names, they are matched to the names in
formula; if not, the elements are assigned, in order,
according to the order in which they appear in formula. If
missing, the names of the predictors in formula are used.
The arguments
xlim
and
ylim
are axis limits as in other
graphics functions.
par(mfrow)
is
reset to
c(1,1)
before the plot is drawn, that is, the plot will
take up the entire graphics area; no other plot can appear at the same
time.
coplot
does not recognize graphics parameters if the
panel
argument is
suppled as a function definition (i.e.,
panel=function(x,y)...
). In
this case, you must supply the graphics parameters in the definition of
the
panel
function.
# the following makes a coplot of NOx against C given E # with smoothings of the scatterplots on the dependence panels: E.intervals <- co.intervals(ethanol$E, 16, 0.25) coplot(NOx ~ C | E, given.values = E.intervals, data = ethanol, panel = function(x, y) panel.smooth(x, y, span = 1, degree = 1))