Abstract
Antiretroviral therapy (ART) has improved survival and clinical course amongst HIV/AIDS patients. CD4 cell count is one of the most critical indicators of the disease progression. With respect to the dynamic nature of CD4 cell count during the clinical history of HIV/AIDS, modeling the CD4 cell count changes, which represents the likelihood of disease progression, is of interest to establish or revise treatment strategies and, specifically, to determine the stage at which giving ART is more clinically effective. In this historical cohort study on 917 HIV/AIDS patients in the Iranian “National Registry of HIV/AIDS Care” database, we used the Markov chain model to predict the effectiveness of the ART based on the transition probability of CD4 cell count, measured before and after initiating ART. We found that when the ART was initiated in the earlier stages of HIV infection, good prognosis might be more accessible; that is, after initiating ART at state , the probability of staying at this state was statistically increased than before the treatment (). Also, it was found that initiating ART significantly decreased the probability of CD4 cell count transition to the lower counts (, , and ). In addition, initiating ART showed a statistically significant increase in the probability of CD4 cell count transition from a lower state () to a higher state () (). Furthermore, When CD4 count reaches under 200, even after the initiation of therapy, the probability of CD4 cell count transition to higher levels was not significant (). In summary, these results have a message for primary healthcare organizations to extensively identify HIV patients and initiating ART as early as possible.
1. Introduction
Despite extensive efforts to prevent and control HIV/AIDS, patients are still dying in many developing and low-income countries. The Middle East and North Africa (MENA) region has experienced an increase in the number of new HIV infection and a significantly lower decline in AIDS-related deaths compare to the global rate during 2000-2021. In 2021, the UNAIDS estimated that there were 180,000 (95% CI: 150,000–210,000) people living with HIV (PLWH) in MENA, 14,000 (95% CI: 11,000–18,000) people that were newly diagnosed, and 5,100 (95% CI: 3,900–6,900) AIDS-related deaths that occurred annually [1]. The results of the studies on the role of initiating antiretroviral treatment (ART) in preventing virus transmission, patient survival, and epidemic control are promising, but factors such as early treatment and compliance with treatment can affect ART outcomes [2, 3].
CD4 cell count and viral load are considered as the most critical indicators of the disease progression. Although the World Health Organization (WHO) has noticed viral load suppression as one of the ultimate goals of 90-90-90, determined by UNAIDS, CD4 count has been widely used as the main marker of HIV progression in developing and low-income countries due to the high cost and nonavailability of viral load assays [4]. Modeling the CD4 cell count progression and the likelihood of HIV/AIDS transmission and progression is crucial for understanding the pathogenesis of HIV, improving treatment strategies, managing patients who have not undergone treatment, and determining the stage at which ART initiation is more clinically effective and less costly [5]. The immunological state of HIV/AIDS patients carries dynamic properties, which can be changed over time. Given the dynamic nature of CD4 cell count, it should be modeled as a multivariate process to assess the entire course of the disease and explain disease progression [6]. Markov chain, which uses to evaluate diseases that change according to the given probabilities, is a suitable model for calculating the likelihood of transmission in different immunological states of HIV infection. This random model describes a sequence of possible events in which the probability of each event depends only on the state obtained in the previous event [7, 8]. Therefore, this study is aimed at investigating the effectiveness of ART based on CD4 cell count progression using the Markov chain model.
2. Methods
2.1. Study Design, Database, and Participants
This study was a retrospective cohort, conducted on the “National Registry of HIV/AIDS Care” database during 2007-2015. In this registry, patients’ demographic data, registration (equal to the diagnosis) date, history of high-risk behaviors, and routine cares and assessments (i.e., CD4 cell count, viral load, routine medical tests, physical examinations, periodic physician visits, and treatment initiation date) are included. Counseling Centers for Behavioral Disorders and Harm Reduction Centers, affiliated to the Medical Universities, are responsible to register these data, as well as to accommodate the Center for Control and Prevention of Infectious Diseases with these data.
2.2. Immunological State of HIV Patients
According to the WHO classification, the normal range of absolute CD4 cell count is 500-1500 cells/mm3 of blood for adults and adolescents. The lower counts yield four states as , , , and [9]. To determine disease state based on the CD4 cell count, it is necessary to remeasure CD4 cell count over time. In the Markov chain model, at least 2 follow-ups are required. In our study, since a substantial number of patients had up to 7 CD4 cell count measurements, we decided to include patients who had a baseline measurement: three follow-up measurements before the initiation of ART and another three follow-up measurements after the initiation of ART.
2.3. Statistical Methods
2.3.1. Markov Chain Model
Many natural processes can be expressed and modeled on stochastic processes. In a process with the Markov attribute (i.e., ), the future state of the process only depends on the current state, irrespective of the information that exists from the history of states; that is, the future situation is independent of the past situation [10]. In mathematical terms:
Also, in this model, each event that occurs at each state over time only depends on the previous state. That means if a disease or a condition has states, the state would be only explained by the state . In the Markov model, what happens is controlled by what has occurred [11] Figure 1, shows the schematic plan of a process with the Markov attribute.

