Goshen College Math 351 Class Notes
04 Fitting Models to Data
Find the regression equation from formulas.
Black box approach.
Compare the model to the data graphically.
Compare the model to the data numerically.
Different Criteria
We can choose the best model with respect to different criteria. The first uses the standard minimize the sum of the squared errors: Note that we need to specify an initial guess for the parameters we need to fit, and they are listed in alphabetical order.
The second minimizes the sum of the absolute values of the errors:
The third minimizes the maximum of the absolute values of the errors: Unfortunately, the minimize function does not work very well with this objective function, as can be seen when we add the verbose option.
By thinking of as the value of the objective function, we can rewrite this optimization problem as a linear program: c is the vector of coefficients in the objective function, G is the matrix of coefficients on the left hand side of the inequalities, and h is the vector of coefficients on the right hand side of the inequalities. RDF indicates that we want the elements to be considered approximate real numbers (to double precision).
In summary, The different criteria do not lead to very different equations.
Transformations
The following data is the 1976 Montreal Olympic Games winning total lifts (snatch and jerk) and maximum allowable lifter weight for each bodyweight class. All data are in units of pounds and are accurate to 0.1 pound although an individual lifter in a particular class need not weigh the maximum weight.
If the model is of the form , then a plot of versus such look like a straight line.
If the model is of the form , then a plot of versus should look like a straight line.
If the model is of the form , then a plot of versus should look like a straight line.
Compare the model to the data graphically.