Le Roy Fitting Routines

I am pleased to provide copies of my computer subroutines LLSQF, LLSQFVL and NLLSSRR for performing linear or non-linear least-squares fits. These routines are very efficient, robust and accurate. Subroutine LLSQF is appropriate for linear least-squares (or a single cycle on a non-linear fit) cases in which the data set being treated is of modest size, so that calculating and storing the entire partial derivative array presents no problem. LLSQFVL is essentially identical to LLSQF except that the partial derivatives for each datum are generated and used as they are needed, one at a time, and there is no need to store the entire array. The latter is often more convenient when one is performing many-parameter fits to very large data sets. Supplementary documentation is provided by University of Waterloo Chemical Physics Research Report CP-628, a set of notes about linear and non-linear least-squares fitting which describes the use of subroutines LLSQF and LLSQFVL.

For most practical purposes, routines LLSQF and LLSQFVL have been superceded by a more general linear or non-linear fitting routine called NLLSSRR, which implements iterative convergence for non-linear fits internally, and automatically performs (if desired) the sequential rounding and refitting (SRR) procedure described in the paper "Uncertainty, Precision, Convergence and Rounding in Performing and Reporting Least-Squares Fits", by R.J. Le Roy [J.Mol.Spectrosc. 191, 223-231 (1998)]. This SRR method yields a final set of fitted parameters with minimum numbers of significant digits with no loss of accuracy. Note, however, that while there are detailed comments in the NLLSSRR code which describe its use, report CP-628 have not yet been updated to incorporate a description of NLLSSRR.

The Fortran source code for these routines are automatically distributed (by e-mail) to those who fill in the form: Download Fitting Subroutines . There are no charges associated with distribution or use of this software, but its use should be acknowledged by reference as a private communication from the author and by reference to the above CP Report. Users are also requested NOT to distribute the programs further themselves, but to refer interested parties to this source. I will be pleased to receive information regarding apparent or real malfunctions, but can not promise immediate response.

Queries regarding these notes or use of any of the associated subroutines should be addressed to R.J. Le Roy (519) 888-4051: leroy @ uwaterloo.ca.

Site owned by R.J. Le Roy: leroy @ UWaterloo.ca

This page was last updated on