If each of these events is considered as a random variable at any time point, we would be faced with a chain of random variables over time, called stochastic process. Assuming if the probability of event at any time point only depends only on the previous state in such stochastic process, a Markov chain is defined. Its most important feature is being memoryless. That is, in a medical condition, the future state of a patient would be only expressed by the current state and is not affected by the previous states, indicating a conditional probability:
Markov chain consists of a set of transitions that are determined by the probability distribution. These transition probabilities are referred to the transition matrix. If a model has states, its corresponding matrix will be a matrix. Sum of the transition probabilities in each row of the matrix is equal to 1. In Iranian “National Registry of HIV/AIDS Care” database, four states were available during the follow-up period, including , , , and . The transition from one state to another state is associated with a probability, representing a probability matrix [11]. Since the patients’ death state was unknown, the final transition matrix was a matrix.
2.3.2. Calculation of Transition Probability
A directional graph is usually used to show the result of a Markov chain. The values of each graph’s edge indicate the probability of transition from one state to another state. This graph can be represented as a transition probability matrix. Each element of this matrix () is the probability of transition from state to state at time , and according to the principles of probability, sum of the transition probabilities from a state to all other states—each row of the matrix—is equal to 1 (). Then, the memorylessness of Markov chain yields representing the transition probability of the process from state at time to state at time .
To calculate the transition probability, this is initially required to prepare a matrix template so that after determining the patients’ CD4 state during the follow-up period and assigning the patients to the corresponding states, a crosstab is created between the baseline and the first follow-up, a crosstab between the first follow-up and the second follow-up, and so on till the last follow-up. In other words, crosstabs were created for the consecutive pairs of CD4 measurements. Then, these crosstabs were averaged to yield the final matrix. The transition probability is calculated using the formula below:
If the number of is considered as the number of patients moved from the state at time to state at the time , the probability of being at state at time in a patient is calculated by dividing in each row of the matrix for each matrix item to the number of all patients who were in the state at time .
In fact, this calculation yields the cumulative incidence [12]. The transition matrix template and transition probability matrix and diagram were obtained before and after initiating ART, separately. Then, the before and after transition probability matrices and diagrams in the abovementioned immunological states were compared. Of note, it was necessary to calculate the standard deviation of transition probability, using the formula:
Then, comparisons were carried out using the statistical software for data science (Stata) (Stata (2017), Stata Statistical Software: Release 15. College Station, Texas: StataCorp). In all analyses, the significant level of statistic was set at 0.05 value. Also, to show transition probability diagram, the R programing language (version 4.1.1) with the Markov chain package was used.
3. Results
3.1. Patients’ Characteristics
Initially, a total of 917 patients who had three CD4 cell count follow-up measurements before the initiation of ART—in addition to the baseline CD4 cell count—were identified in the Iranian “National Registry of HIV/AIDS Care” database. Their mean age was years, 587 (64.01%) were male, and the rest were female. Most of them were educated till middle school (308, 33.58%) and primary school (275, 29.98%), followed by secondary school (181, 19.73%), illiterate state (92, 10.03%), and postsecondary education (57, 6.21%). The most common causes of HIV infection were injection drug use (IDU) (403, 43.94%), heterosexual transmission (324, 35.33%), having a HIV-positive spouse (216, 23.55%), other routes of transmission (127, 13.84%), and having a spouse with high-risk behaviors (35, 3.81%).
Then, out of these 917 patients, 461 patients (mean age of , 56.40% male) were identified with three CD4 cell count follow-up measurements after the initiation of ART, yielding a total of six CD4 cell count follow-up measurements in addition to the baseline measurement. Of these, 169 (36.66%) were IUD, 143 (31.02%) were heterosexual, 140 (30.36%) had a HIV-positive spouse, 60 (13.01%) had other routes of transmission, and 21 (4.55%) had a spouse with high-risk behaviors.
3.2. Transition Probability of Different Immunological States before Initiating ART
The transition diagram before initiating ART is shown in Figure 2. Also, the transition matrix template and the corresponding calculated transition probability matrix are yielded in the supplementary Tables 1 and 2, respectively. Before initiating ART, for patients with state, probabilities were estimated as 0.71 for staying at the state, 0.18 for transition to state, 0.07 for transition to state, and 0.03 for transition to . In addition, for patients with , probabilities were estimated as 0.40 for staying at this state, 0.31 for transition to state, 0.27 for transition to state, and 0.05 for transition to . The transition probabilities for states and are shown in supplementary Table 2.

