Preprint
Article

This version is not peer-reviewed.

Analysis of Household Contact Investigation Data to Inform Development of Clinical Prediction Models for Drug-Resistant Tuberculosis in Rural Eastern Cape, South Africa

Submitted:

08 September 2026

Posted:

10 September 2026

You are already at the latest version

Abstract
Background: Early identification of individuals at heightened risk for drug-resistant tuberculosis (DR-TB) is essential for prioritising rapid diagnostic testing and targeted preventive care, particularly in resource-constrained rural settings. Although routine tuberculosis (TB) surveillance and household contact investigation records provide an accessible data source, their predictive capacity and utility for machine learning-based risk stratification remain under-evaluated. This study evaluated the predictive utility of routine demographic and household contact investigation data for programme-defined risk classification in rural Eastern Cape, South Africa, and identified critical data gaps relevant to the future development of clinically actionable DR-TB prediction models. Methods: A retrospective secondary analysis was conducted using anonymised, routinely collected household contact investigation data from 437 contacts of smear-positive pulmonary TB index cases in King Sabata Dalindyebo Municipality, Eastern Cape. The primary outcome was programme-assigned TB vulnerability classification (high versus low risk), rather than microbiologically confirmed TB or DR-TB. Bivariate analyses and multivariable logistic regression were used to assess factors associated with high-risk classification. Three supervised machine learning algorithms—logistic regression, random forest, and gradient boosting—were evaluated using an 80:20 stratified training–test split and five-fold cross-validation. Model performance was assessed using the area under the receiver operating characteristic curve (AUROC), area under the precision–recall curve (AUPRC), calibration measures, and decision curve analysis. A structured variable-gap assessment identified additional clinical, microbiological, and molecular predictors required for future DR-TB prediction. Results: Of 437 household contacts, 290 (66.4%) were classified as high risk and 147 (33.6%) as low risk. Age was significantly associated with programme-defined risk classification (χ² = 16.61, p = 0.005), whereas sex was not. Children aged 0–4 years had the highest proportion classified as high risk (35/41; 85.4%). In multivariable logistic regression, younger age (adjusted OR [aOR] = 2.41; 95% CI: 1.48–3.94) and larger household size (aOR = 1.12 per additional household member; 95% CI: 1.01–1.25) were independently associated with high-risk classification. Gradient boosting demonstrated the strongest cross-validated performance (AUROC = 0.657, SD = 0.052; AUPRC = 0.785, SD = 0.042), although overall discrimination remained modest. Household-level analyses demonstrated clustering of programme-defined vulnerability. The variable-gap assessment identified important unavailable predictors, including previous TB treatment, HIV status, diabetes, microbiological measures, molecular diagnostic results, and drug-susceptibility information. Conclusions: Routine household contact investigation data provide measurable but limited predictive information for programme-defined TB vulnerability, with age and household size emerging as important baseline factors. However, these data should not be interpreted as directly predicting microbiologically confirmed DR-TB. Development of robust and clinically meaningful DR-TB prediction models in rural African settings will require integration of routine programme data with clinical characteristics, molecular diagnostic results, and drug-susceptibility testing, followed by appropriate internal and external validation.
Keywords: 
;  ;  ;  ;  ;  ;  ;  

1. Introduction

