plot.design(x, y, fun = mean, ...)
x
.
See the DETAILS section below.
This function is a method for the generic function
for class design.
It can be invoked by calling
for an object x of the appropriate class, or directly by calling
regardless of the class of the object.
There are two basic styles for calling this method.
If
x
is a design or data frame,
then
y
can select a response variable from the
design or, if
y
is a formula, it can define both terms and response,
relative to the given design.
Conversely, if
x
is not a design, it is assumed to be a formula or
terms object, or something else from which a model frame can be
computed.
Then the design factors and response are determined from that model frame.
The function supplied in the
fun
argument
will be called once for each level of each factor in the design.
A plot will show these summary values.
The levels for a particular factor are shown along a vertical line, and the
overall value of
fun()
for the response is drawn as a horizontal line.
Freeny,A. E. and Landwehr, J. M. (1990). Displays for data from large designed experiments, Computer Science and Statistics: Proceedings of the 22nd Symposium on the Interface. pp 117-126, Springer Verlag.
# draw trimmed means plot.design(catalyst, fun = function(x) mean(x, trim = .05), col = 2) #choose which factors to include in the plot plot.design(Yield ~ Conc + Cat, data = catalyst)