Tyson H, Henderson H, McKenna M
Comput Programs Biomed. 1982 Oct;15(2):141-9. doi: 10.1016/0010-468x(82)90066-6.
Weighted least-squares regression has been programmed in Pascal for a microcomputer. A double precision Pascal compiler and the Motorola 6809 assembler produce a fast machine-code program occupying 22,000 bytes of memory when appended to the Pascal run-time module. Large data sets fit in the remaining memory. A regression with 72 observations and 24 parameters runs in 7 min, excluding optional print out of large matrices. The maximum dimensions of the design matrix, X, can be altered by modifying two Pascal constants. Minor changes to the Pascal source program will make it compatible with other Pascal compilers. The program optionally orthogonalises the X matrix to detect linearly-dependent columns in X, and/or generate orthogonal parameter estimates. After orthogonalizing X and fitting the model, the parameter estimates for the original X can be retrieved by the program. Regressions on a repeatedly reduced model are performed through elimination of columns in X until the minimum adequate model is obtained.
加权最小二乘回归已用Pascal语言为微型计算机编写程序。一个双精度Pascal编译器和摩托罗拉6809汇编程序生成一个快速的机器代码程序,当附加到Pascal运行时模块时,该程序占用22,000字节的内存。大型数据集可装入剩余内存。一个包含72个观测值和24个参数的回归分析运行7分钟,不包括大型矩阵的可选打印输出。通过修改两个Pascal常量,可以改变设计矩阵X的最大维度。对Pascal源程序进行微小修改将使其与其他Pascal编译器兼容。该程序可选择对X矩阵进行正交化,以检测X中的线性相关列,和/或生成正交参数估计值。对X进行正交化并拟合模型后,程序可以检索原始X的参数估计值。通过消除X中的列,对反复简化的模型进行回归分析,直到获得最小充分模型。