3.3. Transition Probability of Different Immunological States after Initiating ART
The transition diagram after initiating ART is shown in Figure 3. The transition matrix template and the transition probability matrix are also yielded in the supplementary Tables 3 and 4, respectively. After initiating ART in patients with state, the probability to stay in the same sate was estimated as 0.82, and the probability to move to , , and states was estimated as 0.13, 0.04, and 0.01, respectively. Moreover, for patients with state, the probability of staying at the same state and transition to , , and states was 0.42, 0.35, 0.18, and 0.04, respectively. The transition probabilities for states and are shown in supplementary Table 4.

3.4. Comparison of Transition Probabilities before and after Initiating ART
Based on the results yielded in Table 1, if ART was initiated at state , the probability of staying at this state was statistically increased than the probability before initiating ART (0.82 vs. 0.71, ). The probability of upward transition from state to state was significantly increased after treatment compare to that of before treatment (0.35 vs. 0.31, ). In addition, the probability of downward transition was significantly decreased after initiating ART compare to that of before treatment, for state to state (0.13 vs. 0.18, ), state to state (0.18 vs. 0.27, ), and state to state (0.10 vs. 0.18, ). Furthermore, in general, the probability of staying at state was significantly decreased than before treatment (0.58 vs. 0.66 ); although at this state, the probability of upward transition to any of the higher specific states was not statistically significant after the initiation of ART (). The other transition probabilities were not significantly different before and after initiating ART.
4. Discussion
The nature of AIDS progression is dynamic. Without initiating ART, progression to the worse immunological states is more likely than better states. Multistate modeling is a valuable method for investigating chronic diseases and evaluating factors associated with interstates transitions. Compared with the Cox regression, multistate models can significantly improve the knowledge on variations in risk factors associated with HIV/AIDS [13]. This retrospective cohort study was conducted on the National Registry of HIV/AIDS Care database during 2007-2015. In this study, the effect of ART on the transition probability between immunological states amongst 461 HIV-positive patients was investigated using the Markov chain model.
The results showed that, generally, initiating ART might significantly increase the probability of staying at state as well as the transition probability from state to the higher state () and decrease the transition probability from a higher state to a lower state. A number of researchers have utilized the multistate Markov model to investigate HIV progression amongst patients who were treated with ART. Matsena Zingoni et al. [4] conducted a similar study, evaluating the HIV progression after initiating ART in Zimbabwe. They found higher transition rates from the lower CD4 cell count states to the higher CD4 cell count states; as the transition probability from state to state was 41.2%, while it was 45.7% for that of state to state. In addition, the transition probability from state to state was 35.3%. In another study conducted by Chikobvu and Shoko [14], they reported that in lower states (i.e., and ), transition to better states was more probable than transition to worse states, but they found that when CD4 cell count was ≥500, immune deterioration was more likely than immune recovery.
We found that initiating ART at state could not significantly improve the immunological state. This might indicate that immune recovery would be more accessible if ART was initiated at the early stages of HIV infection, perhaps because of the better immune system function. Shoko and Chikobvu assessed the HIV/AIDS progression in patients on ART in South Africa, using a continuous-time homogeneous Markov process. They showed that transition rates to CD4 recovery were high for individuals who initiated ART when their CD4 cell count was >350. Also, CD4 recovery rates were reduced if the CD4 cell count was low, with CD4 cell count <200 showing the lowest recovery rate [15]. These findings are consistent with the current study results. In HIV treatment guidelines 2016, as part of the strategy to achieve an AIDS-free generation, the WHO recommended the ART in all people diagnosed with HIV, regardless of their clinical stage or CD4 cell count, to preserve the immune system function, control the proliferation of HIV, and reduce the transmission of the disease [16]. In addition, several studies showed that if HIV is diagnosed in the early stages, ART is able to rapidly increase the number of CD4 cells and reverse the destructive process of the body’s immune system [17]. Early diagnosis of HIV is the cornerstone of HIV prevention and treatment strategies [18]. That is, therapeutic interventions in the early stages of infection, when the immune system is relatively intact, improve immune function and prevent progression to death [19]. The just-mentioned finding—patients with CD4 cell count of <200 showed a much lower chance of immune recovery—confirmed this notion [20]. In addition, those with lower CD4 cell counts are shown to carry a higher risk for dropping ART [21]. Furthermore, to achieve the 95-95-95 goals, if HIV is diagnosed in the early stages, by 2025, 95% of the treated people will have viral suppression [22]. By and large, it is reasonable to focus more on the case-finding strategies to initiate ART at higher immunological states [19].
5. Conclusion
In summary, when ART was initiated in the earlier stages of HIV infection, good prognosis was estimated to be more accessible. These results suggest the primary healthcare organizations to extensively identify HIV patients and initiate ART as early as possible.
5.1. Limitations
Because the patients’ death state was unavailable, we could not include death as one of the states of transition probability. In addition, we did not carry out cost-effective analysis.
5.2. Strengths of the Study
An appropriate sample size and three CD4 cell count follow-up measures before and after initiating ART, as well as using the data of a national registry of HIV care, could be considered as the strength of this study.
Data Availability
The data that support the findings of this study are available from the Center for Infectious Disease Control and Prevention (CDC) in Iran, but restrictions apply to the availability of these data, which were used under license for the current study, and so are not publicly available. Data are however available from the corresponding author upon reasonable request and with permission of the CDC of Iran.
Ethical Approval
Ethical issues, including plagiarism, informed consent, misconduct, data fabrication and/or falsification, double publication and/or submission, and redundancy, have been completely observed by the authors. The study was performed according to the ethical guidelines expressed in the Declaration of Helsinki and the Strengthening of the Reporting of Observational Studies in Epidemiology (STROBE) guideline. The study was approved by the Research Ethics Committee of Shiraz University of Medical Sciences (IR.SUMS.SCHEANUT.REC.1400.045).
Consent
Informed consent was waived by the Research Ethics Committee of Shiraz University of Medical Sciences (IR.SUMS.SCHEANUT.REC.1400.045).
Conflicts of Interest
The authors declare that they have no competing interests.
Authors’ Contributions
A. M. owned the main idea of the study and provided the methodology; M. S. carried out data analysis, developed the idea, wrote the manuscript, and revised the final manuscript; J. H. wrote the manuscript and revised the final manuscript; M. S. carried out data analysis; A. H. revised the final manuscript. All authors approved the final version of the manuscript that is submitted.
Acknowledgments
The authors of this paper express their deepest gratitude to Iran Center for Infectious Diseases Control and Prevention for providing the required information of HIV/ADIS patients and Shiraz University of Medical Sciences (Grant No. 23039) for financial support.
Supplementary Materials
Supplementary Table 1: transition template in HIV patients before initiating ART (3 follow-ups). Supplementary Table 2: transition probability of different CD4 cell count states in HIV patients before initiating ART (3 follow-ups). Supplementary Table 3: transition template in HIV patients after initiating ART (6 follow-ups). Supplementary Table 4: transition probability of different CD4 cell count states in HIV patients after initiating ART (6 follow-ups). (Supplementary Materials)