## Documentation Center |

Interactive response surface modeling

`rstoolrstool(X,Y,model)rstool(x,y,model,alpha)rstool(x,y,model,alpha,xname,yname)`

`rstool` opens a graphical
user interface for interactively investigating one-dimensional contours
of multidimensional response surface models.

By default, the interface opens with the data from `hald.mat` and
a fitted response surface with constant, linear, and interaction terms.

A sequence of plots is displayed, each showing a contour of
the response surface against a single predictor, with all other predictors
held fixed. `rstool` plots a 95% simultaneous confidence
band for the fitted response surface as two red curves. Predictor
values are displayed in the text boxes on the horizontal axis and
are marked by vertical dashed blue lines in the plots. Predictor values
are changed by editing the text boxes or by dragging the dashed blue
lines. When you change the value of a predictor, all plots update
to show the new point in predictor space.

The pop-up menu at the lower left of the interface allows you to choose among the following models:

`Linear`— Constant and linear terms (the default)`Pure Quadratic`— Constant, linear, and squared terms`Interactions`— Constant, linear, and interaction terms`Full Quadratic`— Constant, linear, interaction, and squared terms

Click **Export** to open the following dialog
box:

The dialog allows you to save information about the fit to MATLAB^{®} workspace
variables with valid names.

`rstool(X,Y,model)` opens
the interface with the predictor data in

The optional input * model* can be any
one of the following strings:

`'linear'`— Constant and linear terms (the default)`'purequadratic'`— Constant, linear, and squared terms`'interaction'`— Constant, linear, and interaction terms`'quadratic'`— Constant, linear, interaction, and squared terms

To specify a polynomial model of arbitrary order, or a model
without a constant term, use a matrix for * model* as
described in

`rstool(x,y,model,alpha)` uses

`rstool(x,y,model,alpha,xname,yname)` labels
the axes using the strings in

The following uses `rstool` to visualize
a quadratic response surface model of the 3-D chemical reaction data
in `reaction.mat`:

load reaction alpha = 0.01; % Significance level rstool(reactants,rate,'quadratic',alpha,xn,yn)

The `rstool` interface is used by `rsmdemo` to visualize the results of simulated
experiments with data like that in `reaction.mat`.
As described in Response Surface Designs, `rsmdemo` uses
a response surface model to generate simulated data at combinations
of predictors specified by either the user or by a designed experiment.

Was this topic helpful?