A Multistate Continuous Time-Inhomogeneous Markov Model for Assessing the CD4 Count Dynamics of HIV/AIDS Patients Undergoing Antiretroviral Therapy in KwaZulu-Natal, South Africa
Chiedza Elvina Mashiri, Jesca Mercy Batidzirai, Retius Chifurira, Knowledge Chinhamu

TL;DR
This study uses a Markov model to track CD4 count changes in HIV patients in South Africa, finding that gender and location affect disease progression.
Contribution
A novel multistate continuous time-inhomogeneous Markov model is applied to assess CD4 dynamics in HIV patients under ART.
Findings
Males had a higher risk of CD4 decline compared to females.
Rural patients showed slower CD4 recovery compared to urban patients.
Regimen, location, gender, and age significantly influence HIV progression.
Abstract
Monitoring CD4 count levels is essential for tracking the progression of HIV in patients. This study aimed to identify the key factors influencing HIV progression by incorporating time-varying factors and transition probabilities. The data for this study were obtained from the Centre for the AIDS Programme of Research in South Africa (CAPRISA), which enrolled 3325 patients aged 14 to 76 who initiated antiretroviral therapy (ART) and were followed up with between June 2004 and August 2013. The dataset included clinical, demographic, and treatment information to capture a comprehensive picture of HIV progression. To analyze the factors associated with HIV progression, this study employed time-inhomogeneous Markov models, which allow for incorporating covariates that change over time and transition probabilities. These models provided a robust framework to assess how various factors, such…
Genes, proteins, chemicals, diseases, species, mutations and cell lines named across the full text — each resolved to its canonical identifier and authoritative record.
Click any figure to enlarge with its caption.
Figure 1Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsHIV/AIDS Research and Interventions · HIV, Drug Use, Sexual Risk · HIV Research and Treatment
1. Introduction
The estimated overall HIV prevalence rate in the South African population is approximately 13.9% [1]. In 2022, the total number of people living with HIV (PLWHIV) in South Africa was estimated at approximately 8.45 million [2]. Among adults aged 15–49 years, the HIV prevalence rate was estimated at 19.6% of the population [2]. KwaZulu-Natal, the province with the highest HIV prevalence, had a rate of 27%. The CD4 count and viral load are considered the most important biomarkers for assessing disease stage and progression in patients with HIV [3,4].
A key characteristic of HIV is profound immunodeficiency, primarily resulting from a progressive decline in the quantity of CD4+ T cells [5]. The HIV-induced destruction of CD4+ T cells, whether directly or indirectly, leads to the loss of both HIV-specific and non-specific immune responses during the AIDS stage [6]. The CD4 lymphocyte count in individuals with HIV serves as a key indicator of disease progression and the risk of death from AIDS [7,8,9]. A lower CD4 count suggests significant immune system compromise, reducing the body’s ability to combat opportunistic infections [7,10].
Disease progression can be measured using time-homogeneous or time-inhomogeneous multistate Markov models. Transition probabilities are the basis of their differences. The transition probabilities of time-inhomogeneous models vary with time, whereas those of time-homogeneous models, such as Markov chains, are constant throughout time. The significance of time-inhomogeneous models lies in their ability to capture conditions that change over time.
Using viral loads and CD4 cell counts, time-homogeneous or time-inhomogeneous multistate Markov models assess immune recovery and disease progression. HIV disease progression and the factors influencing disease progression can be studied using longitudinal processes and joint multistate models. This study found that clinical characteristics, younger age, marital status, and educational attainment were significant factors that contributed to the progression of the disease [11]. Bidirectional transition rates were estimated using a semi-parametric time-homogenous multistate Markov model, and the covariate effects of age, gender, ART initiation period, and health facility level on the transition rates were evaluated [12].
To the best of our knowledge, few studies have applied time-inhomogeneous Markov models for CD4 count for South African datasets. Our study utilized a continuous time-inhomogeneous Markov chain model to determine significant factors in HIV progression, incorporating time-varying dynamics and transition probabilities that are not static. Reverse transitions were modelled to capture the arbitrary movements of patients among states. The results acquired here are compared with those in [13].
2. Materials and Methods
In this section, this study’s methodological framework was discussed, with a primary focus on the target population, sampling strategy, research design, statistical analysis, and explanation of key variables and elements.
2.1. Study Design
A prospective cohort study was conducted among patients with HIV initiating ART at the South African Centre for the AIDS Program of Research (CAPRISA) in KwaZulu-Natal, South Africa.
2.2. Study Population
This study’s two locations, Thekwini and Vulindlela, are urban and rural, respectively. Patients who missed three or more visits in a row and failed to be physically tracked were recorded as lost to follow-up and excluded from this study. This study included patients with CD4 count longitudinal data.
2.3. Data Collection and Preparation
The program enrolled 3325 patients for antiretroviral therapy initiation and follow-up between June 2004 and August 2013. CD4 counts, viral load, demographic characteristics, and medication regimens were recorded at baseline. The key variable of interest was the patients’ CD4 count (cells/mm^3^) which was followed up and registered on each visit. The CD4 count was categorized into four different states, namely normal (more than 500 cells/mm^3^), mild (351–500 cells/mm^3^), advanced (200–350 cells/mm^3^), and severe (fewer than 200 cells/mm^3^). CD4 count and viral load were taken at the beginning of this study and every six months or as needed for clinical reasons.
2.4. Statistical Analysis
A continuous time-inhomogeneous multistate Markov model was applied to analyze HIV/AIDS disease progression. The transitional time was calculated between each subsequent visit by a patient, and accumulated years were used in the Markov model. Reverse transitions were incorporated in the model, since patients moved arbitrarily to any state and no absorbing state was considered. The table on states shows the number of transitions between follow-up visits. The Markov model without a covariate was used to study the overall HIV/AIDS progression. Transition probabilities for one, five, and ten years described changes and the likelihood of moving from one state to another. The likelihood ratio test found significant variables that were used in the model. We initially started with a model with no covariates, then added variables individually and finally added all the variables. The Cox proportional hazard approach was utilized in the multistate model. Multistate models whose Hessian matrix was not positive definite were excluded from this study. The categorical variables employed in the model were age ( years, years), regimen (first-line treatment and second-line treatment), site (urban and rural), and gender (males and females). According to the WHO (2015), patients that are 44 years old or younger are referred to as young. An analysis was conducted using the msm package from R-studio. The transient states in the multistate Markov model are shown in Figure 1.
2.5. Statistical Model
2.5.1. Multistate Markov Model
A multistate process is a stochastic process with a finite transient state space . is the time interval and the value of the process at the time that the state occupied at that time. Suppose is the state of a patient at any time ; then, the intensity with which the patient moves to the state during the instantaneous interval is given by
Equation (1) constitutes the element of the transition intensity matrix . The intensity matrix is defined such that each element represents the rate at which a patient moves from state to state during an instantaneous interval .
2.5.2. Properties of Transition Intensity Matrix
1.Non-negativity: For all and , for all .
This shows that the transition intensities from one state to another cannot be negative.
2.Row Sums: The sum of each row must equal zero: for each state .
This ensures that the total rate of leaving state is equal to the sum of rates to all other states.
The transition probabilities quantify the likelihood that an individual moves from one state to another over a specified time interval. The transition probability matrix can be computed from the transition intensity matrix using the Chapman–Kolmogorov equations.
2.5.3. Assumptions of Multistate Markov Model in Statistical Formulation
The future state depends only on the present state, not on the past.Transitions between states can occur at any time, not just at discrete intervals.The probability of transitioning from one state to another change over time.The model considers a finite number of possible states.The probability of a transition depends only on the current state and not on the history of states.
2.5.4. Chapman–Kolmogorov Equations
The Chapman–Kolmogorov differential equations describe how to compute the transition probabilities over time. If represents the likelihood of being in state at time given that the individual was in state at time 0, then
where the variables are defined as follows:
is the matrix exponential of . is a matrix of intensities whose rows sum to zero. The estimated transition intensity matrix is used to fit a multistate model to the data.
The estimates of transition intensities are used to compute the transition probability matrix , by solving the Chapman–Kolmogorov differential equations, where is the probability of a patient with HIV/AIDS being in a state at a time given that the subject was at a state at time , which is mathematically represented as
The transition parameters are estimated using various statistical techniques, such as the Maximum Likelihood Estimation (MLE) and Bayesian methods. This study utilized the Maximum Likelihood Estimation method to estimate the transition intensities, allowing covariates to influence the intensities. Individual-specific or time-dependent covariates can be included in the model to explain variations in transition intensities.
A time-inhomogeneous Markov model is a Markov model where the transition probabilities between states can change over time. This model evaluates the likelihood of moving from one state to another depending on the specific time point or interval. This model consists of a finite or infinite set of states. The transition probabilities from state to state can vary with time . This model is represented as follows:
where is the state at a time .
2.5.5. Mean Sojourn Time
The mean sojourn time represents the expected duration or average time that a Markov chain spends in a particular state before transitioning to a different state. For a time-inhomogeneous Markov chain, the mean sojourn time in state at time is denoted as . The cumulative distribution function (CDF) is used to calculate the sojourn time in state at time and is written as follows:
Equation (5) represents the probability that the Markov chain leaves state within units of time, given that it was in state at time . The mean sojourn time in state at time is then given by the following:
The integral represents the expected time that the Markov chain remains in state at time before transitioning to a different state. A higher mean sojourn time indicates that the Markov chain tends to stay longer in that state before transitioning. The mean sojourn time characterizes the dynamics and behaviour of the Markov chain, as it provides insights into the typical durations of visits to different states.
2.5.6. Modelling the Intensity Function Using the Cox Proportional Hazard Function
The Cox proportional hazard model expresses the hazard function for an individual as follows:
where
is the baseline hazard function associated with the transition of type (the hazard for an individual with all covariates equal to zero).
is the exponential function that represents the effects of covariates on the hazard, and represents the coefficients to be estimated. The covariates are assumed to be constant over time. The Cox proportional hazard model permits the integration of covariates that may impact the risk of moving between states, offering more detailed insights into the survival process. The msm R package (R version 4.1.2) uses the Maximum Likelihood Estimation method for the multistate model’s parameter estimation and transition probabilities.
2.6. Model Diagnostics
The likelihood ratio test is a statistical method used for model validation. The calculation for this test is defined as , where is a model with no covariates, and is a full model with covariates, which follows a chi-squared distribution with degrees of freedom with a 5% level of significance. The aim of this test is to obtain a model of simple parsimony.
3. Results
Table 1 shows the descriptive statistics calculated for 3325 study subjects which were followed up with, of which 2148 (65%) were female, and 1770 (53%) were from rural areas. There were 2515 (76%) patients who had no signs of tuberculosis, and 810 (24%) had tuberculosis before initiating ART. The number of patients that were older than 44 was 445 (13%), and the number of those that were 44 or younger was 2880 (87%).
Table 2 displays the number of transitions between follow-up visits. The following transitions occurred: mild to severe (113), advanced to normal (363), severe to normal (98), and normal to severe (48).
The Markov model without a covariate was used to study the overall HIV/AIDS progression, and the results are presented in Table 3. Patients in a normal state (more than 500 cells/mm^3^) are 16.5 times (0.595/0.036) more likely to move from mild to severe states. Transitioning from a mild state to a normal state resulted in a 1.6 times (1.215/0.781) greater chance to transition to an advanced state. Patients in an advanced state were 2.1 times more likely to move from a mild state to a normal state, that is, the recovery state. Once a patient is in the severe state, they are 262 times (1.572/0.006) more likely to move to an advanced state than to a normal state. A patient who is in a severe state is three times (0.006/0.002) more likely to move to a normal state than a mild state. The negative estimates suggest that a patient has a smaller chance of staying in the same state.
The transition probabilities for one, five, and ten years are presented in Table 4. At the end of a year, patients in a normal condition have a 63% probability of remaining in that state. The chances of progressing to mild, advanced, and severe (fewer than 200 cells/mm^3^) were 22%, 11%, and 4%, respectively. Within the first year of starting ART, patients with mild conditions had a 41% chance of returning to a normal state, a 30% chance of remaining in the same state, and an 8% chance of moving to a severe state. Patients in a severe state had a 31% likelihood of remaining in their current condition, a 40% risk of progressing to an advanced level, and a 9% chance of returning to a normal state (more than 500 cells/mm^3^). Over five years, patients in the normal state had a 43% chance of remaining the same, a 24% likelihood of moving to a mild state, and a 10% chance of progressing to a severe state. Those in a mild state had a 23% probability of remaining the same while transitioning to an advanced state, with a 42% chance of reversing to normal and an 11% chance of transitioning to a severe state. Patients in both advanced and severe states have probabilities of 41% and 40%, respectively, of reverting to a normal state after five years. Additionally, individuals in a normal state have a 42% likelihood of staying in that state, while those in mild, advanced, and severe states also have a 42% chance of transitioning to a normal state following a period of ten years.
The estimates of the mean sojourn time along with 95% confidence intervals are shown in Table 5. The average time patients spent in a normal state (more than 500 cells/mm^3^) is 1.41 years with a 95% confidence interval of (1.30, 1.54). The average period spent in a mild state (351–500 cells/mm^3^) was 0.48 years (95% CI: 0.45, 0.50) before moving to another state. The average sojourn time patients spent in a severe state (fewer than 200 cells/mm^3^) was 0.63 years with a confidence interval of (0.60, 0.66) before transitioning to other states.
Table 6 shows that the model comparison presents various combinations of covariates and their corresponding likelihood ratios and p-values. The investigation of disease progression was broadened to incorporate covariates through multistate modelling employing the Cox proportional hazard method. We commenced with a base model that contained no covariates. Each variable was progressively added to the initial model, starting with one, then two, then three, and eventually all four at once. The combinations of variables that resulted in a Hessian matrix that was not positive definite were omitted from the final model. Likelihood ratio tests were conducted for each model at various levels. The final multivariable model consisted of significant variables: regimen, site, age, and gender.
The hazard ratios (HRs) from the Cox proportional hazard function for each covariate (regimen, site, age, and gender) on each transition along with the 95% confidence intervals for transitions in a one-year interval are presented in Table 7. The final model comprised combined variables with a positive definite Hessian matrix. The transition from a normal to a mild state was significantly associated with age, site, gender, and regimen. Males were 1.6 times more likely to move from a normal to mild state compared to females [HR 1.614; 95% CI (1.281, 2.034)] within a year. Rural patients had a hazard ratio value of 81% compared to urban patients transiting from a mild state to an advanced state with a 95% confidence interval of (0.641, 1.009). Patients that were older than 44 had higher chances of transitioning from an advanced to severe state compared to the younger group [HR 0.926; 95% CI (0.798, 1.075]. The significant transition from a severe to advanced state was associated with covariates regimen, site, age, and gender. Their hazard ratios and 95% confidence intervals were [HR 0.743; 95% CI (0.655, 0.844)], [HR 0.730; 95% CI (0.657, 0.811)], [HR 0.915; 95% CI (0.841, 0.995)], and [HR 0.863; 95% CI (0.779, 0.956)], respectively.
4. Discussion
We studied the HIV/AIDS progression of patients in normal, mild, severe, and advanced states. Patients with a CD4 count of fewer than 200 cells/mm^3^ had lower chances of CD4 count recovery (to more than 500 cells/mm^3^) than those in other states, leading to a risk of immune deterioration. Previous authors supported the same results [14,15,16,17,18]. The likelihood of moving from the normal to severe state (CD4 count of fewer than 200 cells/mm^3^) was minimal. This was evidenced by low transition probabilities, indicating that it is less likely for patients in the normal state to move to the severe state over a given time interval. The risk of developing severe health conditions is low for patients not experiencing severe HIV symptoms. Patients with a CD4 count in the normal state had relatively low chances of their condition deteriorating to a severe state [15,19]. The natural progression of HIV disease may involve gradual declines in CD4 count over time. The transition from the normal to severe state may be less likely to occur with early intervention and treatment adherence. Low transition probabilities were observed in five- and ten-year periods, which showed lower chances of moving from normal to severe. The results reflected a stable health status and long-term health prospects for the patients over ten years. Patients who had transitioned from a severe state to a normal state had an increased transition probability during the five- and ten-year periods compared to those in their first year of ART initiation. Patients who adhered to ART and were monitored for a long period had increased chances of CD4 count recovery from severe health states. The transition from an advanced state (200–350 cell/mm^3^) to the recovery state was slightly low in the first year of ART initiation and increased in the five- and ten-year periods. Patients’ stability was evidenced by increased transition probabilities in the mild state (351–500 cells/mm^3^) to the normal state from the first year and the five- and ten-year periods of ART initiation [20,21].
In terms of the covariate effect, HIV/AIDS patients that were older than 44 had higher chances of experiencing backwards and forward progression, through some of them had significant hazard ratios. We noted a significant transition from a mild state to a normal state for patients older than 44. Older individuals may develop a more robust adaptive immune system over time, which can help maintain a relatively stable CD4 count and delay the progression to the severe state. The adaptive immune response can be further enhanced by consistent HIV treatment and effective viral suppression [22,23,24,25]. Older HIV patients may have better adherence to ART regimens, as they tend to have a greater understanding of the importance of consistent medication intake compared to the young generation. Healthcare providers should closely monitor older HIV patients, thereby identifying and addressing potential risks that could accelerate disease progression. According to [26,27], older patients have a reduced risk of non-adherence to ART than their younger counterparts.
Our study showed that female HIV patients generally have higher transition probabilities from the mild state to the recovery state compared to their male counterparts. Female patients living with HIV are more likely to experience an improvement in their CD4 count, reaching the normal state more often compared to males. Women may be more likely to engage in regular healthcare visits and adhere to antiretroviral therapy that can facilitate the transition to a normal state. Females are more likely to be diagnosed with HIV earlier in the disease course [28,29], leading to the earlier initiation of ART and a better chance of reaching the recovery state. Our results concurred with other findings that male patients transitioned from normal states to severe states more often compared to female patients [12,30,31]
The results showed that HIV patients living in rural areas have lower transition probabilities from the mild state to the normal state (CD4 count ≥ 500 cells/mm^3^) compared to those living in urban areas. Rural patients have a lower risk of experiencing CD4 count recovery and reaching the recovery state. This might be caused by limited access to specialized healthcare services, such as HIV clinics, antiretroviral therapy (ART) providers, and experienced healthcare professionals. Patients usually walk long distances to these essential services and may have transportation barriers, which may contribute to rural patients’ inadequate ability to receive timely and consistent care, which is crucial for achieving CD4 count recovery [32,33,34,35]. Poor adherence and loss to follow-up can significantly reduce the likelihood of CD4 count recovery for rural HIV patients. The limited availability of specialized HIV care services, such as viral load monitoring, CD4 count testing, and access to new or innovative ART regimens, can affect the CD4 count recovery of rural patients [36]. Stigma and a lack of education in rural areas can lead to late diagnoses, resulting in lower CD4 counts and more advanced stages of HIV [37,38,39].
Patients on the first-line ART regimen generally had higher transition probabilities of moving from the mild to the normal state compared to patients on the second-line ART regimen. Viral suppression and immune reconstitution were successfully achieved with first-line ART, which facilitated the transition to the normal state. First-line ART regimens are more effective in achieving and maintaining viral suppression, which is a crucial factor in preventing disease progression and promoting CD4 count recovery [40]. Consistent adherence to first-line ART can help patients reach and sustain undetectable viral loads, which is associated with better immunological outcomes [41].
One limitation of this study was that some patients only came once for ART initiation and never came for routine check-ups; therefore, such data cannot be used in multistate models. Loss to follow-up data disproportionately affect demographic groups and biasness on transition probability estimates. Multistate models require longitudinal data only for analysis.
5. Conclusions
The significant variables incorporated in the multistate model were regimen, site, gender, and age. Patients on the first line of treatment transitioned from a mild state to a normal state in terms of CD4 count compared to second-line patients. Patients given the first-line treatment had increased viral load suppression. Rural area patients had low levels of healthcare-seeking behaviours compared to urban patients. Older patients and females showed better treatment adherence. These results can be valuable for disease management, treatment planning, and understanding the long-term prognosis of individuals living with HIV. We recommend educational programs tailored specifically for males regarding ART adherence, which can significantly enhance their chances of improving CD4 counts and achieving better health outcomes.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1Bekker L.G. Ratevosian J. Spencer J. Piot P. Beyrer C. Governance for health: The HIV response and general global health Bull. World Health Organ.20199717010.2471/BLT.19.23041730992627 PMC 6453319 · doi ↗ · pubmed ↗
- 2UNAIDS National Commitments and Policy Instrument 2022 Joint United Nations Programme on HIV/AIDS Geneva, Switzerland 2022 Available online: https://lawsandpolicies.unaids.org/(accessed on 6 July 2023)
- 3Maartens G. Celum C. Lewin S.R. HIV infection: Epidemiology, pathogenesis, treatment, and prevention Lancet 201438425827110.1016/S 0140-6736(14)60164-124907868 · doi ↗ · pubmed ↗
- 4Abdullahi H. Hematological Profile of HIV ART Naïve and HIV ART Experienced Individuals at the Aminu Kano Teaching Hospital North Western Nigeria NISEB 201616931698
- 5Fauci A.S. Lane F.C. Human immunodeficiency virus (HIV) disease: AIDS and related disorders Harrisons Principles of Internal Medicine 16th ed. Fauci B. Hauer K. Jamesons L. Mc Graw Hill New York, NY, USA 200510761139
- 6Andualem B.D. Progression of HIV Disease Among Patients on ART in Ethiopia: Application of Longitudinal Count Models Front. Public Health 2020741510.3389/fpubh.2019.0041532140455 PMC 7042380 · doi ↗ · pubmed ↗
- 7Mair C. Hawes S.E. Agne H.D. Sow P.S. N’Doye I. Manhart L.E. Fu P.L. Gottlieb G.S. Kiviat N.B. Factors associated with CD 4 lymphocyte counts in HIV-negative Senegalese individuals Clin. Exp. Immunol.200815143244010.1111/j.1365-2249.2007.03573.x 18190600 PMC 2276971 · doi ↗ · pubmed ↗
- 8Ford N. Meintjes G. Vitoria M. Greene G. Chiller T. The evolving role of CD 4 cell counts in HIV care Curr. Opin. HIV AIDS 20171212312810.1097/COH.000000000000034828059957 · doi ↗ · pubmed ↗
