Is there a Mathematica routine for the best least squares fit of an m-dimension multiplane to a set of data points in n-dimensional space? The method of Karl Pearson works in such a way that the m-dimensional fit is defined by m+1 points and by dropping the last point we have the best (m-1)-multiplane fit and so on until the first point gives the centroid of the data points.