A Prospective , multicenter , non-inferiority trial was conducted comparing the effectiveness of adaptation to noninvasive mechanical ventilation ( NIMV ) performed in the ambulatory or hospital setting in patients with chronic respiratory failure secondary to restrictive thoracic disease , obesity-hypoventilation syndrome or neuromuscular disease .