Rovati G E
Institute of Pharmacological Sciences, University of Milan, Italy.
Comput Methods Programs Biomed. 1990 Jun;32(2):161-7. doi: 10.1016/0169-2607(90)90097-s.
The present report describes a weighted nonlinear least-squares minimization routine for fitting a wide variety of functions nonlinear in the parameters. The minimization routine is implemented in MacMATLAB, the Macintosh microcomputer version of MATLAB, an interactive program for scientific numeric calculations. Our algorithm makes use of a subroutine that estimates the required derivatives numerically, avoiding the need to differentiate the function under study analytically. We have also implemented two specific subroutines to integrate ordinary differential equations numerically. Therefore, in principle, any kind of nonlinear function can be fitted to a given set of data. The program only requires that the user writes the appropriate equation in a specific subroutine, thus relieving one from knowing and using any 'low-level' code. Other features of the program are: (a) the possibility of using weight to correct for nonuniformity of variance by flexible specification of the error structure; (b) the possibility of checking the parameter values and the residual variance at each iteration; and (c) by the use of the graphic capabilities of MacMATLAB, the possibility of following the improvement of the fitting graphically. One example of nonlinear functions and one example of linear differential equation together with their respective 'function file' and illustrative data are presented to demonstrate the flexibility of our approach and the power of the method used.
本报告描述了一种加权非线性最小二乘最小化程序,用于拟合参数非线性的各种函数。该最小化程序在MacMATLAB中实现,MacMATLAB是MATLAB的苹果机微机版本,是一个用于科学数值计算的交互式程序。我们的算法利用了一个通过数值估计所需导数的子程序,避免了对所研究函数进行解析求导的需要。我们还实现了两个特定的子程序来对常微分方程进行数值积分。因此,原则上任何类型的非线性函数都可以拟合到给定的一组数据。该程序只要求用户在一个特定的子程序中编写适当的方程,从而使用户无需了解和使用任何“低级”代码。该程序的其他特点包括:(a) 通过灵活指定误差结构使用权重来校正方差的不均匀性;(b) 在每次迭代时检查参数值和残差方差的可能性;以及 (c) 通过使用MacMATLAB的图形功能,以图形方式跟踪拟合改进的可能性。给出了一个非线性函数的例子和一个线性微分方程的例子,以及它们各自的“函数文件”和说明性数据,以展示我们方法的灵活性和所用方法的强大功能。