For the second quarter of 2023, it is estimated that 125,527 people living with human immunodeficiency virus (HIV) are on antiretroviral treatment with active status, according to the Secretary of Health in Mexico. CD4 T cells percentages at different times have been consistently identified as correlates of CD4 T cell recovery. CD4 T cell proportions, along with other accessible variables, could serve as predictors for the immunological response to antiretroviral therapy (ART) in patients with advanced HIV infection.
To create accessible variables for predictors of CD4 T cell recovery
and viral load, the tidyverse
suite can be used for data
transformation, and the viraldomain
package can be used to
access CD4 counts and viral load data. The goal is to calculate recovery
rates for each consecutive year, taking both 2019 and 2021 as basal
counts, considering one year and two year change rates.
library(tidyverse)
library(viraldomain)
data(viral, package = "viraldomain")
recovery_rates <- viral |>
mutate(
recovery_rate_2021 = (cd_2021 - cd_2019) / cd_2019,
recovery_rate_2022 = (cd_2022 - cd_2021) / cd_2021,
recovery_rate_2022_2yr = (cd_2022 - cd_2019) / cd_2019,
viral_rate_2021 = (vl_2021 - vl_2019) / (vl_2019+1),
viral_rate_2022 = (vl_2022 - vl_2021) / (vl_2021+1),
viral_rate_2022_2yr = (vl_2022 - vl_2019) / (vl_2019+1)
)
Data processing followed 35 patients under ART during three years: 2019, 2021 and 2022. Twenty two patients had reached undetectable viral load (VL) by year 2022, and had available CD4 T cell counts at each year. Data were obtained from routine laboratory tests of HIV treatment follow-up.
Figure 1 A shows viral loads in 2019 have a range from 0 to 38961, with a median of 93. In 2021, there is a notable increase in viral loads, with a median of 262 and a maximum of 516675. Viral loads in 2022 show a similar pattern to 2021, with some patients having high values.
The majority of patients had non-zero viral loads in 2019, with a wide range. In 2021, there is a substantial increase in viral loads for several patients. Viral loads in 2022 show variability, with the mean behavior achieving undetectable viral load and many patients showing low values and few others showing persistence with previous years, though these values act as outliers and they could be due to random noise in the cohort since they belong to patients with viral loads higher than average.
In Figure 1 B, the median CD4 count in 2019 is 494, showing a central tendency. In 2021, the median CD4 count is 454, indicating relatively stable counts compared to 2019. The median CD4 count in 2022 is 547, showing a potential increase compared to 2021.
One patient stands out with a remarkably high CD4 count of 1960 in 2021, potentially indicating a unique response to treatment. Only two patients maintain relatively stable CD4 counts over the observed years, one patient experiences a significant drop in CD4 count from 2021 to 2022, but the rest of the cohort shows a cell count increase.
Now, Figure 2 A displays the viral change rates, exhibiting diverse patterns across patients. Notable variations are observed in the 1-year and 2-year differences. The longitudinal trends for the 2021 viral rates show a range from -0.99 to 49248.00, indicating significant variability. The majority of values are negative, with some extreme positive values, indicating a stabilization towards undetectable load but with some persistence on viral activity. The 2022 viral rate ranges from -0.9999 to 79.5529, showcasing a diminished spectrum. Positive values indicate an increase, while negative values suggest a decrease, with the mean behavior pointing towards an overall decrease in rates. The 2022 viral rate with a 2-Year difference also exhibits a wide range from -1.00 to 49248.00, emphasizing the impact of longer-term changes. Notable positive and negative values reflect diverse responses. Seasonality shows some patients with consistent trends over the short term, while others exhibit fluctuations over a more extended period. Short-term seasonality is evident in rapid changes, while long-term patterns vary widely. Extreme values, such as 49248.00, may indicate outliers or specific responses to treatment interventions and potential influencing factors.
In Figure 2 B, CD4 T cell count recovery rates show a range of positive and negative values, showing a substantial variability is observed across patients, reflecting diverse responses to treatment. The longitudinal trend for the 2021 recovery rate ranges from -0.70250 to 2.52518, both positive and negative values indicate varying rates of improvement or decline. The 2022 recovery rate ranges from -0.61631 to 1.27523. The mean suggests an overall positive trend, with more patients experiencing improvement. The 2022 recovery rate with a 2-Year difference presents a range from -0.628655 to 0.741935, emphasizing longer-term changes. The mean is close to zero, suggesting a stabilizing effect over the two-year period. Short-term fluctuations in recovery rates may be indicative of response variations to ART interventions. Long-term stability, as indicated by the mean of the 2-year recovery rate, suggests a potential stabilizing effect of ART.
The effect on the mean recovery rate for 2022 (2-Year) being close to zero may indicate a stabilizing effect of ART on CD4 T cell counts over a longer duration. THe majority of patients show consistent positive recovery trends, while others exhibit fluctuations. Extreme positive values indicate a substantial increase in cell recovery, which can be considered beneficial for overall health. These high positive values suggest a significant improvement in CD4 T cell counts for the corresponding patients. Patients with recovery rates significantly above the mean and closer to 2.52518 are experiencing an extraordinary improvement in CD4 T cell counts. This indicates a robust positive response to the treatment regimen: higher positive recovery rates are generally associated with better immune system restoration and improved CD4 T cell counts contribute to enhanced immune function, thus, reducing susceptibility to opportunistic infections.
Long-term stability in CD4 T cell recovery, as indicated by the 2-year recovery rate, suggests sustained health benefits for these individuals which is consistent with positive trends over an extended period and are indicative of the effectiveness of the treatment protocol.
## R version 4.3.2 (2023-10-31)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 23.10
##
## Matrix products: default
## BLAS: /usr/local/lib/R/lib/libRblas.so
## LAPACK: /usr/local/lib/R/lib/libRlapack.so; LAPACK version 3.11.0
##
## locale:
## [1] LC_CTYPE=es_ES.UTF-8 LC_NUMERIC=C
## [3] LC_TIME=es_ES.UTF-8 LC_COLLATE=C
## [5] LC_MONETARY=es_ES.UTF-8 LC_MESSAGES=es_ES.UTF-8
## [7] LC_PAPER=es_ES.UTF-8 LC_NAME=C
## [9] LC_ADDRESS=C LC_TELEPHONE=C
## [11] LC_MEASUREMENT=es_ES.UTF-8 LC_IDENTIFICATION=C
##
## time zone: America/Mexico_City
## tzcode source: system (glibc)
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] viraldomain_0.0.3 broom_1.0.5 ggpubr_0.6.0 factoextra_1.0.7
## [5] cowplot_1.1.2 lubridate_1.9.3 forcats_1.0.0 stringr_1.5.1
## [9] dplyr_1.1.4 purrr_1.0.2 readr_2.1.4 tidyr_1.3.1
## [13] tibble_3.2.1 ggplot2_3.5.0 tidyverse_2.0.0 FactoMineR_2.9
## [17] viruslearner_0.0.2
##
## loaded via a namespace (and not attached):
## [1] kknn_1.3.1 sandwich_3.1-0 rlang_1.1.3
## [4] magrittr_2.0.3 applicable_0.1.0 multcomp_1.4-25
## [7] compiler_4.3.2 mgcv_1.9-0 vctrs_0.6.5
## [10] pkgconfig_2.0.3 fastmap_1.1.1 backports_1.4.1
## [13] labeling_0.4.3 utf8_1.2.4 rmarkdown_2.25
## [16] prodlim_2023.08.28 tzdb_0.4.0 xfun_0.43
## [19] cachem_1.0.8 jsonlite_1.8.8 flashClust_1.01-2
## [22] recipes_1.0.10 highr_0.10 parallel_4.3.2
## [25] cluster_2.1.4 R6_2.5.1 bslib_0.6.1
## [28] stringi_1.8.3 parallelly_1.37.1 rpart_4.1.21
## [31] car_3.1-2 jquerylib_0.1.4 estimability_1.4.1
## [34] Rcpp_1.0.12 knitr_1.45 future.apply_1.11.1
## [37] zoo_1.8-12 Matrix_1.6-1.1 splines_4.3.2
## [40] nnet_7.3-19 igraph_1.6.0 timechange_0.3.0
## [43] tidyselect_1.2.0 rstudioapi_0.15.0 abind_1.4-5
## [46] yaml_2.3.8 timeDate_4032.109 vdiffr_1.0.7
## [49] codetools_0.2-19 listenv_0.9.1 lattice_0.21-9
## [52] withr_3.0.0 evaluate_0.23 future_1.33.1
## [55] survival_3.5-7 RcppParallel_5.1.7 pillar_1.9.0
## [58] TeachingDemos_2.12 carData_3.0-5 DT_0.31
## [61] generics_0.1.3 hms_1.1.3 munsell_0.5.0
## [64] scales_1.3.0 globals_0.16.2 plotmo_3.6.2
## [67] xtable_1.8-4 leaps_3.1 class_7.3-22
## [70] glue_1.7.0 emmeans_1.9.0 scatterplot3d_0.3-44
## [73] proxyC_0.3.4 tools_4.3.2 data.table_1.15.2
## [76] gower_1.0.1 ggsignif_0.6.4 mvtnorm_1.2-4
## [79] grid_4.3.2 plotrix_3.8-4 ipred_0.9-14
## [82] colorspace_2.1-0 nlme_3.1-163 earth_5.3.2
## [85] Formula_1.2-5 cli_3.6.2 workflows_1.1.4
## [88] parsnip_1.2.0 fansi_1.0.6 lava_1.8.0
## [91] gtable_0.3.4 rstatix_0.7.2 sass_0.4.8
## [94] digest_0.6.35 ggrepel_0.9.4 TH.data_1.1-2
## [97] htmlwidgets_1.6.4 farver_2.1.1 htmltools_0.5.7
## [100] lifecycle_1.0.4 hardhat_1.3.1 multcompView_0.1-9
## [103] MASS_7.3-60