Disclosed is an apparatus for treating a respiratory disorder. The apparatus is configured to compute a measure of M-shaped inspiratory flow limitation and a proportion of maximum increase in expiratory positive airway pressure (EPAP) as a function of the measure of M-shaped inspiratory flow limitation. Then the apparatus adjusts the proportion of maximum increase in EPAP dependent on a ratio of breathwise ventilation to typical recent ventilation, and increases an EPAP value according to the computed proportion of maximum increase in EPAP.