Curve Fitting Toolbox    

Fitting the Data

You fit data with the Fitting GUI. You open this GUI by clicking the Fitting button on the Curve Fitting Tool. The Fitting GUI consists of two parts: the Fit Editor and the Table of Fits. The Fit Editor allows you to

The Table of Fits allows you to

The Data Fitting Procedure

For this example, begin by fitting the census data with a second degree polynomial. Then continue fitting the data using polynomial equations up to sixth degree, and a single-term exponential equation.

The data fitting procedure follows these general steps:

  1. From the Fit Editor, click New Fit.
  1. Note that this action always defaults to a linear polynomial fit type. You use New Fit at the beginning of your curve fitting session, and when you are exploring different fit types for a given data set.

  1. Because the initial fit uses a second degree polynomial, select quadratic polynomial from the Polynomial list. Name the fit poly2.
  2. Click the Apply button or select the Immediate apply check box. The library model, fitted coefficients, and goodness of fit statistics are displayed in the Results area.
  3. Fit the additional library equations.
  1. For fits of a given type (for example, polynomials), you should use Copy Fit instead of New Fit because copying a fit retains the current fit type state thereby requiring fewer steps than creating a new fit each time.

The Fitting GUI is shown below with the results of fitting the census data with a quadratic polynomial.

The data, fit, and residuals are shown below. You display the residuals as a line plot by selecting the menu item View->Residuals->Line plot from the Curve Fitting Tool.

The residuals indicate that a better fit may be possible. Therefore, you should continue fitting the census data following the procedure outlined in the beginning of this section.

The residuals from a good fit should look random with no apparent pattern. A pattern, such as a tendency for consecutive residuals to have the same sign, can be an indication that a better model exists.

When you fit higher degree polynomials, the Results area displays this warning:

The warning arises because the fitting procedure uses the cdate values as the basis for a matrix with very large values. The spread of the cdate values results in scaling problems. To address this problem, you can normalize the cdate data. Normalization is a process of scaling the predictor data to improve the accuracy of the subsequent numeric computations. A way to normalize cdate is to center it at zero mean and scale it to unit standard deviation.

To normalize data with the Curve Fitting Tool, select the Center and scale X data check box.


  Importing the Data Determining the Best Fit