Fits a Response Surface

DESCRIPTION:
Fits a quadratic response surface to an rsm.design object.

USAGE:
rsm.lm(formula, data, response, ...)

REQUIRED ARGUMENTS:
formula:
formula describing the model. If a full response surface model is to be fit, see formula.rsm.lm for a simple method of specifying the formula.

OPTIONAL ARGUMENTS:
data:
if supplied, an rsm.design object in which the variables named in the formula are to be found. If data is omitted, the current search list is used to find the objects in formula; frequently, a data frame will have been attached.
response:
The name of the response. By default, the first variable that is not an rsm.factor in data is used. This argument is used to specify the response when the first argument is a rsm.design (See Details for this calling option).
...:
arguments to be passed to lm.

VALUE:
returns a list of class rsm.lm which inherits from lm. It contains all the components returned by lm. In addition, the following components are returned:
model:
the model frame of the lm fit.
log:
logical vector, of same length as number of factors, describing which variables are on the log scale.
factor.names:
The names of the rsm.factors in the model.
scaledfit:
the result of applying lm to the coded factors.
c.labels:
pretty labels for the terms in the model.

DETAILS:
This function allows a simpler calling sequence than the S-PLUS convention of formula, data. If the first argument is of class rsm.design, this is treated as the data argument. A formula for fitting a quadratic surface is supplied as the default, by formula(data). The response can be specified by the response argument - by default it is the first non-factor in data.

Response surface designs, by convention, are fit with the experimental factors scaled and centered so that the model coefficients are independent. This has the advantage that terms can be dropped from the model without changing the coefficient or t-statistics of the remaining terms. The variables in an rsm.design object are rsm.factors, that carry information about scaling and centering that is used by rsm.lm (the function as.rsm.design will assist in converting a data.frame to an rsm.design object), that is, the factors are centered and scaled for the scaledfit. The rsm.lm object also returns the coefficients for the natural scale of the factors.

If the coded factors are not orthogonal, the coefficients of the model are not independent, although often nearly so.


REFERENCES:
Box, G.E.P. and Draper, N.R (1987), Empirical Model Building and Response Surfaces, New York: Wiley.

Box, G. E. P., W. G. Hunter, J. S. Hunter (1978), Statistics for Experimenters, New York: Wiley.

Haaland, P. D. (1989), Experimental Design in Biotechnology, New York: Marcel Dekker.


SEE ALSO:
lm, rsm.design , formula.rsm.design , as.rsm.design, summary.rsm.lm , pareto.rsm.lm , surface.rsm.lm, contour.rsm.lm , optim.rsm.lm .

EXAMPLES:

abrsm.df #The following two calls are equivalent abrsm.rsm <- rsm.lm(abrsm.df) #the S+DOX convention abrsm.rsm2 <- rsm.lm(TtrVol ~ (RadDos + Prime1)^2 + RadDos^2 + Prime1^2, abrsm.df) #The S-Plus convention summary(abrsm.rsm) pareto(abrsm.rsm) surface(abrsm.rsm) contour(abrsm.rsm) optim(abrsm.rsm)