Determining if points lie on a vertical plane This is slightly related to a recent post of mine. If I am dealing with three-dimensional Cartesian coordinates and have at least three points, how can I easily tell if the best-fit plane to the data points is vertical (or near-vertical) in the $z$ dimension?
My concern is that I have many sets of points and would like to fit a plane to each. In many cases, this is no issue. However, when the points lie on a plane that is vertical, I cannot fit a plane of the form $ax+by+c=z$ (just as I wouldn't be able to fit vertical points in the $xy$-coordinate system with an equation $y=mx+b$). I would like to automatically identify these instances but am not sure the best way to do so.
The very naive solution is to say that if two points have the same $x$ and $y$ coordinates, then the points lie on a vertical plane, but this is a very bad assumption because that one point could be an outlier in an otherwise horizontal plane (for instance). Note that I do not have the equation of the plane in advance, just the data points.

The best solution in my opinion, after thinking about this for some time, is to use total least squares regression instead of ordinary least squares (OLS) regression because this allows for some measure of a best-fit plane without worrying about if the plane is vertical or not. It is of course a different definition than OLS regression, but for my needs it is equally suitable.
