Construct a grid of factor settings (x, y) and
predicted response (z) values from a
response surface fit.
This is a support function for
contour.rsm.lm,
surface.rsm.lm and
image.rsm.lm
.
USAGE:
grid(rsm.object, gran, vary)
REQUIRED ARGUMENTS:
rsm.object
the output from fitting a response surface using
rsm.lm.
gran
length of the vectors containing the x and y coordinates of the
grid over which the response is evaluated.
vary
a list, with components named by the factors in
rsm.object, that
determines which two factors are varied on the x and y axes while the
remaining factors are held constant. The components corresponding
to the factors to be varied are assigned the value
"v", while
the remaining components are assigned either an explicit numeric
value or the value
"c" to indicate that the factor is to be held
constant at its center point. (If a variable is omitted from
the list,
"c" is assumed.) By default, the first two factors
in
rsm.object are varied.
VALUE:
A list containing the following components:
x,y
the factor values over which the grid is constructed.
z
a vector of predicted response values at the factor
settings (x,y).
xname
name for the x factor.
yname
name for the y factor.
hold.names
names for any other factors in the model which are held fixed.
hold.values
values at which the other factors are held fixed.
DETAILS:
this function is called by
surface.rsm.lm,
contour.rsm.lm and
image.rsm.lm
.