The ConvergenceTest option allows the user to control when the fit is considered to have converged. It only has meaning when the data have declared errors in both coordinates and the default Brent minimisation has either been turned off or the fit is not to a straight line.
The default setting for the option is Automatic. In this case the fit is declared to have converged when either of the following conditions are true:
For example, we fit some synthetic data by Pearson and York to a straight line, and use the capability to later view the progress of the fit from the Fit Results screen by choosing the Progress of Mathematica during the computation button to monitor the fit. We have also set the Brent option discussed above to False. Here is a summary of what the fitter reported about its own progress:
10 data points, each with 4 variables. Iteration 1 using SingularValues. Chi-squared = 34.1661 Parameter values: {6.09873, -0.610542} Calculated effective variance: {1.00019, 0.746249, 0.500744, 0.354659, 0.228121, 0.234169, 0.143571, 0.181761, 0.465955, 0.612198} Iteration 2 using SingularValues. Chi-squared = 10.6139 Parameter values: {5.39787, -0.464026} Calculated effective variance: {1.00011, 0.746144, 0.50043, 0.354381, 0.22639, 0.229929, 0.134122, 0.158636, 0.360051, 0.466203} Iteration 3 using SingularValues. Chi-squared = 11.9079 Parameter values: {5.39669, -0.463556} Calculated effective variance: {1.00011, 0.746144, 0.500429, 0.35438, 0.226385, 0.229917, 0.134095, 0.158567, 0.359714, 0.465735} Iteration 4 using SingularValues. Chi-squared = 11.9128 Parameter values: {5.39673, -0.463563} Calculated effective variance: {1.00011, 0.746144, 0.500429, 0.35438, 0.226385, 0.229917, 0.134095, 0.158568, 0.359719, 0.465742} Iteration 5 using SingularValues. Chi-squared = 11.9128 Parameter values: {5.39673, -0.463563} Calculated effective variance: {1.00011, 0.746144, 0.500429, 0.35438, 0.226385, 0.229917, 0.134095, 0.158568, 0.359719, 0.465742} Calculating covariance matrix. Adjusting significant figures of parameters. |
The values returned by the fitter are:
A0 = 5.40 ± 0.30 A1 = -0.464 ± 0.058 Chi Squared = 11.9128 |
Say we decide that the convergence test will be when the maximum change in the values of the fitted parameters is less than 10% of those of the previous iteration. Then we set the form as follows:
The convergence test field above reads Max[Abs[1 - values/oldvalues]] < 0.10, which you may confirm by clicking in the box and scrolling back and forth with the arrow keys on your keyboard.
Repeating the fit gives the following progress report:
10 data points, each with 4 variables. Iteration 1 using SingularValues. Chi-squared = 34.1661 Parameter values: {6.09873, -0.610542} Calculated effective variance: {1.00019, 0.746249, 0.500744, 0.354659, 0.228121, 0.234169, 0.143571, 0.181761, 0.465955, 0.612198} Iteration 2 using SingularValues. Chi-squared = 10.6139 Parameter values: {5.39787, -0.464026} Calculated effective variance: {1.00011, 0.746144, 0.50043, 0.354381, 0.22639, 0.229929, 0.134122, 0.158636, 0.360051, 0.466203} Iteration 3 using SingularValues. Chi-squared = 11.9079 Parameter values: {5.39669, -0.463556} Calculated effective variance: {1.00011, 0.746144, 0.500429, 0.35438, 0.226385, 0.229917, 0.134095, 0.158567, 0.359714, 0.465735} Calculating covariance matrix. Adjusting significant figures of parameters. |
This time LinearFit has decided that the fit converged after three iterations, instead of the five iterations before. The fit parameters are, within the significant figures displayed, identical with the previous fit.
This help document is Copyright © 1999 David M. Harrison. The sample screens are Copyright © 1999 Solomon R.C. Douglas and David M. Harrison. This is version 1.1 of the help document, date (m/d/y) 11/25/99.