Contenido principal

Response Surface Tool

Interactive response surface modeling

Description

The Response Surface tool allows you to interactively investigate one-dimensional contours of multidimensional response surface models. By default, the tool opens with the cement mixture 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. The tool plots a 95% simultaneous confidence band for the fitted response surface model as two dashed red curves. The text box below each plot displays the predictor value, which appears as a vertical dotted blue line in the plot. The corresponding response value, which appears to the left of the plots, is indicated by a horizontal dashed blue line.

Required Products

  • MATLAB®

  • Statistics and Machine Learning Toolbox™

Prediction Plot of Interactions Model

Open the Response Surface Tool

  • At the MATLAB command prompt, enter rstool.

Examples

expand all

Use the Response Surface tool to visualize a quadratic response surface model of the 3-D chemical reaction data in reaction.mat. Use 100(1-alpha) % simultaneous confidence intervals, and label the plot axes using xn (the reactant names) and yn ("Reaction Rate").

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

Figure Prediction Plot of Full Quadratic Model contains 3 axes objects and other objects of type uicontrol. Axes object 1 contains 5 objects of type line. Axes object 2 contains 5 objects of type line. Axes object 3 contains 5 objects of type line.

The software displays plots of the fitted response against each predictor. The solid green curve shows the predicted response for that predictor when the other predictor values are fixed. You can change the fixed values by entering new values in the text boxes, or by dragging the vertical lines in the plots to new positions. When you change the value of a predictor, the software updates all plots to display the model at the new point in the predictor space. The dashed red lines indicate the 99% confidence bounds.

The Response Surface tool interface is used by the Response Surface Demonstration Tool to visualize the results of simulated experiments with data similar to the data in reaction.mat. As described in Response Surface Designs, the Response Surface Demonstration Tool uses a response surface model to generate simulated data at combinations of predictors that are user specified or created by a designed experiment.

Programmatic Use

rstool opens the Response Surface tool with the cement mixture data from hald.mat and a fitted response surface model with constant, linear, and interaction terms.

rstool(X,Y) opens the Response Surface tool and displays a linear model fit to the predictor data X and response data Y. Dashed red curves show 95% simultaneous confidence bounds for the function. 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.

rstool(X,Y,modelspec) opens the Response Surface tool and displays the fitted model specified by modelspec. The available values of modelspec are:

  • "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

Alternatively, modelspec can be a matrix specifying polynomial terms of arbitrary order. In this case, modelspec must have one column for each column in X and one row for each term in the model. The entries in any row of modelspec are powers for the corresponding columns of X. For example, if X has columns X1, X2, and X3, then a row [0 1 2] specifies the term (X1.^0).*(X2.^1).*(X3.^2). A row of all zeros in modelspec specifies a constant term, which can be omitted.

rstool(X,Y,modelspec,alpha) uses 100(1-alpha)% simultaneous confidence intervals for new observations in the plots.

rstool(X,Y,modelspec,alpha,xname,yname) labels the plot axes using xname and yname. To label each plot differently, specify xname and yname as string arrays or cell arrays of character vectors.

Tips

  • Use the menu at the lower left of the Response Surface tool window 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 save information about the fit to MATLAB workspace variables with valid names.

    Export to Workspace dialog box

  • Click OK to close the window.

Version History

Introduced before R2006a