Main Content

rstool

Interactive response surface modeling

Syntax

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

Description

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 X, the response data in Y, and the fitted model model. Distinct predictor variables should appear in different columns of X. Y can be a vector, corresponding to a single response, or a matrix, with columns corresponding to multiple responses. Y must have as many elements (or rows, if it is a matrix) as X has rows.

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

  • '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 x2fx.

rstool(x,y,model,alpha) uses 100(1-alpha)% global confidence intervals for new observations in the plots.

rstool(x,y,model,alpha,xname,yname) labels the axes using xname and yname. To label each subplot differently, xname and yname can be string arrays or cell arrays of character vectors.

Examples

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.

Version History

Introduced before R2006a

See Also

| |