| Statistics Toolbox | ![]() |
Interactive fitting and visualization of a response surface
Syntax
Description
rstool(x,y)
displays an interactive prediction plot with 95% global confidence intervals. This plot results from a multiple regression of (x,y) data using a linear additive model.
rstool displays a "vector" of plots, one for each column of the matrix of inputs x. The response variable, y, is a column vector that matches the number of rows in x.
rstool(x,y,model)
enables you to control the initial regression model, where model can be one of the following strings:
'linear' - includes constant and first order terms only
'purequadratic' - includes constant, linear and squared terms
'interaction' - includes constant, linear, and cross product terms
'quadratic' - includes interactions and squared terms
Alternatively, model can be a matrix of model terms as accepted by the x2fx function. See x2fx for a description of this matrix and for a description of the order in which terms appear.
plots rstool(x,y,model,alpha)
100(1 - alpha)% global confidence interval for predictions as two red curves. For example, alpha = 0.01 gives 99% confidence intervals.
rstool(x,y,model,alpha,'xname','yname')
labels the graph using the string matrix 'xname' for the labels to the x-axes and the string, 'yname', to label the y-axis common to all the plots.
Drag the dashed blue reference line and watch the predicted values update simultaneously. Alternatively, you can get a specific prediction by typing the value of x into an editable text field. Use the pop-up menu to interactively change the model. Click the Export button to move specified variables to the base workspace.
Example
See Quadratic Response Surface Models.
See Also
| rsmdemo | schart | ![]() |
Learn more about the latest releases of MathWorks products: |
| © 1994-2009 The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |