rsm {rsm}R Documentation

Response-surface regression

Description

Fit a linear model with a response-surface component, and produce appropriate analyses and summaries.

Usage

rsm (..., data)
## S3 method for class 'rsm':
summary (object, ...)
## S3 method for class 'summary.rsm':
print(x, ...)
loftest (object)

Arguments

... In rsm, arguments that are passed to lm. The model must include an FO() or SO() term.to define the response-surface portion of the model.
In summary, and print, additional arguments are passed to their generic methods.
data Optional data.frame as in lm. This could also be a coded.data object, in which case additional information is included in subsequent summaries.
object An object of class rsm
x An object produced by summary

Details

In rsm, the model formula must contain at least an FO term; optionally, you can add a TWI() term and/or a PQ() term as well (use the same variables in each!). For convenience, specifying SO() is the same as including FO(), TWI(), and PQ(), and is the safe, preferred way of specifying a full second-order model.

Value

rsm returns an rsm object, which is a lm object with additional members as follows:

order The order of the model: 1 for first-order, 1.5 for first-order plus interactions, or 2 for a model that contains square terms.
b The first-order response-surface coefficients.
B The matrix of second-order response-surface coefficients, if present.
labels Labels for the response-surface terms. These make the summary much more readable.
coding Coding formulas, if data is a coded.data object.
sa Unit-length vector of the path of steepest ascent (first-order models only).
canonical Canonical analysis (second-order models only). This is a list with elements xs, the stationary point, and eigen, the eigenanalysis of B (see above).
lof ANOVA table including lack-of-fit test.
coding Coding formulas in parent rsm object.

Its print method shows the regression summary, followed by an ANOVA and lack-of-fit test. For first-order models, it shows the direction of steepest ascent, and for second-order models, it shows the canonical analysis of the response surface.
loftest returns an anova object that tests the fitted model against a model that interpolates the means of the response-surface-variable combinations.

Author(s)

Russell V. Lenth

See Also

FO, SO, lm, summary, coded.data

Examples

library(rsm)
CR = coded.data (ChemReact, x1~(Time-85)/5, x2~(Temp-175)/5)

### 1st-order model, using only the first block
CR.rs1 = rsm (Yield ~ FO(x1,x2), data=CR, subset=1:7) 
summary(CR.rs1)

### 2nd-order model, using both blocks
CR.rs2 = rsm (Yield ~ Block + SO(x1,x2), data=CR) 
summary(CR.rs2)

[Package rsm version 1.11 Index]