Weighted logistic regression models were fitted to the data with the purpose of identifying the most important factors associated with AEs. All of the variables associated with AEs in the univariate analysis as well as age, gender, hospital stay, socioeconomic status, and residence of the patient (metropolitan area vs other states) were initially included in the multivariate model. The final model showed that all selection criteria were associated with the development of AEs (Table 1) and also were strongly related to a protracted hospital stay (ie, for every day of hospitalization, the risk of an AE increased by 4.0% [OR, 1.04; 95% CI, 1.03 to 1.06]). Another strong variable was hospital admission due to pleural disorders or empyema, which almost tripled the risk for an AE (OR, 2.95; 95% CI, 1.4 to 6.4; for empyema, OR, 2.9; 95% CI, 1.3 to 6.6). The risk for an AE was reduced in patients with AIDS HIV (OR, 0.2; 95% CI, 0.04 to 0.6) despite higher in-hospital mortality, and increased in patients residing in the Federal District or in the surrounding state of Mexico compared to those residing in other states (OR, 5.2; 95% CI, 2.9 to 9.3). Socioeconomic status, previous smoking, month of hospital admission, bronchoscopy, thoracic invasive procedure, gender, and age were unrelated to AEs events. In a similar model but excluding the length of hospital stay (because prolongation of the stay is one of the indicators of AEs), we obtained the same significant predictors; in addition, the performance of thoracic surgery or an invasive thoracic procedure increased the risk (OR, 2.2; 95% CI, 1.2 to 4.1). Only one ward had a significantly higher number of AEs (OR, 1.9; 95% CI, 1.1 to 3.5) compared to the remaining eight wards, adjusted by the rest of variables.