1- Center for Healthcare Data Modeling, Departments of Biostatistics and Epidemiology, School of Public Health, Shahid Sadoughi University of Medical Sciences, Yazd, Iran
2- Center for Healthcare Data Modeling, Departments of Biostatistics and Epidemiology, School of Public Health, Shahid Sadoughi University of Medical Sciences, Yazd, Iran , statlearningeasy@gmail.com
3- Rahbar Medical and Dental College, Lahore Pakistan
Full-Text [PDF 434 kb]
(700 Downloads)
|
Abstract (HTML) (706 Views)
Full-Text: (29 Views)
| |
Tutorial on Methods to Adjust for Confounding Variable in Medical Research |
|
Muhammad Ajmal Dina 1
, Farzan Madidadizadeh 1
, Anam Arshed 2
1. Center for Healthcare Data Modeling, Departments of Biostatistics and Epidemiology, School of Public Health, Shahid Sadoughi University of Medical Sciences, Yazd, Iran
2. Rahbar Medical and Dental College, Lahore Pakistan
| ARTICLE INFO |
|
ABSTRACT |
Review Article
Received: 12 Nov 2024
Accepted: 30 Apr 2025 |
|
Background: Confounders can distort the actual connection between exposure and outcome, resulting in skewed results. In research, it is essential to account for confounding variables to preserve the validity of causal inferences.
Methods: In this narrative review study, all statistical methods for adjusting confounding variable such as standardization, propensity score, stratification, restriction, statistical model for control, matching, randomization were reviewed.
Results: The five most important methods were reviewed.
Conclusion: Adequate adjustment improves the internal validity of findings and elucidates the relationships among variables, underscoring the importance of a comprehensive analysis of confounding for trustworthy research results.
Keywords: Confounding variable, Adjustment, Statistical methods, Matching, stratification |
|

