We have developed the Modelfit package for doing least-squares fitting of data with uncertainties in X and Y. The computational core of this package has been used for over a decade in our physics course. The basis is the Levenberg/Marquardt algorithm from Bevington along with an algorithm for iteratively incorporating the uncertainties in X (M. Lybanon, Am. J. Phys, 52, 22-26, 1984). We have turned this into a DLL subroutine library that can be called from essentially any programming package (Visual Basic/C++/Fortran, Excel, etc.).
In particular, we have written a macro package for Sigmaplot that allows users to easily fit and plot their data sets. This combines the high-quality plotting ability of Sigmaplot with a computational core that correctly fits data sets with uncertainties in X and Y directions. With a few minor changes in the Sigmaplot macro files, this can be easily incorporated into the Sigmaplot menu structure. This Modelfit package is currently being used by a large range of students and has been found to be quite easy for the students to use.
Thomas Huber and
Steven Mellema
Physics Department
Gustavus Adolphus College
St. Peter, MN 56082
March 27, 2002