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(x,y,'model')
allows control over the initial regression model, where 'model'
can be one of the following strings:
'interaction'
- includes constant, linear, and cross product terms
'quadratic'
- includes interactions and squared terms
'purequadratic'
- includes constant, linear and squared terms
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
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',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 dotted white 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 labeled Model to interactively change the model. Use the pop-up menu labeled Export to move specified variables to the base workspace.
Example
See Quadratic Response Surface Models.
See Also
nlintool
![]() | rsmdemo | schart | ![]() |