Fig. 2: Receiver operating characteristic curves for all machine learning models developed and evaluated in the four cohorts.

a PI patients with pneumonia against pneumonia patients without PI (N = 1594; 797 PI cases and 797 controls). b PI patients with pneumonia against randomly selected patients without PI, with and without pneumonia (N = 1594; 797 PI cases and 797 controls). c PI patients with and without pneumonia against randomly selected patients without PI, with and without pneumonia (N = 4624; 2312 PI cases and 2,312 controls). d All PI patients (combined and common variable immunodeficiency patients) with and without pneumonia against randomly selected patients without PI, with and without pneumonia (N = 39,848; 19,924 PI cases and 19,924 controls). Across all cohorts, PI cases and controls were 1:1 matched for age, gender, race, ethnicity, duration of medical history, and the number of healthcare visits. PI: Primary immunodeficiency.