nlintool
Interactive nonlinear regression
Syntax
nlintool(X,y,fun,beta0)
nlintool(X,y,fun,beta0,alpha)
nlintool(X,y,fun,beta0,alpha,'xname','yname')
Description
nlintool(X,y,fun,beta0)
is a graphical user interface to thenlinfit
function, and uses the same input arguments. The interface displays plots of the fitted response against each predictor, with the other predictors held fixed. The fixed values are in the text boxes below each predictor axis. Change the fixed values by typing in a new value or by dragging the vertical lines in the plots to new positions. When you change the value of a predictor, all plots update to display the model at the new point in predictor space. Dashed red curves show 95% simultaneous confidence bands for the function.
nlintool(X,y,fun,beta0,alpha)
shows100(1-alpha)
% confidence bands. These are simultaneous confidence bounds for the function value. Using theBoundsmenu you can switch between simultaneous and non-simultaneous bounds, and between bounds on the function and bounds for predicting a new observation.
nlintool(X,y,fun,beta0,alpha,'xname','yname')
labels the plots using the character matrix or string array'xname'
for the predictors and the character vector or string scalar'yname'
for the response.
Examples
The data inreaction.mat
are partial pressures of three chemical reactants and the corresponding reaction rates. The functionhougen
implements the nonlinear Hougen-Watson model for reaction rates. The following fits the model to the data:
负载反应nlintool(反应物、速率、@hougenβ,0.01,xn,yn)