Sudhansu Sekhar Mishra, Tarun Rehani, and Nishant Thakur write:
A regulator is a closed-loop feedback system. For the LDO to be stable, the phase margin must be positive. In other words, at unity gain crossover frequency of the gain curve, the phase of the system should be positive. This can be measured using a vector network analyzer. Many voltage regulators are of the fixed output variety and include the voltage divider internal to the regulator. There are definite advantages to this approach, which allows active voltage trimming and also minimizes the physical space required. A disadvantage to this approach is that the voltage divider is not available for gain-phase or “Bode” measurement. This leads many to believe that it is not possible (or even necessary) to evaluate the stability of such a regulator. This is simply not true.
Understand linear regulator stability - [Link]