# Multiple linear regression

Multiple linear regression 1.25 Authors: Amine Moulay Ramdane

Email: aminer@videotron.ca

Description:

Multiple linear regression that uses SIMD SSE2 instructions and that implements the following mathematical theorem:

If A is an m x n rank n matrix, then the least-squares solutions to the system A*vector(X) = vector(C) are the solutions to the system:

A*vector(X)=

A*inverse(transpose(A)*A))*transpose(A)*vector(C).

This system has the following unique solution:

vector(X) = inverse(transpose(A)*A)*transpose(A)*vector(C)

I have updated my multiple linear regression program to support SEE (Standard Error of the Estimate), the "SEE" is important in quality control, the interpretation of SEE is similar to standard deviation's "68-95-99 rule", that is, 68% of the time the predicted score will fall plus-or-minus 1 x SEE of the actual score based on the regression equation, 95% of the time the predicted score will fall plus-or-minus 2 x SEE , and 99% of the time the predicted score will fall plus-or-minus 3 x SEE.

So my Multiple linear regression program does show the multiple regression equation that approximate the statistical data and it calculates and shows the Coefficient of determination R^2 and it calculates and shows the Standard Error of the Estimate.

I have also included a Matrix library called LinMath that uses SIMD SSE2 instructions and that is multithreaded, LinMath was derived fom mrmath Matrix library by Rabatscher Michael and modified to become compatible with both FreePascal and Delphi.

LinMath is offered under the licence agreement described on:

http://www.mrsoft.org/

Please note that the example inside the "test.pas" inside the zip file have a mathematical function of 4 variables as:

a5:=f(a1,a2,a3,a4)

but notice that if you are using a mathematical function of 4 variables as in my example inside the test.pas source code, the 5th variable inside the mat2 matrix must be always 1, this is how my solver works, but if you have a mathematical function of 2 variables the 3th variable inside the mat2 matrix must be always 1 , please take a look at the source code inside the "test.pas" example and you will understand , it's really easy to work with my multiple linear regression solver.

Language: FPC Pascal v2.2.0+ / Delphi 7+: http://www.freepascal.org/

Operating Systems: Windows.

Required FPC switches: -O3 -Sd

-Sd for delphi mode....

Required Delphi switches: -\$H+

Please click on the small arrow on the right of the zip file bellow to download...