A method for diagnosis includes receiving a signal associated with respiration of a patient during sleep, and processing the signal to detect occurrences of a pattern corresponding to multiple cycles of periodic breathing. A cumulative duration of the occurrences is computed, and a prognosis of the patient is determined based on the cumulative duration.