Statistical analysis Descriptive statistics were used to describe patient baseline data. Categorical variables were presented as numbers with percentage proportions, and continuous variables were expressed as mean ± SD if they were normally distributed or as median (IQR) if they were not. Proportions for categorical variables were compared using the χ2 test, Cochran–Mantel–Haenszel χ2 test or Fisher’s exact test. Means of continuous variables were compared using independent group t test when the data were normally distributed. Otherwise, the Wilcoxon rank-sum test was used for medians. For the analysis of mortality, we conducted a univariable Cox regression analysis to assess the effects of age, sex, onset symptoms, past medical history, CRB-65 score, and admission FBG on the 28-day mortality. Variables with p < 0.05 were regarded as potential risk factors and were included in multivariable Cox regression analysis by using the stepwise bidirectional selection (significance level for entry = 0.05, significance level to stay = 0.1). We conducted subgroup analysis by using Kaplan–Meier curves to assess associations between FBG or severity of pneumonia and mortality within 28 days, and tested linear trends across different groups of different FBG levels. Then we carried out a test for interaction of FBG levels and severity of pneumonia and stratified analyses according to severity of pneumonia. Finally, univariable logistic analysis was used to assess the association between different FBG levels and in-hospital complications. A two-sided p value <0.05 was considered to be statistically significant. All statistical analyses were performed using SAS software (version 9.4; USA).