Interactive nonlinear regression
nlintool(X,y,fun,beta0) is a graphical user interface to the nlinfit 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) shows 100(1-alpha)% confidence bands. These are simultaneous confidence bounds for the function value. Using the Bounds menu you can switch between simultaneous and non-simultaneous bounds, and between bounds on the function and bounds for predicting a new observation.
The data in reaction.mat are partial pressures of three chemical reactants and the corresponding reaction rates. The function hougen implements the nonlinear Hougen-Watson model for reaction rates. The following fits the model to the data:
load reaction nlintool(reactants,rate,@hougen,beta,0.01,xn,yn)