The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information.... 
Home MathPack Math2 Procedures and Functions MultiLinReg  
See also: SingValDecomp, SingValEquSolve, CalcLinFit, RidgeReg, SimPLS, RidgeRegStd  
MultiLinReg 

The function MultiLinReg calculates the best approximated solution for an overdetermined equation system (more equations than variables). The matrix InData contains the independent variables xi, the vector OutData contains the values of the dependent variable y. The function returns a TRUE value if the result is valid. In this case the coefficients a_{1} to a_{n} of the solution are contained in vector Coeff. Numerical instabilities which may arise from nearsingular equations are indicated by returning a TRUE value in the variable parameter NearSingular. In this case the calculated coefficients should not be used. The vector DeltaCoeff reflects the uncertainties of the estimated parameters in vector Coeff. In order to get the standard deviation of the parameters, DeltaCoeff has to be multiplied by the standard error of the residuals. The standard error can be calculated by
with n = number of rows of InData, k = number of columns of InData, and the Yi being the actual and the estimated OutData. The equation system to be solved can be denoted as follows (the coefficients ai correspond to the parameter Coeff, the values yi are stored in OutData, and the values xij are stored in InData ):
Please note that most often models involve a constant term, i.e.
In order to find a general least squares solution for such systems, you have to formally extend the equation to
with x_{0} = 1. This means that such models can be calculated by adding an extra column to the input data InData, filling this extra column by a constant value of 1.0. The vectors Coeff and DeltaCoeff have to be enlarged by 1 element accordingly.
