Comparison of the Performance of Logistic Regression Model in the Presence and Absence of Mediation




HIV Prevalence, Logistic Regression, Mediation


Over the last decade major global efforts mounted to address the HIV epidemic has realized notable successes in combating the pandemic. Sub Saharan Africa (SSA) still remains a global epicenter of the disease, accounting for more than 70% of the global burden of infections. Despite wide spread use of various intervention strategies that act as mediation factors in Human Immunodeficiency Virus (HIV) prevention, HIV prevalence still remains a challenge especially in some geographic areas and populations. Therefore, how mediation factors interact with the prevailing HIV risk factors to cause an impact on its prevalence remains a question not answered. This study considered Exposure to HIV related media as a mediator variable in the relationship between HIV risk factors and HIV prevalence. Two logistic regression models, one in presence of mediation and another in absence of mediation were formulated and compared to establish the best performing model. Models were fitted to real data from the Kenya Population-based HIV Impact Assessment survey-2018 and model parameters were estimated using Maximum Likelihood Estimation in R. Results based on both Akaike’s Information Criterion and the McFadden’s R2 value revealed that the model formulated in presence of mediation performed better compared to that without mediation.


Agha, S. (2003). The impact of a mass media campaign on personal risk perception, perceived self-efficacy and on other behavioral predictors. AIDS Care, 15(6), 749-762. DOI:

Chaba, L. A. (2011). Modeling of sti prevalence among hiv-infected adults in HIV care programs in Kenya using logistic regression (Doctoral Dissertation, University of Nairobi).

Cheng, C., Spiegelman, D., & Li, F. (2021). Estimating the natural indirect effect and the mediation proportion via the product method. BMC medical research methodology, 21 (1), 1-20. DOI:

Garson, G. D. (2013). Path analysis. Asheboro, NC: Statistical Associates Publishing.

Global, A. I. D. S. (2021). Update. Seizing the moment: tackling entrenched inequalities to end epidemics. Geneva: UNAIDS; 2020.

Higa, D. H., Crepaz, N., Mullins, M. M., Adegbite-Johnson, A., Gunn, J. K., Denard, C., & Mizuno, Y. (2022). Strategies to improve HIV care outcomes for people with HIV who are out of care. AIDS, 36 (6), 853-862. DOI:

Huberman, D. B., Reich, B. J., Pacifici, K., & Collazo, J. A. (2020). Estimating the drivers of species distributions with opportunistic data using mediation analysis. Ecosphere, 11 (6), e03165. DOI:

Irimu, K., & Schwartz, U. (2021). Reporting HIV/AIDS A guide for Kenyan Journalists [Internet]. Friedrich Ebert stiftung Coalition of Media Health Professionals.

Joint United Nations Programme on HIV/AIDS. (2013). Global report: UNAIDS report on the global AIDS epidemic 2013. Geneva: Joint United Nations Programme on HIV/AIDS.

Karavasilis, G. J., Kotti, V. K., Tsitsis, D. S., Vassiliadis, V. G., & Rigas, A. G. (2005). Statistical methods and software for risk assessment: applications to a neurophysiological data set. Computational Statistics & Data Analysis, 49 (1), 243-263. DOI:

LaCroix, J. M., Snyder, L. B., Huedo-Medina, T. B., & Johnson, B. T. (2014). Effectiveness of mass media interventions for HIV prevention, 1986-2013: a meta-analysis. JAIDS Journal of Acquired Immune Deficiency Syndromes, 66, S329-S340. DOI:

Liang, H., & Du, P. (2012). Maximum likelihood estimation in logistic regression models with a diverging number of covariates. Electronic Journal of Statistics, 6(2012), 1838-1846 DOI:

Mugoya, G. C. T., Aduloju-Ajijola, N., & Dalmida, S. G. (2016). Relationship between Knowledge of Someone Infected with HIV/AIDS and HIV Stigma: A moderated mediation model of HIV knowledge, gender and hiv test uptake. HIV/AIDS Res Treat Open J., SE(1),S14-S22. DOI:

Musyoki, R. K. (2017). HIV and AIDS programmes financing and sustainability in Kenya: a case of the National AIDS Control Council (NACC) (Doctoral Dissertation, Masters' Thesis, Kenyatta University).

NACC, N. (2018). Kenya HIV estimates report. Nairobi, Kenya: NACC.

Namazi, M., & Namazi, N. R. (2016). Conceptual analysis of moderator and mediator variables in business research. Procedia Economics and Finance, 36, 540-554. DOI:

Plan, M. C. O. (2017). Strategic direction summary. US President's Emergency Plan for AIDS Relief (PEPFAR).

Smith, T. J., & McKenna, C. M. (2013). A comparison of logistic regression pseudo R2 indices. Multiple Linear Regression Viewpoints, 39 (2), 17-26.

Srimaneekarn, N., Hayter, A., Liu, W., & Tantipoj, C. (2022). Binary response analysis using logistic regression in dentistry. International Journal of Dentistry, 2022. DOI:

UNAIDS, J. (2017). UNAIDS data 2017. Jt. United Nations Program. HIV/AIDS, 1-248.

Windmeijer, F. A. (1995). Goodness-of-fit measures in binary choice models. Econometric reviews, 14(1), 101-116. DOI:




How to Cite

Wanga, R. N., Alilah, D. A., & Odero, E. A. (2023). Comparison of the Performance of Logistic Regression Model in the Presence and Absence of Mediation. African Journal of Empirical Research, 4(2), 984–992.