Search code examples
javaregressionlinear-regressionleast-squares

Multiple Regression


In order to combine 3 different estimators of the same variable I need to implement a multiple regression method in Java (therefore 3 independent variables and 1 dependent variable). I'm looking for a simple method (as simple as a multiple regression method can be). From the search I've done, I think the least squares method should probably be an adequate approach but I would like to know if you suggest any other method. Also I wasn't able to find any good documentation regarding the implementation of the least squares method in a multi-variable context, so I would be grateful if you can point me any good information/source that I can use.


Solution

  • Take a look at this library: http://www.ee.ucl.ac.uk/~mflanaga/java/Regression.html

    You will find some source code links in my answer to this question: Weighted Linear Regression in Java

    You can read about the math (with a full example) from this handbook from the University of Delaware: http://udel.edu/~mcdonald/statmultreg.html or from the Statsoft textbook: http://www.statsoft.com/textbook/multiple-regression/