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.
5
votes
least squares is good and proper... but is that a homework? ( phoenix.phys.clemson.edu/tutorials/excel/regression.html I think this is the prime source we used)
- bestsss
no, it's not. Actually it is a feature that I want to add to the estimation of the step length in my thesis (it is related with indoor location games). I have implemented different techniques but none of them is sufficient by itself to correctly estimate the step length so I need to combine them. To do this I need to compute the best weights for each technique which minimize the estimation error.
- andresp
thanks for the link but that page, as far as I could see, only describes the use of least squares for simple linear regression.
- andresp
Not sure this is the best board for your question. Perhaps you should try posting this on MathOverflow.
- Karthik Ramachandran
@andresp, yeah, that's all, not much. wikipedia has some ok articles (and links) on forecasting [ en.wikipedia.org/wiki/Forecasting ] but i've assumed you're already familiar with
- bestsss
2 Answers
5
votes
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/