Tuberculosis remains a major global cause of illness and death, with more than 10 million people developing the disease each year, and the burden remains especially high in low- and middle-income countries [1]. South Africa is among the highest-burden settings globally, and this burden is particularly severe in rural Eastern Cape, where poverty, delayed diagnosis, constrained health services, and geographic barriers sustain transmission and worsen outcomes [2,3].
Drug-resistant tuberculosis, especially rifampicin-resistant and multidrug-resistant tuberculosis, further complicates control efforts because it increases diagnostic complexity, prolongs treatment, raises costs, and reduces treatment success [4]. Early identification of patients at elevated risk is therefore a public health priority, yet molecular diagnostics such as Xpert MTB/RIF Ultra, line-probe assays, and culture-based drug susceptibility testing still depend on laboratory systems, trained personnel, and specimen transport that are often limited in rural settings (particularly severe in rural Eastern Cape, where poverty, delayed diagnosis, constrained health services, particularly severe in rural Eastern Cape, where poverty, delayed diagnosis, constrained health services [5]. These constraints can delay confirmation of resistance, contributing to inappropriate treatment initiation, ongoing transmission, and poorer clinical outcomes [2].
Predictive modelling offers one way to support earlier risk stratification before laboratory confirmation [5,6]. Conventional logistic regression and machine-learning approaches can evaluate whether combinations of routinely collected variables identify patients or contacts at increased risk, and prior international work has reported encouraging performance when demographic, clinical, laboratory, and radiological predictors are combined [7,8]. However, most existing models were developed in hospital-based cohorts from Asia or other higher-resource settings, which limits their direct applicability to rural African populations with different epidemiological and health-system conditions [9].
Routine tuberculosis programme data are therefore an important but underused resource for developing locally relevant prediction tools. Because these datasets reflect real-world programme operations, secondary analysis offers a practical and cost-effective way to identify useful baseline predictors, test modelling approaches, and define which additional variables are needed before clinically meaningful prediction models can be built.
Household contact investigation is especially relevant in this context because close contacts of infectious pulmonary tuberculosis face elevated risk of infection and progression to disease [10]. Prior work in the rural Eastern Cape showed that tuberculosis vulnerability clusters within specific households, particularly those with younger contacts and larger household sizes, and that routine demographic variables can achieve modest predictive discrimination using machine-learning methods [11]. These findings provide proof of concept that routine programme data contain measurable predictive value even in resource-limited settings.
This study builds on that foundation but shifts the aim from describing household risk to developing a translational model. Rather than predicting rifampicin resistance directly, the analysis examines whether demographic and household variables available in routine records can provide a methodological and epidemiological foundation for future clinical prediction models of drug-resistant tuberculosis. It also evaluates the strengths and limitations of these routine variables, compares conventional statistical and machine-learning approaches, and identifies the additional clinical, laboratory, and molecular data required to achieve more accurate future predictions.

2. Methods

2.1. Study Design

This study employed a retrospective secondary data analysis of routinely collected household contact investigation records from smear-positive pulmonary tuberculosis index cases in rural Eastern Cape, South Africa. The analysis was designed to determine whether demographic and household variables available within routine tuberculosis programme records could provide a useful methodological and epidemiological foundation for the future development of clinical prediction models for drug-resistant tuberculosis. The study did not attempt to predict rifampicin resistance directly because drug-susceptibility results were not available for household contacts in the source dataset. Instead, the analysis evaluated the predictive value, limitations, and translational relevance of routinely collected programme variables for tuberculosis risk stratification. The secondary analysis extended the original household contact investigation by reframing the dataset around prediction model development, variable utility, model performance, and the identification of additional data elements required for future patient-level prediction of drug-resistant tuberculosis. The source study evaluated demographic predictors, household clustering, risk ranking, and machine learning-based classification of high-risk contacts.

2.2. Study Setting

The study was conducted in the King Sabata Dalindyebo Municipality within the O.R. Tambo District of the Eastern Cape Province, South Africa. The area is predominantly rural and is characterised by a high burden of tuberculosis, household overcrowding, poverty, delayed healthcare access, and constrained diagnostic infrastructure. Tuberculosis services are delivered through primary healthcare clinics and referral hospitals, while routine laboratory testing is largely provided through the National Health Laboratory Service. Household contact investigation in the district is generally initiated after the identification of a smear-positive pulmonary tuberculosis index case, as smear-positive patients are an important source of household transmission. Household contacts are subsequently recorded, screened, and classified according to programme-defined risk criteria.

2.3. Data Source

The analysis used an anonymised dataset derived from routine tuberculosis household contact investigation registers. The dataset comprised 437 household contacts linked to newly diagnosed smear-positive pulmonary tuberculosis index cases. For the purposes of the analysis, each household was defined as one index patient and all documented close contacts residing in the same household. The dataset included information on age, sex, household identifier, household size, screening status, and programme-assigned risk classification. No names, identity numbers, residential addresses, or other directly identifying information were included in the analytical dataset.

2.4. Study Population

The study population comprised household contacts of newly diagnosed smear-positive pulmonary tuberculosis index cases documented in routine programme records during the defined study period.

2.5. Eligibility Criteria

Records were included if the household contact was linked to a documented smear-positive pulmonary tuberculosis index case and had a valid household identifier, recorded age or age category, documented sex, and an available programme-assigned risk classification. Records were excluded when household linkage could not be established, the index case was not documented as smear-positive, essential demographic information was missing, the screening outcome was unavailable, or duplicate or internally inconsistent records could not be resolved.

2.6. Study Variables

The primary analytical outcome was the routine programme-assigned risk classification of each household contact, coded as either high risk or low risk. This classification represented the contact’s programme-defined vulnerability to tuberculosis infection or progression to active disease. It was not interpreted as evidence of microbiologically confirmed tuberculosis or drug-resistant tuberculosis.
Candidate predictor variables were selected according to their availability in the routine dataset and their relevance to tuberculosis transmission and household-contact risk stratification. These variables included age in years, age group, sex, household size, number and proportion of high-risk contacts within each household, household mean age, household age structure, and household-level clustering characteristics.
Age was analysed as both a continuous variable and a categorical variable. The programme-relevant age categories were 0–4, 5–14, 15–24, 25–44, 45–64, and 65 years or older. For selected analyses, age was further classified into three broader groups: children younger than 15 years, youth aged 15–24 years, and adults aged 25 years or older.

2.7. Translational Variables Required for Future Drug-Resistant Tuberculosis Prediction

Because the source dataset did not include drug-resistance outcomes, a structured variable-gap assessment was conducted to assess its suitability for future prediction of drug-resistant tuberculosis. Variables considered important for developing a future prediction model were mapped against those available in the household-contact dataset. These included previous tuberculosis treatment, HIV status, diabetes, body mass index, smoking and alcohol use, symptom duration, smear grade, Xpert MTB/RIF Ultra semi-quantitative bacterial load, rifampicin-resistance results, line-probe assay results, culture-based drug-susceptibility testing results, treatment delay, facility type, and molecular resistance markers. This mapping was aligned with the variables proposed for a future clinical prediction study using linked clinical and National Health Laboratory Service data. The assessment, therefore, identified important data gaps and informed the minimum set of variables required for subsequent model development and validation.

2.8. Data Management and Quality Assessment

Data were inspected for completeness, internal consistency, duplication, and implausible values before analysis. Household identifiers were checked to ensure that contacts were assigned to a single index household. Age values outside plausible ranges were verified against the source dataset where possible. Duplicate records were identified using combinations of household identifier, age, sex, and screening classification.
Missingness was described for each variable. Records missing the primary outcome were excluded from predictive modelling. For variables with limited missingness, complete-case analysis was used. Where continuous predictor values were missing, and the proportion of missingness was low, median imputation was applied within the machine learning pipeline. The potential effect of missing data on model performance was considered when interpreting findings.

2.9. Statistical Analysis

Analyses were conducted at both the individual-contact and household levels.

2.10. Descriptive Analysis

Continuous variables were summarized using means and standard deviations when approximately normally distributed and medians with interquartile ranges when distributions were skewed. Categorical variables were summarized using frequencies and percentages. Characteristics were described for the overall household-contact population and, separately, for contacts classified as high- or low-risk. Household-level analyses were also conducted to describe differing levels of vulnerability. These summaries included the total number of contacts per household, the mean contact age, the proportion of children, the proportion of contacts classified as high risk, and the overall household risk category.

2.11. Bivariate Analysis

Associations between categorical predictors and high-risk classification were assessed using Pearson's chi-square test or Fisher's exact test, where expected cell counts were small. Two-proportion Z-tests were used to compare the representation of individual age groups between high-risk and low-risk categories.
For continuous variables, independent-samples t-tests or non-parametric alternatives were used depending on distributional assumptions. Crude odds ratios with 95% confidence intervals were calculated where appropriate. Statistical significance was defined as a two-sided p-value below 0.05.

2.12. Multivariable Logistic Regression

A multivariable logistic regression model was fitted to identify factors independently associated with high-risk classification. Candidate predictors included age, sex, and household size. Age was assessed in both continuous and categorical forms in separate model specifications. Results were reported as adjusted odds ratios with corresponding 95% confidence intervals and p-values. Multicollinearity among predictor variables was evaluated using correlation matrices and variance inflation factors. For continuous predictors, linearity in the logit was assessed; where this assumption was not supported, clinically meaningful categories or appropriate non-linear functional forms were considered. Model performance and fit were evaluated using the Hosmer–Lemeshow goodness-of-fit test, pseudo- statistics, Akaike information criterion, and calibration plots. Because multiple contacts were nested within households, potential within-household dependence was considered. Where analytically feasible, cluster-robust standard errors or household-level sensitivity analyses were used to assess whether accounting for clustering materially altered the coefficient estimates and their uncertainty.

2.13. Machine-Learning Analysis

Three supervised classification algorithms logistic regression, random forest, and gradient boosting were evaluated for predicting programme-assigned high-risk classification. All models used the same core predictor variables to ensure comparability. The data were divided into an 80% training set and a 20% hold-out test set using stratified partitioning to preserve the outcome distribution. Preprocessing included median imputation of missing continuous values, one-hot encoding of categorical variables, and standardisation of continuous predictors for logistic regression. To prevent data leakage, all preprocessing procedures were fitted using the training data only and subsequently applied to the test data.
Within the training set, five-fold stratified cross-validation was used for model training and hyperparameter tuning. Random forest tuning considered the number of trees, maximum tree depth, minimum number of observations required to split a node, and number of candidate predictors evaluated at each split. For gradient boosting, the tuned parameters included the number of boosting stages, learning rate, maximum tree depth, and minimum number of observations required in each terminal node. Following tuning, the final models were refitted using the complete training set and evaluated once on the previously unseen hold-out test set.

2.14. Model Performance

Model discrimination and classification performance were evaluated using the area under the receiver operating characteristic curve (ROC–AUC), area under the precision–recall curve (PR–AUC), accuracy, sensitivity, specificity, positive predictive value, negative predictive value, balanced accuracy, and F1-score. Because the high-risk category was more prevalent than the low-risk category, PR–AUC was interpreted alongside ROC–AUC to provide a more informative assessment of performance under class imbalance. Model calibration was evaluated using calibration plots, calibration intercept and slope where estimable, and the Brier score. Confusion matrices were generated using the prespecified probability threshold of 0.50 and alternative thresholds selected to prioritise sensitivity, reflecting the importance of minimising missed high-risk household contacts.

2.15. Clinical Utility Assessment

Decision curve analysis was used to evaluate whether prediction-model-guided classification provided a greater net benefit than classifying all contacts as high risk or classifying none as high risk. Net benefit was examined across a range of probability thresholds.
The analysis was interpreted as an assessment of the potential usefulness of routine-variable prediction for prioritising screening and follow-up, rather than as evidence that the model was ready for clinical implementation.

2.16. Household Clustering

A composite household risk score was calculated by combining normalised measures of household size, the proportion of younger contacts, and the proportion of high-risk contacts. Households were ranked according to this score to identify those with relatively greater programme-defined vulnerability. The composite score was used solely for exploratory description and prioritisation and was not interpreted as a validated clinical prediction or diagnostic score.

2.17. Translational Analysis for Drug-Resistant Tuberculosis Prediction

A programme-to-prediction framework was developed to determine how findings from the household-contact dataset could inform the future development of clinical prediction models for drug-resistant tuberculosis (Figure 2). Routine programme variables → predictive performance → variable limitations → future drug-resistance model requirements First, the predictive contribution of available demographic and household variables was quantified. Second, model discrimination, calibration, and clinical utility were assessed. Third, the limitations imposed by the absence of clinical, microbiological, and molecular variables were identified. Finally, the findings were mapped to the proposed future model for rifampicin-resistant tuberculosis using linked clinical and laboratory data.

2.18. Sensitivity Analyses

Sensitivity analyses were conducted to assess the robustness of the regression and machine-learning findings. The regression analyses were repeated with age specified as both a continuous and a categorical variable, and after excluding records in which age had been imputed. Individual-level results were compared with household-level analyses to examine the potential influence of within-household clustering. Model performance was also assessed with and without household size as a predictor. Where outcome imbalance affected classification, class-weighted models were evaluated. Finally, cross-validation performance estimates were compared with those obtained from the independent hold-out test set to assess model stability and potential overfitting.
These analyses were used to evaluate the robustness of the main findings.

2.19. Reporting

The study was reported in accordance with the Strengthening the Reporting of Observational Studies in Epidemiology principles for secondary observational analyses. Prediction-model components were reported with reference to Transparent Reporting of a Multivariable Prediction Model for Individual Prognosis or Diagnosis principles, while recognising that the present analysis was exploratory and did not constitute development of a final clinical model for drug-resistant tuberculosis.

2.20. Ethical Considerations

The study involved secondary analysis of de-identified routine programme data. Ethical approval for the original study was obtained from Guma et al. (2026) under the Walter Sisulu University Human Research Ethics Committee reference number WSU HREC 105/2025, with relevant permissions obtained from the provincial department of health Under Reference number EC_202507_030. This analysis utilized anonymized programmatic data. Ethics clearance was obtained from WSU HREC (105/2025, 09 July 2025) and EC_202507_030 (11 July 2025), in accordance with all national guidelines for secondary data analysis. No contact with patients occurred during the secondary analysis. Data were stored in password-protected files accessible only to authorised members of the research team. All analyses were conducted using de-identified data in accordance with institutional requirements and the Protection of Personal Information Act of South Africa

3. Results

3.1. Study Population

The secondary analysis included 437 household contacts linked to smear-positive pulmonary tuberculosis index cases from rural Eastern Cape. Of these, 290 (66.4%) were classified as high-risk contacts and 147 (33.6%) as low-risk contacts according to routine household contact investigation criteria. The dataset therefore contained approximately twice as many high-risk as low-risk individuals, providing sufficient observations to evaluate demographic predictors and prediction modelling using routinely collected programme variables.

3.2. Demographic Characteristics and Programme Risk Classification

Age demonstrated a significant association with household risk classification (χ² = 16.61, df = 5, p = 0.005), whereas sex showed no statistically significant association (χ² = 0.41, df = 1, p = 0.523). Screening status was similarly not associated with risk classification (χ² = 1.54, df = 1, p = 0.215).
Children represented the most vulnerable demographic group. Among children aged 0–4 years, 35 of 41 (85.4%) were classified as high risk, while 70 of 99 (70.7%) children aged 5–14 years were similarly classified. In contrast, only 66 of 117 (56.4%) adults aged 25–44 years were categorised as high risk. Adults aged 45–64 years and 65 years or older also demonstrated lower proportions of high-risk classification than younger age groups. These findings indicate that programme-defined vulnerability was concentrated among younger household contacts exposed to infectious index cases.

3.3. Age-Specific Differences in Programme Vulnerability

Two-proportion Z-tests further confirmed the disproportionate representation of younger children within the high-risk group.
Children aged 0–4 years were significantly overrepresented among high-risk contacts (Z = 2.706), whereas adults aged 25–44 years were significantly overrepresented within the low-risk category (Z = −2.662). No statistically significant differences were observed among the remaining age groups (5–14 years, 15–24 years, 45–64 years and ≥65 years), suggesting that the greatest programme vulnerability occurred primarily among very young children. From a translational perspective, these findings demonstrate that age is one of the strongest routinely collected programme variables contributing to tuberculosis risk stratification and therefore represents an essential candidate predictor for future clinical models of drug-resistant tuberculosis.

3.4. Independent Predictors of High-Risk Household Classification

Multivariable logistic regression demonstrated that only two routinely collected variables independently predicted household risk classification.
Younger age remained strongly associated with high-risk status after adjustment for household size and sex (adjusted OR = 2.41; 95% CI: 1.48–3.94). Household size also independently increased the likelihood of high-risk classification, with each additional household member increasing the odds by approximately 12% (adjusted OR = 1.12; 95% CI: 1.01–1.25). Sex was not independently associated with programme-defined risk.
These findings suggest that routine demographic information captures important aspects of tuberculosis exposure risk but explains only a limited proportion of household vulnerability.

3.5. Household Clustering of Tuberculosis Vulnerability

Visual network analysis showed marked clustering of programme-assigned high-risk contacts within particular households, rather than an even distribution across the study population. Some households comprised exclusively high-risk contacts, whereas others contained predominantly or exclusively low-risk contacts, demonstrating substantial between-household heterogeneity.
Penalised logistic regression identified several potential hotspot households with elevated odds of high-risk classification. Family 48 had 11 of 11 contacts classified as high risk, while Families 150, 60, and 149 each had 8 of 8 contacts classified as high risk. However, these household-specific estimates were imprecise because the absence of low-risk contacts resulted in complete separation. Conversely, Family 4, with no high-risk contacts among seven household members, had significantly lower odds of high-risk classification (OR = 0.06; 95% CI: 0.01–0.58; p = 0.016). Similarly, Family 181, with no high-risk contacts among five members, showed reduced odds of high-risk classification (OR = 0.08; 95% CI: 0.01–0.93; p = 0.044).
Hierarchical clustering identified three broad household phenotypes: larger households containing numerous younger contacts and consistently high-risk profiles, described as potential hotspot households; mixed-risk households containing both high- and low-risk contacts; and predominantly smaller households with older contacts and largely low-risk profiles. These findings suggest that household membership and household-level characteristics may provide additional information beyond individual demographic variables when identifying patterns of programme-defined tuberculosis vulnerability. However, because the outcome was a programme-assigned risk classification rather than confirmed tuberculosis infection or disease, the identified clusters should be interpreted as programme-vulnerability patterns and not as confirmed transmission hotspots.

3.6. Performance of Routine Programme Variables for Prediction Modelling

The machine-learning models demonstrated that routinely collected demographic and household variables had measurable predictive value, although their overall discriminatory performance was moderate. Gradient boosting achieved the strongest mean cross-validated performance, with an AUROC of 0.657 (SD: 0.052), AUPRC of 0.785 (SD: 0.042), accuracy of 0.675 (SD: 0.026), and F1-score of 0.776 (SD: 0.024). Random forest produced intermediate performance, with an AUROC of 0.632 and accuracy of 0.634. Logistic regression showed the lowest discrimination, with an AUROC of 0.572, although its accuracy of 0.666 was comparable to that of gradient boosting.
Despite gradient boosting's comparatively stronger performance, none of the models achieved high discrimination. The relatively high AUPRC and F1-score should also be interpreted in light of the higher prevalence of the high-risk outcome. Overall, the findings indicate that routine demographic and household variables capture some aspects of programme-assigned tuberculosis vulnerability but are insufficient for reliable individual-level prediction when used alone. Additional clinical, behavioural, microbiological, and health-system variables may be required to improve predictive performance.

3.7. Model Calibration and Potential Clinical Utility

Calibration analysis demonstrated acceptable agreement between predicted and observed probabilities, with a Brier score of 0.21, indicating moderate calibration. Decision curve analysis showed that prediction-guided intervention produced greater net benefit than either treating all contacts or treating none across threshold probabilities ranging from approximately 0.20 to 0.60.
These findings suggest that routine programme variables may assist in prioritising household investigations and preventive interventions, particularly in resource-limited settings, although predictive accuracy remains insufficient for individual clinical decision-making.

3.8. Translational Implications for Future Prediction of Drug-Resistant Tuberculosis

The secondary analysis demonstrated that routinely collected demographic and household variables provide a measurable but incomplete foundation for tuberculosis risk prediction. Age and household size consistently emerged as the strongest predictors across conventional statistical and machine learning approaches, while household-level clustering revealed substantial heterogeneity that would not be captured using individual-level variables alone.
However, the moderate predictive performance achieved by all models (maximum AUROC = 0.657) indicates that routine programme variables alone are unlikely to support accurate prediction of rifampicin-resistant tuberculosis. The absence of critical clinical and laboratory variables including previous tuberculosis treatment, HIV status, diabetes, treatment history, smear grade, Xpert MTB/RIF Ultra bacterial load, rifampicin resistance results, line-probe assay findings, culture-based drug susceptibility testing, and molecular resistance markers represents the principal limitation preventing development of clinically useful drug-resistance prediction models.
Consequently, these findings provide an evidence-based rationale for future studies, which will extend the current modelling framework by integrating demographic information with National Health Laboratory Service molecular diagnostics and clinical programme data to develop and validate patient-level prediction models for rifampicin-resistant tuberculosis in rural Eastern Cape. This progression demonstrates that secondary analysis of routine household investigation data can effectively inform the design, variable selection, and methodological framework of future clinical prediction models for drug-resistant tuberculosis.
Figure 1. Translational analysis of drug resistant tuberculosis prediction.
Figure 1. Translational analysis of drug resistant tuberculosis prediction.
Preprints 232301 g001
This analysis was not used to infer that household risk variables directly predict drug resistance. Instead, it assessed whether routinely collected programme data could support prediction modelling and identified which additional variables would be necessary for clinically meaningful prediction of rifampicin resistance.
The pathway through which the findings from this secondary analysis inform the development of future clinical prediction models for drug-resistant tuberculosis is summarised in Figure 2.
The framework summarizes the available data, findings from the secondary analysis, implications for predictor selection and study design, additional data requirements, and anticipated translational and public health benefits.

4. Discussion

4.1. Routine Household Investigation Data Provide a Valuable Foundation for Prediction Modelling

This secondary analysis demonstrates that routinely collected household-contact investigation data provide a valuable epidemiological and methodological foundation for the future development of clinical prediction models for DR-TB. Although the original household-contact dataset was designed primarily for programme surveillance and contact tracing rather than predictive modelling, re-analysis showed that routinely collected demographic and household variables possess measurable predictive value. Age and household size consistently emerged as the most informative predictors of programme-defined tuberculosis vulnerability, while machine learning algorithms demonstrated that meaningful risk stratification could be achieved using variables already collected within routine tuberculosis control programmes.
These findings highlight the untapped value of programme surveillance datasets beyond descriptive epidemiology. In many high-burden settings, routine data are primarily used for reporting programme performance and monitoring treatment indicators [11,12]. However, advances in statistical learning now enable these same datasets to be repurposed for prediction modelling, allowing programme data to inform future diagnostic innovation and clinical decision support. This approach is particularly attractive in resource-constrained settings because it maximises the use of existing data without requiring immediate investment in expensive prospective cohort studies.

4.2. Age and Household Size Are Robust Predictors of Tuberculosis Vulnerability

Among all routinely collected variables, younger age and larger household size were consistently associated with increased programme-defined tuberculosis risk. A rural Eastern Cape machine-learning analysis also found younger people were roughly 2.4 times more likely to be high-risk, and each extra household member raised the chance of being high-risk by about 12 percent. An Indian household-contact study similarly found higher TB incidence in crowded homes and among younger contacts. In contrast, a South African provincial study noted larger household sizes among subclinical TB cases but did not find age to be a key factor among those aged 5 and older; a Ugandan study found a link between larger families and TB, but this was no longer clear after accounting for other factors. Children younger than five years exhibited the highest proportion of high-risk classification, while an increase in household size independently predicted vulnerability after adjustment for other demographic factors. Multiple studies confirm children under five face the highest risk of rapid TB progression; an Eastern Cape study found children aged 0–4 were most likely to be classed as high-risk, and a systematic review confirmed household crowding independently more than doubled TB risk. By comparison, a facility-based study found confirmed TB appeared more often in children older than five, possibly because younger children are harder to test and may be undercounted. A South African adolescent study also found older youths more likely to be infected, showing age effects differ depending on whether infection or disease is measured. These findings are biologically plausible and consistent with the established epidemiology of tuberculosis transmission.
Young children have immature immune systems, are exposed to infectious household members for prolonged periods, and have an increased likelihood of progression from infection to active disease following exposure [13]. Likewise, larger households increase opportunities for repeated exposure to infectious aerosols, particularly in overcrowded rural homes where ventilation may be poor [14]. Similar associations between childhood exposure, household crowding, and tuberculosis transmission have been reported across high-burden settings in sub-Saharan Africa, Asia, and Latin America [15], reinforcing the external validity of the present findings.
Importantly, the identification of age and household size as consistent predictors suggests that these readily available variables should be retained in future clinical prediction models for DR-TB. Although they are unlikely to predict drug resistance independently, they provide valuable epidemiological information on transmission intensity and exposure risk, thereby providing an important baseline against which additional clinical and laboratory variables can be incorporated.

4.3. Machie Learning Demonstrates Feasibility but Highlights the Limitations of Routine Programme Variables

The exploratory machine learning analyses demonstrated that routinely collected programme variables possess measurable predictive utility but only moderate discriminatory performance. Gradient Boosting achieved the highest predictive accuracy among the evaluated models, outperforming both conventional logistic regression and Random Forest algorithms. Nevertheless, the best-performing model achieved an AUROC of approximately 0.66, indicating only moderate discrimination between high- and low-risk contacts in a study conducted in Central Ethiopia that investigated machine learning approaches to predict the risk of tuberculosis among household contacts of index TB patients. In their study the got an AUC of (0,979) [8]. which is higher than the conducted study; this could indicate differences in available predictors.
This level of performance is not unexpected. Prediction models are fundamentally constrained by the quality and completeness of their input variables. Household-contact datasets primarily capture demographic and exposure-related characteristics but contain little information regarding host immunity, bacterial characteristics, clinical severity, previous treatment history, or molecular mechanisms of drug resistance [16]. Consequently, even sophisticated machine learning algorithms cannot fully compensate for missing biological information [17].
These findings align with broader evidence from predictive medicine, which demonstrates that machine learning generally improves prediction only when informative variables are available [18]. Algorithmic complexity alone rarely produces substantial gains when datasets lack clinically relevant predictors [19]. Therefore, the present analysis supports the use of machine learning within tuberculosis prediction research while simultaneously demonstrating that future gains in predictive performance will depend more on improved data integration than on increasingly complex analytical techniques.

4.4. Household Clustering Demonstrates the Importance of Incorporating Contextual Information

Network analysis and household clustering demonstrated that tuberculosis vulnerability was concentrated within specific families rather than being randomly distributed across the study population. Several households contained exclusively high-risk contacts, whereas others consisted predominantly of low-risk individuals. These findings reinforce the concept that tuberculosis transmission occurs within complex social and environmental contexts rather than solely through individual biological susceptibility [20].
Household clustering provides additional predictive information beyond individual-level characteristics and suggests that future clinical prediction models may benefit from incorporating contextual variables, including household composition, socioeconomic conditions, crowding, ventilation, and prior household tuberculosis history. Such contextual information may improve risk estimation by accounting for transmission intensity that cannot be captured by patient characteristics alone.
Although household clustering itself does not predict drug resistance, it identifies epidemiological environments where transmission is more likely to occur and therefore provides valuable contextual information for future patient-level prediction models [11].

4.5. Secondary Analysis Identified Critical Variables Required for Future Drug-Resistant Tuberculosis Prediction

Perhaps the most important finding of this study is not which variables were statistically significant, but rather which variables were absent. The secondary analysis clearly demonstrated that routine household-contact investigation datasets lack the clinical, microbiological, and molecular information required to accurately predict rifampicin-resistant tuberculosis.
Variables absent from the present dataset include previous tuberculosis treatment, HIV status, diabetes mellitus, symptom duration, smear grade, Xpert MTB/RIF Ultra bacterial load, rifampicin resistance results, line-probe assay findings, culture-based drug susceptibility testing, and molecular resistance mutations. These variables have consistently been identified in previous studies as major determinants of drug-resistant tuberculosis and treatment outcomes [11].
In contrast to previous drug-resistant tuberculosis prediction studies that included broader combinations of demographic, clinical, epidemiological, microbiological, laboratory, and molecular predictors, the present analysis was largely limited to demographic and household-level variables. Previous models had access to clinically and biologically informative variables that are unavailable in the current dataset, such as prior tuberculosis treatment, HIV status, microbiological measures, drug-susceptibility results, and molecular resistance markers [5,21]. This difference in predictor availability is important when interpreting the present model's performance. The maximum AUROC of approximately 0.66 indicates moderate rather than strong discrimination. The limited performance may reflect not only the modelling approaches but also the restricted clinical, microbiological, and molecular information available to the models.
The identification of these data gaps represents a major contribution of the present study because it provides an evidence-based roadmap for future model development. Rather than indiscriminately collecting large numbers of variables, future studies can focus on integrating routine demographic information with clinically relevant laboratory and molecular predictors that are most likely to improve prediction accuracy.

4.6. Translation from Programme Surveillance to Clinical Prediction

A major strength of this secondary analysis is its demonstration that routine surveillance data can be translated into clinically relevant research. Traditionally, household-contact investigation datasets have been analysed primarily to describe tuberculosis transmission patterns and evaluate programme performance [22]. In contrast, the present study illustrates how these same data can inform the design of future prediction models through systematic evaluation of variable utility, predictive performance, methodological considerations, and data limitations.
The proposed programme-to-prediction framework provides a structured pathway linking public health surveillance with clinical prediction modelling. Specifically, the framework demonstrates how routine programme variables can identify candidate predictors, benchmark machine learning performance, expose gaps in existing datasets, and guide the selection of additional clinical and laboratory variables required for more accurate prediction. This translational approach bridges the gap between epidemiological surveillance and precision public health by ensuring that future prediction models are grounded in routinely collected data while incorporating additional biological information where necessary.

4.7. Implications for Future Clinical Prediction Models of Drug-Resistant Tuberculosis

The findings have important implications for the proposed development of clinical prediction models for rifampicin-resistant tuberculosis in rural South Africa. First, demographic variables such as age and household size should be retained as baseline predictors because they consistently contribute to risk stratification. Second, household-level contextual variables should be explored alongside patient-level clinical information to improve model performance. Third, future models should prioritise integration of routinely collected programme data with National Health Laboratory Service laboratory information, including molecular diagnostic results and drug susceptibility testing.
The methodological findings are equally important. The present study demonstrates the feasibility of combining conventional regression with machine learning, cross-validation, calibration assessment, and decision curve analysis within routine tuberculosis datasets. These analytical approaches provide a robust methodological framework for future prediction studies and facilitate transparent comparison between statistical and machine learning methods.
Ultimately, integrating programme surveillance data with laboratory diagnostics has the potential to produce clinically useful decision-support tools capable of identifying patients at increased risk of drug-resistant tuberculosis before confirmatory laboratory results become available. Such tools could support earlier molecular testing, more timely initiation of appropriate therapy, improved allocation of limited diagnostic resources, and strengthened tuberculosis control in rural high-burden settings.

4.8. Strengths and Limitations

The study has several important strengths. It demonstrates a novel application of secondary analysis by repurposing routine household-contact investigation data for developing predictive models rather than for descriptive epidemiology alone. The analysis integrates conventional statistical methods, machine learning, household network analysis, and translational framework development to generate evidence directly applicable to future DR-TB research. Furthermore, because the study utilised routinely collected programme data, its findings reflect real-world tuberculosis control practices in rural South Africa and therefore have considerable practical relevance. Several limitations should also be acknowledged. The source dataset was not originally designed to predict drug-resistant tuberculosis, and consequently important clinical, microbiological, and molecular variables were unavailable. The outcome represented programme-defined household risk rather than microbiologically confirmed tuberculosis or rifampicin resistance, limiting direct clinical interpretation. Household contacts originated from a single rural district, which may reduce the generalisability of the findings to other settings. Machine learning performance should therefore be interpreted as exploratory rather than definitive. Finally, external validation was not performed, and the proposed translational framework remains conceptual until it is evaluated using linked clinical and laboratory datasets that contain confirmed drug-resistance outcomes.

4.9. Conclusions

This secondary analysis demonstrates that routine household-contact investigation data provide substantially greater value than programme reporting alone. While demographic and household variables are insufficient to accurately predict drug-resistant tuberculosis on their own, they provide a robust epidemiological and methodological foundation for future research on clinical prediction. By identifying informative baseline predictors, quantifying predictive performance, exposing critical data gaps, and proposing a structured programme-to-prediction framework, this study establishes a clear translational pathway from routine surveillance to precision tuberculosis care. These findings provide strong justification for future studies integrating routine programme information with clinical, laboratory, and molecular data to develop validated, clinically applicable prediction models for rifampicin-resistant tuberculosis in rural South Africa.

Author Contributions

Conceptualization, L.M., N.S., N.D., and L.F.; Methodology, H.G., S.C., M.M., B.S., N.N., N.S., N.D., and L.F.; Investigation, H.G., S.C., L.M., M.M., B.S., and N.N.; Writing—Original Draft Preparation, L.M.; Writing—Review and Editing, H.G., S.C., M.M., B.S., N.N., N.S., N.D., and L.F.; Supervision, L.F. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding. Institutional support, including staff time and research facilities, was provided by the School of Laboratory Science, Walter Sisulu University.

Data Availability Statement

The data analyzed in this study are available from the corresponding author upon reasonable request. The data are not publicly available due to institutional ethical requirements and the need to protect participant confidentiality.

Acknowledgments

The authors gratefully acknowledge the Honours and Master’s students from the School of Pathology and Laboratory Medicine and members of the WSU-TB Research Group for their valuable assistance and support during the data collection process. The authors also acknowledge Walter Sisulu University for the institutional support that facilitated the conduct of this research. We further thank all colleagues and collaborators whose guidance and contributions supported the successful completion of the study and preparation of the manuscript.

Conflicts of Interest

The authors declare no conflicts of interest.

Declaration of Generative AI Use

During the preparation of this manuscript, the authors used generative artificial intelligence (AI) tools for language editing, text refinement, and citation formatting assistance. The authors reviewed and edited all AI-assisted outputs and take full responsibility for the content of this publication. Generative AI tools were not used to generate, analysed, or interpret the research data.

References

  1. World Health Organization. Global Tuberculosis Report 2023; World Health Organization: Geneva, Switzerland, 2023; Available online: https://www.who.int/publications/i/item/9789240080416 (accessed on 30 August 2026).
  2. Cebisa, M.; Dlatu, N.; Hosu, M.C.; Apalata, T.; Faye, L.M. Multidrug-Resistant Tuberculosis in Rural Eastern Cape, South Africa: Clinical, Bacteriological, and Programmatic Predictors of Poor Treatment Outcomes. Microorganisms 2026, 14, 690. [Google Scholar] [CrossRef] [PubMed]
  3. Faye, L.M.; Hosu, M.C.; Apalata, T. Drug-Resistant Tuberculosis Hotspots in Oliver Reginald Tambo District Municipality, Eastern Cape, South Africa. Infect. Dis. Rep. 2024, 16, 1197–1213. [Google Scholar] [CrossRef] [PubMed]
  4. Tiberi, S.; Utjesanovic, N.; Galvin, J.; Centis, R.; D'Ambrosio, L.; van den Boom, M.; Zumla, A.; Migliori, G.B. Drug Resistant TB–Latest Developments in Epidemiology, Diagnostics and Management. Int. J. Infect. Dis. 2022, 124, S20–S25. [Google Scholar] [CrossRef] [PubMed]
  5. Conham, S.; Sineke, N.; Dlatu, N.; Faye, L.M.; Hosu, M.C.; Apalata, T. Predictive Analysis of Drug-Resistant Tuberculosis: Integrating Molecular Markers, Clinical Governance, and Community-Engaged Education in Rural South Africa. Diseases 2026, 14, 132. [Google Scholar] [CrossRef] [PubMed]
  6. Faye, L.M.; Hosu, M.C.; Dlatu, N.; Iruedo, J.; Apalata, T. Predicting Treatment Adherence in Patients with Drug-Resistant Tuberculosis: Insights from Socioeconomic, Demographic, and Clinical Factors of Patients in the Rural Eastern Cape. Front. Tuberc. 2025, 3, 1659333. [Google Scholar] [CrossRef] [PubMed]
  7. Faye, L.M.; Magwaza, C.; Dlatu, N.; Apalata, T. Exploring Determinants and Predictive Models of Latent Tuberculosis Infection Outcomes in Rural Areas of the Eastern Cape: A Pilot Comparative Analysis of Logistic Regression and Machine Learning Approaches. Information 2025, 16, 239. [Google Scholar] [CrossRef]
  8. Wolde, H.M.; Kebede, W.; Yewhalaw, D.; Abebe, G.; Bae, Y.; Lee, S.W. Machine Learning Approaches to Predict the Risk of Tuberculosis Among Household Contacts of Index TB Patients in Central Ethiopia. Sci. Rep. 2026, 16, 10457. [Google Scholar] [CrossRef]
  9. Ni, X.; Li, Z.; Liu, Y.; Li, X.; Bai, G.; Lu, M.; Yang, Z.; Xu, X.; Zhao, W.; Cheng, K.K.; et al. Socioeconomic Inequalities in Cancer Survival and Access to Health Care Among Children and Adolescents in China, 2018–24: A Prospective Nationwide Cohort Study. Lancet 2026, 407, 237–255. [Google Scholar] [CrossRef]
  10. Tep, S.; Tuot, S.; Cheng, S.; Ung, S.; Guillard, B.; Menh, S.; Choub, S.C.; Huot, C.Y.; Borand, L.; Fox, G.J.; et al. Tuberculosis Disease and Infection Among Household Contacts of Bacteriologically Confirmed vs Unconfirmed Tuberculosis in Cambodia: Considerations for Optimising Contact Investigation and Preventive Treatment. Ann. Med. 2026, 58, 2714685. [Google Scholar] [CrossRef] [PubMed]
  11. Guma, H.; Dlatu, N.; Chitha, W.W.; Apalata, T.; Faye, L.M. Household Clustering of High-Risk Contacts in Smear-Positive TB Patient Families: Evidence for Hotspot Households and Risk Stratification in Rural Eastern Cape. Int. J. Environ. Res. Public Health 2025, 22, 1823. [Google Scholar] [CrossRef] [PubMed]
  12. Sonka, B.; Hosu, M.C.; Dlatu, N.; Makola, T.V.; Faye, L.M. Routine Molecular Surveillance of Drug-Resistant Tuberculosis: Translating Mutation Proxies into Clinical Governance Intelligence in Rural Eastern Cape. Healthcare 2026, 14, 1280. [Google Scholar] [CrossRef] [PubMed]
  13. Caddy, S.L.; van Dorp, L.; Swadling, L.; Wang-Koh, Y.W.; Houldcroft, C.J. Germ Factories or Immune Boot Camps? Infection and Immunity in Childcare Settings. Clin. Microbiol. Rev. 2026, 39, e00253-25. [Google Scholar] [CrossRef] [PubMed]
  14. Zareen, R.; Malik, H.Y. Air Quality and Tuberculosis Transmission: Evaluating Environmental Predictors in Vulnerable Districts of Pakistan. Falcons J. Adv. Res. 2025, 2, 42–59. [Google Scholar] [CrossRef]
  15. Fu, L.; Liu, K.; Sun, Y.; Shu, W.; Ning, Y.; Liu, Y.; Du, J.; Li, L. Global, Regional, and National Burden of Tuberculosis Among Children: A Population-Based Study. Trop. Med. Infect. Dis. 2026, 11, 43. [Google Scholar] [CrossRef] [PubMed]
  16. Pinto, P.F.; Teixeira, C.S.; Ichihara, M.Y.; Rasella, D.; Nery, J.S.; Sena, S.O.; Brickley, E.B.; Barreto, M.L.; Sanchez, M.N.; Pescarini, J.M. Incidence and Risk Factors of Tuberculosis Among 420 854 Household Contacts of Patients with Tuberculosis in the 100 Million Brazilian Cohort (2004–18): A Cohort Study. Lancet Infect. Dis. 2024, 24, 46–56. [Google Scholar] [CrossRef]
  17. Mitra, R.; McGough, S.F.; Chakraborti, T.; Holmes, C.; Copping, R.; Hagenbuch, N.; Biedermann, S.; Noonan, J.; Lehmann, B.; Shenvi, A.; et al. Learning from Data with Structured Missingness. Nat. Mach. Intell. 2023, 5, 13–23. [Google Scholar] [CrossRef]
  18. Grebovic, M.; Filipovic, L.; Katnic, I.; Vukotic, M.; Popovic, T. Machine Learning Models for Statistical Analysis. Int. Arab J. Inf. Technol. 2023, 20, 505–514. [Google Scholar] [CrossRef] [PubMed]
  19. Hu, Y.; Zhang, X.; Slavin, V.; Belsti, Y.; Tiruneh, S.A.; Callander, E.; Enticott, J. Beyond Comparing Machine Learning and Logistic Regression in Clinical Prediction Modelling: Shifting from Model Debate to Data Quality. J. Med. Internet Res. 2025, 27, e77721. [Google Scholar] [CrossRef] [PubMed]
  20. Deol, A.K.; Shaikh, N.; Middelkoop, K.; Mohlamonyane, M.; White, R.G.; McCreesh, N. Importance of Ventilation and Occupancy to Mycobacterium tuberculosis Transmission Rates in Congregate Settings. BMC Public Health 2022, 22, 1772. [Google Scholar] [CrossRef] [PubMed]
  21. Babirye, S.R.; Nsubuga, M.; Mboowa, G.; Batte, C.; Galiwango, R.; Kateete, D.P. Machine Learning-Based Prediction of Antibiotic Resistance in Mycobacterium tuberculosis Clinical Isolates from Uganda. BMC Infect. Dis. 2024, 24, 1028. [Google Scholar] [CrossRef] [PubMed]
  22. Malik, C.; Gupta, V.; Shringarpure, K.; Gupte, H.A.; Shewade, H.D.; Keshri, V.R.; Tripathi, N.; Sonwani, K.; Kalkonde, Y.; Jain, Y. Is Household Contact Investigation a Missing Link for Tuberculosis Care in Chhattisgarh, India?—Operational Research Using Programmatic Data. PLoS Glob. Public Health 2025, 5, e0005246. [Google Scholar] [CrossRef] [PubMed]
Figure 2. Programme-to-prediction framework showing how secondary analysis of routine household contact investigation data informs the future development of clinical prediction models for drug-resistant tuberculosis.
Figure 2. Programme-to-prediction framework showing how secondary analysis of routine household contact investigation data informs the future development of clinical prediction models for drug-resistant tuberculosis.
Preprints 232301 g002
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.