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.