Look up "multi-linear regression", "normal equations", and "least squares".
I want to draw a line of best fit through some data points in 3D space I have made a few attempts such as averaging the slopes and intercepts for each axis from regular, 2D, simple linear regression however none have turned out very well. Google isn't bringing up very much either.
Any suggestions?
Thanks.
-Halty
Normally in 3D you would produce a regression plane, but it makes sense to also ask if we cannot fit a line in the same manner as in 2D. I did a quick Google search. The "Math Doctor" says its the 3D Orthogonal Distance Regression (ODR) line. See the link for more details, or Google ODR for more.
Try the computation process (non-recursive) detailed pages 9-10 in the paper "Regressions et trajectoires en 3D." The link is :I want to draw a line of best fit through some data points in 3D space I have made a few attempts such as averaging the slopes and intercepts for each axis from regular, 2D, simple linear regression however none have turned out very well. Google isn't bringing up very much either.
Any suggestions?
Scribd
The first part of the paper (in English) deals with 3d. orthogonal linear regession.
The second part (still in French) deals with 3d. orthogonal planar regression (which is not in the scope of the present thread).
Wow, very nice. Just took a quick glance and yes this was exactly what I was looking for. Thankyou very much, the work I needed it for is done now but I'll no doubt need it again. I'll take a proper look next week when I'm less busy.
Thanks again.
-Halty