The duration of invasive mechanical ventilation and total duration of mechanical ventilation , ICU length of stay , the incidence of ventilator-associated pneumonia ( VAP ) , and mortality rate were compared between the two groups .