|
|
Corresponding Author:
Farzan Madidadizadeh
madadizadehfarzan@gmail.com |
How to cite this paper:
Ajmal Ajmal Dina M, Madidadizadeh F, Arshed A. Tutorial on Methods to Adjust for Confounding Variable in Medical Research. J Community Health Research 2025; 14(1): 97-103.
Introduction
A confounding variable (CV) is an unmeasured third variable that exerts an influence on both the presumed cause and the presumed effect, potentially distorting the observed relationship between them (1). CVs pose a considerable obstacle on research, as they can obscure the genuine relationships between independent and dependent variables (2). The variables which are frequently unmeasured, can lead to misleading correlations that compromise the integrity of a study's findings (3). If confounding variables are not adequately recognized and controlled, researchers might mistakenly conclude that the drug is effective (4), when the observed outcomes are actually due to these extraneous influences. This underscores the importance of a robust study design that employs strategies to reduce the effects of confounding variables.
Figure 1. Confounding variable of smoking in relation of coffee and cancer
The existence of confounding variables can introduce various biases that undermine the internal validity of research findings (3). A predominant concern is omitted variable bias which arises when a significant confounder is excluded from the analysis, leading to erroneous estimations of the relationship between independent and dependent variables (5). To adjust the effect of confounding variables, researchers can apply a variety of methodological tactics.
In the next section, the most important statistical methods to adjusting confounding effect are reviewed.
Methods
There are very different methods for adjusting confounding variables, the authors reviewed the most important applied methods and presented a full review of methods as follows.
Figure 1. Statistical methods of confounder adjustment
Standardization
Standardization involves reweighting stratum-specific rates to ensure comparability across exposure categories (6). Initially, the development of loglinear models and subsequent advancements in nonlinear regression techniques, such as logistic regression and failure time regression, which were facilitated by the growing computational capabilities of emerging computers (7), led to regression modeling becoming the dominant method for confounder control (8).
Propensity score
The propensity score (PS) represents a probability, specifically a conditional probability of being exposed given a set of covariates, expressed as Pr (E+|covariates) (9). In observational studies, a PS can be computed for each participant, irrespective of their actual exposure status (10). Once PS values are derived for all the participants, the analysis shifts to the observed data, and distinguishes between exposed and unexposed individuals. Exposed subjects can then be matched with unexposed subjects who share identical or nearly identical PS values. This matching process ensures that the probability of being exposed is equivalent to the probability of being unexposed, thereby approximating a scenario where exposure is effectively "randomized."
A key distinction between matching and weighting methods lies in the fact that matching methods do not directly depend on the propensity score (4), making them less susceptible to its misspecification or the influence of extreme values. Matching methods provide a high degree of flexibility, enabling researchers to incorporate substantive knowledge and strategically balance bias-variance trade-offs when estimating the effects of nonrandomized exposures (11).
Stratification
Stratification is a method used to control for confounding by dividing data into two or more categories or subgroups within which the confounding variable either remains constant or exhibits minimal variation (12). Both stratification and regression modeling are statistical techniques employed to address confounding, yielding an adjusted estimate of the intervention effect that accounts for imbalances in observed prognostic factors (13). In some analyses, propensity score methods are utilized as part of a two-stage analytical approach.
It is important to distinguish this statistical use of stratification from the sociological concept of social stratification (14), which refers to the hierarchical ranking of individuals within a society based on criteria such as power, prestige, and wealth (15). For instance, an individual from a wealthy background, with a college education and a degree of social influence, would typically be ranked higher than someone employed in a blue-collar occupation.
Restriction
Restriction is an epidemiological method employed to mitigate confounding with limiting the study population to individuals that share a uniform level of a known risk factor (16). The approach constrains both exposed and unexposed groups to a single stratum of the confounder, thus equalizing its distribution across comparison groups (17). The homogeneity in maternal age across exposure groups eliminates age-related confounding, as the variable is equally distributed between cohorts (18), approximately the idealized scenario of exchangeability between exposed and unexposed populations (19).
This approach exclusively mitigates confounding by the restricted variable (maternal age) which does not account for other potential confounders (20). Residual confounding may persist due to variables not addressed through restriction (21), such as socioeconomic disparities(like income level) which may persist as confounding variables if lower-income individuals face dual barriers of reduced supplement access and heightened preterm birth risk due to socioeconomic stressors. Therefore, while restriction improves internal validity for the targeted confounder, residual confounding from unaddressed factors necessitates complementary strategies (22), such as multivariable adjustment or stratification, to strengthen causal inference.
Statistical model for control (loglinear method, logistic regression method, multiple regression method, and covariance analysis)
Statistical control is a crucial method in research that allows scholars to account for confounding variables, enhancing the reliability of their findings (23). A widely used technique for this purpose is multiple regression analysis (log-linear method, logistic regression method, multiple regression method, and covariance analysis) (24), which examines the relationship between one dependent variable (DV) and multiple independent variables (IV) simultaneously. By including potential confounders in the regression model (25), researchers can better understand the influence of the primary independent variable on the dependent variable while reducing the impact of extraneous factors.
For example, in a study investigating how physical activity affects weight loss, researchers might add variables such as age, gender, and dietary habits as covariates in their analysis. This adjustment helps clarify whether changes in weight are directly associated with physical activity rather than being influenced by other confounding factors.
Employing statistical control through methods like multiple regression analysis not only aids in adjusting for known confounders (26) but also improves the accuracy and dependability of research findings (27). However, it is imperative to acknowledge that the success of statistical control hinges on the precise identification and measurement of confounders during data collection phase (28). The oversight or mismeasurement of significant confounders can result in residual confounding (29), which may twist the results. Moreover, researchers should be wary of overfitting the model by incorporating an excessive number of variables (30), as this can complicate interpretation and diminish the generalizability of the findings. So, statistical techniques offer robust mechanisms for managing confounding variables (31), and their efficacy is dependent on meticulous study design and judicious variable selection, ensuring that the relationships examined reflect genuine causal connections rather than misleading associations.
In the statistical analysis of matched case-control studies, fixed-effect models (32), such as Mantel-Haenszel odds ratio estimator and conditional logistic regression model, are essential for stratifying matched case-control sets and eliminating selection bias artificially introduced through the sampling of controls (32). In cohort studies, exact matching is employed to enhance the studys efficiency and mitigate or remove confounding effects associated with the matching factors (33). Another widely used matching method is propensity score matching, where patients with and without exposure are paired based on their estimated propensity scores for receiving the exposure (34). When applied appropriately, matching can improve study’s efficiency without introducing bias which may also yield results that are more intuitive and clinically interpretable for practitioners.
Matching
Matching methods serve as an alternative to weighting techniques for estimating exposure effects when confounding by observed variables is present. These methods provide a high degree of flexibility, enabling customization to improve their robustness and allowing for fine-tuning to optimize their performance in specific analytical contexts.
In research design, matching help as a significant methodological strategy (35), strengthening the inside validity of study by bringing into line the subjects according to important characteristics. That approach involves the identification of relevant variables that could potentially unclear the relationship between the IV and DV (36), confirming the participants across dissimilar study groups and exhibiting comparison regarding these variables. Block randomization is a similar approach of matching in clinical trial. Matched-pair randomized controlled trial (RCT) designs involve pairing units—such as individuals, groups of individuals, or geographic locations—based on similar pre-determined characteristics, known as covariates (37).
Since the number of cases (often rare diseases) is typically much smaller than the pool of potential controls, the matching ratio (i.e., the ratio of cases to controls in each matched set) is frequently set to 1:1 (38). When this ratio is used, the design is referred to as a pair-matched case-control study. In practice, many studies adopt matching ratios of 1:4 or 1:5, while others may employ larger ratios, such as 1:7 or 1:10 (32). In unmatched case-control settings, statistical power increases significantly up to a ratio of 1:4 or 1:5, with diminishing returns observed at higher ratios (39). Key considerations regarding matching in case-control studies include the followings:
- Matching in a case-control study does not inherently control for confounding by the matching factors.
- A matched design may necessitate controlling for the matching factors during the analysis phase.
- A matched design, however, does not always require a matched (conditional) analysis. In some cases, a "standard" (unconditional) analysis may be the most valid and appropriate approach, while a "matched" (conditional) analysis may be neither required nor suitable.
Randomization
In research, randomization is a fundamental technique that aids to distribute confounding variables consistently across study groups, thus curtailing the possible impact on the results(40). Through random assigning participants, on different treatment or at control group, researchers can confirm that each group is statistically comparable with respect to both measured and unmeasured confounders (41). That procedure decreases the probability that these inessential variables will systematically bias the outcomes, letting for a clearer understanding of the causal relationship between the IVand DV. For example, in a clinical trial testing a new medication, randomization helps ensure that factors like age, gender, and pre-existing conditions are evenly distributed between groups. Without randomization, these factors could skew the results. (42).
Randomization plays a critical role in minimizing the impact of confounding factors, ensuring that observed differences in outcomes can be reliably attributed to the intervention (43). While simple randomization is effective for large sample sizes (typically >100 per group) (44), smaller samples often necessitate more sophisticated methods, such as block or stratified randomization, to achieve balanced group sizes and control for covariates (45).
Conclusion
Standardization, propensity score, stratification, restriction, statistical model for control, matching, and randomization are the most common methods to adjust for confounding variable in medical research. It is critical for researchers to adopt robust procedures such as randomization, matching, and statistical control to alleviate the impact of confounding variables. By highlighting these approaches, researchers can improve the internal validity of their studies, ensuring that their findings are both credible and reliable.
Acknowledgments
I sincerely thank everyone who supported and guided me throughout this work.
Conflicts of interest
All authors have declared no conflicts of interest.
Ethical considerations
Not applicable.
Code of ethics
Not applicable.
Funding
No external funding was received for this study.
Authors’ contributions
M. A. D, drafted the manuscript; A. A, help with the interpretation of data and drafting the manuscript; F. M and M. T. S. all helped with data analysis and critical appraisal of the manuscript. All co-authors read and approved the final draft of the manuscript.
Open access policy
JCHR does not charge readers and their institutions for access to its papers. Full text download of all new and archived papers is free of charge.
References
1. Hammad TA, Davis S, Afsar S. Exploring the scientific underpinnings of investigating safety signals: analytical insights in deciphering drug safety evidence. Frontiers in Drug Safety and Regulation. 2024; 4: 1445998.
2. Eaton AA, Saunders JF, Jacobson RK, et al. How gender and race stereotypes impact the advancement of scholars in STEM: Professors’ biased evaluations of physics and biology post-doctoral candidates. Sex roles. 2020; 82: 127-41.
3. Gelbard RB, Cripps MW. Pitfalls in study interpretation. Surgical Infections. 2021; 22(6): 646-50.
4. Agoritsas T, Merglen A, Shah ND, et al. Adjusted analyses in studies addressing therapy and harm: users’ guides to the medical literature. Jama. 2017; 317(7): 748-59.
5. Kim J-S, Frees EW. Omitted variables in multilevel models. Psychometrika. 2006; 71(4): 659-90.
6. Keiding N, Clayton D. Standardization and control for confounding in observational studies: a historical perspective; 2014.
7. Kedem B, Fokianos K. Regression models for time series analysis: John Wiley & Sons; 2005.
8. Rohrer JM. Thinking clearly about correlations and causation: Graphical causal models for observational data. Advances in methods and practices in psychological science. 2018; 1(1): 27-42.
9. Zhao Q-Y, Luo J-C, Su Y, et al. Propensity score matching with R: conventional methods and new features. Annals of translational medicine. 2021; 9(9): 812.
10. Bero L, Chartres N, Diong J, et al. The risk of bias in observational studies of exposures (ROBINS-E) tool: concerns arising from application to observational studies of exposures. Systematic reviews. 2018; 7: 1-11.
11. Brand JE, Zhou X, Xie Y. Recent developments in causal inference and machine learning. Annual Review of Sociology. 2023; 49(1): 81-110.
12. Coscia C, Gill D, Benítez R, et al. Avoiding collider bias in Mendelian randomization when performing stratified analyses. European Journal of Epidemiology. 2022; 37(7): 671-82.
13. Hahn PR, Murray JS, Carvalho CM. Bayesian regression tree models for causal inference: Regularization, confounding, and heterogeneous effects (with discussion). Bayesian Analysis. 2020; 15(3): 965-1056.
14. Barone C. Analytical sociology and social stratification research. Research Handbook on Analytical Sociology: Edward Elgar Publishing. 2021: 119-34.
15. Breyer M. Perceptions of the social status hierarchy and its cultural and economic sources. European Journal of Political Research; 2024.
16. Perico N, Askenazi D, Cortinovis M, et al. Maternal and environmental risk factors for neonatal AKI and its long-term consequences. Nature Reviews Nephrology. 2018; 14(11): 688-703.
17. Gong C, Wang C, Meng X, et al. An Equalized Flow Velocity Strategy for Perovskite Colloidal Particles in Flexible Perovskite Solar Cells. Advanced Materials. 2024; 36(32): 2405572.
18. Bussas M, El Husseini M, Harabacz L, et al. Multiple sclerosis lesions and atrophy in the spinal cord: distribution across vertebral levels and correlation with disability. NeuroImage: Clinical. 2022; 34: 103006.
19. Schwartz S, Prins SJ. Causal Inference and the People's Health: Oxford University Press; 2025.
20. Correia KF, Dodge LE, Farland LV, et al. Confounding and effect measure modification in reproductive medicine research. Human Reproduction. 2020; 35(5): 1013-8.
21. Huybrechts KF, Bateman BT, Hernández‐Díaz S. Use of real‐world evidence from healthcare utilization data to evaluate drug safety during pregnancy. Pharmacoepidemiology and drug safety. 2019; 28(7): 906-22.
22. Matthay EC, Smith ML, Glymour MM, et al. Psychological trauma: Theory, research, practice, and policy; 2022.
23. Lipsitch M, Tchetgen ET, Cohen T. Negative controls: a tool for detecting confounding and bias in observational studies. Epidemiology. 2010; 21(3): 383-8.
24. Ngo THD, La Puente C, editors. The steps to follow in a multiple regression analysis. Proceedings of the SAS Global forum; 2012: Citeseer.
25. McNamee R. Regression modelling and other methods to control confounding. Occupational and environmental medicine. 2005; 62(7): 500-6.
26. Austin PC. An introduction to propensity score methods for reducing the effects of confounding in observational studies. Multivariate behavioral research. 2011; 46(3): 399-424.
27. Anney VN. Ensuring the quality of the findings of qualitative research: Looking at trustworthiness criteria; 2014.
28. Frick U, Rehm J. Can we establish causality with statistical analyses? The example of epidemiology. Statistics and causality: methods for applied empirical research. 2016: 405-31.
29. Fewell Z, Davey Smith G, Sterne JA. The impact of residual and unmeasured confounding in epidemiologic studies: a simulation study. American journal of epidemiology. 2007; 166(6): 646-55.
30. Bailey DH, Borwein J, Lopez de Prado M, et al. The probability of backtest overfitting. Journal of Computational Finance, forthcoming; 2016.
31. Heinze G, Wallisch C, Dunkler D. Variable selection–a review and recommendations for the practicing statistician. Biometrical journal. 2018; 60(3): 431-49.
32. Iwagami M, Shinozaki T. Introduction to matching in case-control and cohort studies. Annals of Clinical Epidemiology. 2022; 4(2): 33-40.
33. King G, Nielsen R. Why propensity scores should not be used for matching. Political analysis. 2019; 27(4): 435-54.
34. Zayed S, Chen H, Ali E, et al. Is there a role for hypofractionated thoracic radiation therapy in limited-stage small cell lung cancer? A propensity score matched analysis. International Journal of Radiation Oncology* Biology* Physics. 2020; 108(3): 575-86.
35. Strang KD. Matching research method with ideology and strategy. The Palgrave handbook of research design in business and management: Springer. 2015: 47-62.
36. Aneshensel CS. Theory-based data analysis for the social sciences: Sage Publications; 2012.
37. March JS, Silva SG, Compton S, et al. The case for practical clinical trials in psychiatry. American Journal of Psychiatry. 2005; 162(5): 836-46.
38. Liu J, Barrett JS, Leonardi ET, et al. Natural history and real‐world data in rare diseases: applications, limitations, and future perspectives. The Journal of Clinical Pharmacology. 2022; 62: S38-S55.
39. Levine MM, Nasrin D, Acácio S, et al. Diarrhoeal disease and subsequent risk of death in infants and children residing in low-income and middle-income countries: analysis of the GEMS case-control study and 12-month GEMS-1A follow-on study. The Lancet Global Health. 2020; 8(2): e204-e14.
40. Scriven M. A summative evaluation of RCT methodology: & an alternative approach to causal research. Journal of multidisciplinary evaluation. 2008; 5(9): 11-24.
41. Seeger JD, Davis KJ, Iannacone MR, et al. Methods for external control groups for single arm trials or long‐term uncontrolled extensions to randomized clinical trials. Pharmacoepidemiology and Drug Safety. 2020; 29(11): 1382-92.
42. Gill DP, Blunt W, Boa Sorte Silva N, et al. The Health e Steps™ lifestyle prescription program to improve physical activity and modifiable risk factors for chronic disease: A pragmatic randomized controlled trial. BMC Public Health. 2019; 19: 1-15.
43. Sanderson E, Glymour MM, Holmes MV, et al. Mendelian randomization. Nature reviews Methods primers. 2022; 2(1): 6.
44. Lakens D. Sample size justification. Collabra: psychology. 2022; 8(1): 33267.
45. Berger VW, Bour LJ, Carter K, et al. A roadmap to using randomization in clinical trials. BMC Medical Research Methodology. 2021; 21: 1-24.
Review:
Review |
Subject:
Epidemiology Received: 2024/11/12 | Accepted: 2025/04/30 | Published: 2025/06/9