Your new experience awaits. Try the new design now and help us make it even better

ORIGINAL RESEARCH article

Front. Appl. Math. Stat., 05 December 2025

Sec. Statistics and Probability

Volume 11 - 2025 | https://doi.org/10.3389/fams.2025.1664415

Measuring the performance of LPA, LCGA, LGCM, and GMM in identifying the homogenous subgroups (latent classes) within the wider heterogeneous population of patients on DTG

  • 1USAID/Malawi Learn to Perform, Lilongwe, Malawi
  • 2School of Science and Technology, Department of Mathematical Sciences, Malawi University of Business and Applied Sciences, Blantyre, Malawi
  • 3School of Science and Technology, Department of Public and Environmental Health Sciences, Malawi University of Business and Applied Sciences, Blantyre, Malawi

Background: Identifying heterogeneity in longitudinal data is critical for understanding diverse trajectories in clinical and epidemiological research. Traditional analytical methods often fail to distinguish latent subpopulations. More advanced statistical models such as Latent Profile Analysis (LPA), Latent Class Growth Analysis (LCGA), Latent Growth Curve Modeling (LGCM), and Growth Mixture Modeling (GMM) provide a data-driven approach to uncovering the distinct patterns. This study evaluated the performance of these models in classifying longitudinal weight gain trajectories.

Methods: A retrospective longitudinal dataset of 3,525 HIV positive individuals on DTG based regimen with repeated weight measurements over 24 months was analysed. Models were implemented using a stepwise approach: (1) LPA was applied to identify latent subgroups based on weight gain patterns without incorporating time, (2) LCGA and LGCM modelled individual trajectories assuming class-invariant and class-specific variances, respectively, and (3) GMM incorporated within-class variability to allow flexible trajectory shapes. Model performance was assessed using Akaike Information Criterion (AIC), Bayesian Information Criterion (BIC), Deviance Statistics, and log-likelihood. Average Posterior Probability (AvePP) was used to evaluate classification certainty by measuring the mean probability of individuals being correctly classified into their assigned latent class. Clinical interpretability was also considered to assess real-world applicability.

Results: LCGA demonstrated the best model fit, with the lowest AIC (42,239.43) and BIC (42,301.1) and the highest log-likelihood (−21,109.71), identifying three distinct weight gain trajectories in the process. Although GMM captured greater within-class variability, LCGA demonstrated superior fit statistics, with the lowest AIC (42,239.43) and BIC (42,301.1) and the highest log-likelihood (−21,109.71), identifying three distinct trajectories.

Conclusion: LCGA and GMM were the most effective models for identifying distinct latent trajectories, with LCGA demonstrating the best overall fit for our data. These findings emphasize the importance of appropriate model selection in longitudinal data analysis, as different approaches yield varying capacities to detect meaningful subpopulations. Selecting an optimal model is essential for improving trajectory classification and supporting evidence-based decision-making in clinical and epidemiological research.

1 Introduction

Body weight gain associated with antiretroviral therapy (ART), particularly with integrase strand transfer inhibitors like Dolutegravir (DTG), has raised significant clinical concerns. Although DTG has transformed HIV treatment by improving viral suppression rates and patient outcomes, emerging evidence links it to excessive weight gain, with heterogeneous responses across patient groups (1). Some patients experience minimal changes, while others show substantial increases, underscoring the need for methods that capture diverse weight gain trajectories rather than average trends.

Advanced statistical approaches Latent Profile Analysis (LPA), Latent Class Growth Analysis (LCGA), Latent Growth Curve Modeling (LGCM), and Growth Mixture Modeling (GMM) are increasingly applied to reveal latent subgroups in longitudinal data (2, 18). Each method offers distinct strengths: LPA identifies subgroups from continuous measurements; LCGA models trajectories assuming no within-class variability (3); LGCM incorporates individual variability in continuous outcomes (4, 5); and GMM integrates class identification with variability, allowing heterogeneity within and between classes (6, 7). While powerful, these models differ in assumptions, complexity, and interpretability.

Comparative evidence is limited on their performance in identifying DTG-related weight gain trajectories. Prior work suggests GMM can capture unobserved subgroups with moderate-to-high classification accuracy (8, 17, 26), but its complexity raises challenges for convergence and interpretation. Systematically comparing LPA, LCGA, LGCM, and GMM within a single dataset can clarify their relative strengths in modeling DTG-related weight gain.

This study evaluates these four methods in terms of model fit (AIC, BIC), classification accuracy (entropy, posterior probabilities), variance components, and parameter estimates. By identifying distinct weight gain trajectories, we aim to inform clinicians on subgroups at heightened risk, enabling timely interventions such as nutritional counselling, metabolic screening, and treatment adjustments to mitigate complications while sustaining viral suppression.

2 Methods

This is a retrospective observational study utilizing secondary data collected from 40 health facilities in eight districts supported by the Elizabeth Glaser Pediatric AIDS Foundation (EGPAF) in southern and central Malawi. The study focused on people living with HIV (PLWH) placed on Dolutegravir (DTG)-based regimen and were alive between 2018 and 2021. The targeted facilities included government of Malawi and Christian Health Association of Malawi (CHAM) owned establishments, supported by EGPAF through the deployment of nurses and clinicians, as well as the provision of medical supplies, electronic database systems, vehicles, and other essential resources. Body weight measurements were recorded at baseline and subsequently at 3-month intervals over a 24-month period to monitor health outcomes longitudinally. To evaluate the performance of different modeling approaches in capturing heterogeneity in body weight gain among individuals on dolutegravir (DTG)-based regimens, we applied and compared four latent variable models: Latent Profile Analysis (LPA), Latent Class Growth Analysis (LCGA), Latent Growth Curve Modeling (GCM), and Growth Mixture Modeling (GMM). LPA was employed to identify unobserved subgroups based on weight gain patterns, assuming that the observed categorical weight measures were generated by underlying latent classes while maintaining local independence (2, 21). LCGA extended LPA by incorporating a longitudinal dimension, allowing for trajectory-based classification while assuming class-specific fixed effects for intercepts and slopes (3) Both LPA and LCGA included fixed and random effects for class membership and estimated posterior probabilities to assign individuals to latent classes. Model selection was guided by statistical fit indices, including Akaike Information Criterion (AIC), Bayesian Information Criterion (BIC), deviance statistic, and log-likelihood ratio tests (9), ensuring an optimal balance between goodness-of-fit and model interpretability.

To further evaluate model performance, we fitted GCM and GMM to assess the ability of these approaches to capture continuous growth trajectories. GCM estimated fixed and random effects for both intercept and slope parameters, assuming a single population structure with individual variability (4). GMM extended GCM by introducing latent trajectory classes, allowing for the identification of distinct subpopulations with unique growth patterns (6). The GMM incorporated linear and quadratic slopes and permitted freely estimated residual variances across classes, providing greater flexibility in modeling heterogeneity in weight gain. Model performance was assessed using log-likelihood values, deviance statistics, and parameter estimates, including intercepts, slopes, and their respective residual standard errors (RSE).

2.1 Data collection

We obtained routinely collected DTG based regimen treatment patient-level data for people receiving HIV care in EGPAF-supported ART facilities in Malawi. We used two sources: the Malawi District Health Information Software version 2 (DHIS2) and facility-based ART electronic medical records systems (EMRS). Strategic information and evaluation (SI&E) officers extracted the data using a Microsoft Excel tool.

Data collection tools, developed in accordance with the study protocol, were digitized and deployed online for use across the sampled health facilities. Twenty-one nurses and clinicians were recruited to collect the data using tablets configured with ODK-X software for quick and secure online data transfer. Data were synchronized to a central server every 2 days after verification and proofreading by field supervisors. Quality control measures included: embedded logic checks during data entry and random sampling of data by supervisors to ensure accuracy, completeness, and protocol adherence. A standardized data extraction was designed and administered to ensure consistent and comprehensive data captured across all 40 targeted health facilities.

2.2 Sample and data sources

The study sample comprised 3,525 adult HIV-positive patients receiving DTG-based ART. Eligibility criteria required participants to be aged 18 years or older and have at least three recorded body weight measurements during the study period. Two groups were compared in this study: patients who switched to DTG from another regimen, ART-experienced and patients who initiated treatment with DTG as their first regimen, ART-naïve patients: Clinical parameters were extracted from medical records, including patient cards, ART registers, CD4 count logbooks, and laboratory registers. “Time 0” was defined as the point of regimen change to DTG for ART-experienced patients or the initiation of DTG-based ART for ART-naïve patients. The parameters retrieved included: demographics: gender, and date of birth. Anthropometrics: weight (kg) at ART initiation and during follow-up, height (cm) at ART initiation date, ART Data: regimen type, regimen start and stop dates, ART start date, and treatment outcome, HIV-Related Data: date of confirmed HIV diagnosis, date of treatment initiation, viral load results and viral load capture date, CD4 cell counts, and duration of viral suppression until Time 0.

Data were obtained from ART registers, patient cards, laboratory logbooks, HIV Testing and Counseling (HTC) registers, viral load registers, CD4 count registers, and electronic medical records (EMR). The facilities were sampled from districts in the central region (Mchinji, Dedza, Ntcheu) and southern region (Blantyre, Neno, Thyolo, Zomba, Chiradzulu).

2.3 Inclusion and exclusion criteria

Patients were included into the study if they were on ART and alive between 2018 and 2021 and data values for the following key variables were available at all data capture points: weight, regimen type, age, and sex. Patients were excluded from this study if they enrolled on ART after November 2020, had missing data values on the key variables (weight, regimen type, age, and sex) at any data capture point.

2.4 Sampling techniques and sample size determination

A single-stage sampling technique using probability proportional to size (PPS) was employed to select 40 health facilities from the 179 supported by EGPAF in eight districts and a sample size of at least 3,500 was determined.

2.5 Statistical analysis

The study employed four latent variable models; LPA, LCGA, LGCM, and GMM to identify heterogeneity in body weight gain trajectories. Model performance was evaluated using statistical fit indices (Akaike Information Criterion [AIC], Bayesian Information Criterion [BIC], sample-size adjusted BIC [SSBIC], log-likelihood, and entropy), classification quality (posterior probabilities), and interpretability of identified trajectories. Descriptive statistics summarized patient characteristics, with means, medians, and standard deviations (SDs) for continuous variables, and proportions for categorical variables. Independent t-tests compared mean weight gain by gender, ART status (naïve vs. experienced), and age categories. A significance threshold of p < 0.05 was applied. All models were estimated in R (10) using the tidyLPA (11), lcmm (12), and lavaan (13) packages. Missing data were addressed using Full Information Maximum Likelihood (FIML) under the assumption of Missing at Random (MAR) (27).

Figure 1 provides a conceptual visualization of LPA, LCGA, GCM, and GMM and how they differ in capturing heterogeneity ranging from static profiles to longitudinal trajectories with or without within-class variability.

Figure 1
Four-panel graph comparing statistical analysis methods. Top left: Latent Profile Analysis (LPA) with blue and red X marks for profiles one and two. Top right: Latent Class Growth Analysis (LCGA) with blue and red lines showing class slopes one and two. Bottom left: Growth Curve Modeling (GCM) displays a black mean trajectory line with dashed intervals. Bottom right: Growth Mixture Modeling (GMM) features blue and red lines for class mean slopes one and two with dashed intervals. Each panel has

Figure 1. Conceptual comparison of latent variable models compared in this study.

2.6 Representative model equations

Below are the representative model equations for Latent Profile Analysis (LPA), Latent Class Growth Analysis (LCGA), Growth Curve Modeling (GCM) and Growth Mixture Modeling (GMM).

2.7 Latent profile analysis (LPA)

Latent Profile Analysis (LPA) is a person-centered statistical technique that is used to identify unobserved subgroups within a population based on continuous observed variables. It classifies individuals into distinct profiles that share similar patterns of responses (25). LPA uncovers hidden heterogeneity, enabling more precise interpretation and targeted insights from complex data. Below is a standard LPA notation equation, illustrating how the model represents these latent profiles.

f ( y i ) = c = 1 c π c j = 1 j f ( y ij θ jc )
with c = 1 c f ( θ i = θ ) = 1

Where:

y i is the vector of observed indicators for individual i.

c is the number of latent classes,

π c is the probability of membership in latent class cc (mixing proportion),

y ij is the observed value of indicator j for individual i,

θ jc are the class-specific parameters for indicator j in class c.

f ( y ij θ jc ) is the probability density function of the observed indicator yij given the parameters θjc.

2.8 Latent class growth analysis (LCGA)

Latent Class Growth Analysis (LCGA) is a person-centered method that identifies unobserved subgroups based on longitudinal trajectories. Unlike LPA, LCGA focuses on patterns of change over time rather than cross-sectional profiles. LCGA fixes the within-class variances of growth factors (intercepts and slopes) to zero (24). The following standard LCGA equation illustrates how these latent trajectory classes are modeled.

y it k = β 0 k + β 1 k t + β 2 k t 2

Where:

y it k is an outcome for individual ii at time t in latent class k.

β 0 k is a class-specific intercept.

β 1 k t is a class-specific linear slope.

β 2 k t 2 is a class-specific quadratic slope.

2.9 Latent growth curve modeling (LGCM)

Growth Curve Modeling (GCM) examines individual trajectories of change over time. Unlike LCGA, LGCM models continuous variation across individuals rather than classifying them into discrete latent classes (20, 22). The following equation illustrates how these individual growth trajectories are represented.

Y it = β 0 + β 1 t + β 2 t 2 + u 0 i + u 1 i t + u 2 i t 2 + ε it

Where:

Y it is outcome for individual i at time t.

β 0 , β 1 are the fixed (population-level) intercept and slope.

β 2 is a quadratic slope, optional term for acceleration/deceleration in growth.

u 0 i . u 1 i N ( 0 , Ψ ) = random effects for individual deviations.

ε it N ( 0 , σ 2 ) Residual error at time t for individual i, assumed normally distributed.

2.10 Growth mixture modeling (GMM)

Growth Mixture Modeling (GMM) identifies latent subgroups with distinct growth trajectories while allowing for individual variation within each class (23). Unlike LCGA, GMM models both between-class differences and within-class heterogeneity change over time (19). The following standard GMM equation illustrates how these latent trajectory classes and individual variations are represented:

Y it ( c ) = β 0 c + β 1 c t + β 2 c t 2 + u 0 ic + u 1 ic t + u 2 ic t 2 + ε it ( c )

Where:

Y it ( c ) is the observed continuous outcome for individual i at time t in class c.

β 0 c , β 1 c = fixed inteecept and slope for class c .

u 0 ic , u 1 ic N ( 0 , Ψ c ) =  individual-level random effects (intercept and slope deviations) within class c.

β 2 c t 2 = class specific quadratic slope (optional).

ε it c ~ N ( 0 , σ c 2 )  = residual error for class c.

2.11 Stability of standard errors through residual constraints

Constraining class-specific residuals stabilizes standard errors, particularly for intercept estimates, allowing a clearer assessment of how adding quadratic terms affects growth trajectories Class-specific residual variances were held constant across the linear and quadratic models to simplify estimation, ensure comparability of parameter estimates, and maintain interpretability of growth trajectories. This was done to stabilize standard errors and ensure that differences between models reflect changes in trajectory shape rather than residual variability.

2.12 Sensitivity analysis

To ensure the robustness of the findings, sensitivity analyses were conducted. These included varying the initial starting values for each model to minimize the risk of converging on local maxima. Additionally, model stability was assessed by systematically altering the number of latent classes to evaluate the consistency and reliability of the results across different model specifications. Furthermore, alternative model specifications were tested to assess the robustness of the identified trajectories. These included allowing for class-specific variances in the intercept and slope terms (i.e., relaxing the assumption of homoscedasticity across classes), testing models with and without quadratic growth terms, and comparing LCGA models with growth mixture models (GMM) that permit within-class variability. Additionally, the inclusion of covariates predicting class membership was examined to determine the influence of external variables on classification. The consistency of class membership probabilities and model fit indices across these specifications supported the stability and validity of the final model solution.

2.13 Ethical considerations

Ethical approval for the study was obtained from the National Health Sciences Research Committee (NHSRC) of Malawi’s Ministry of Health, (protocol V2.09 # 18/09/2139), and registered with USA’s Office of the Human Research Protections (OHRP) IRB # IRB00003509, FWA 99999576. Ethical review authorities in 40 of the participating health facilities independently reviewed and approved the data collection protocols from their facilities. No Individual written consent was required because this was a retrospective data collection process where there was no direct contact with patients. No identifiers (ART numbers, names, home addresses, or phone numbers) were extracted from any of the data sources used. Data was collected anonymously and solely from hospital records.

3 Results

3.1 Descriptive analysis of the sampled participants

Table 1 shows that male patients gained an average of 1.23 kg, while females gained 1.65 kg at 12 months from DTG initiation or switch (p = 0.446). ART-naïve patients experienced a higher mean weight gain of 2.29 kg compared to 1.39 kg for ART-experienced patients. Among males, the mean weight gain was significantly different between ART-experienced (1.02 kg) and ART-naïve (3.66 kg) individuals (p = 0.012). However, for females, the difference between ART-experienced (1.71 kg) and ART-naïve (1.19 kg) patients was not statistically significant (p = 0.6172).

Table 1
www.frontiersin.org

Table 1. Descriptive statistics of the sampled participants.

Younger patients demonstrated greater weight gain, with those aged 0–17 years gaining an average of 3.45 kg, followed by 18–34 years (2.00 kg), 35–49 years (0.68 kg), and the lowest weight gain observed in the 50 + years group. When comparing weight gain between ART-naïve and ART-experienced patients within these age categories, no significant differences were found, as p-values across all groups ranged from 0.2002 to 0.8094, indicating that treatment experience did not significantly influence weight gain across different age groups.

Table 2 presents model fit statistics for four latent modeling approaches: Latent Profile Analysis (LPA), Latent Class Growth Analysis (LCGA), Latent Growth Curve Modeling (LGCM), and Growth Mixture Modeling (GMM) examining weight gain trajectories among patients on DTG-based ART. Across all approaches, models with more than one class generally improved fit as indicated by lower AIC values. For LPA, the 2-class model demonstrated the best fit (AIC = 34,683.88), suggesting two distinct weight gain profiles. In LCGA, the 2-class solution was optimal (AIC = 42,422.59), capturing heterogeneity in growth trajectories. LGCM indicated that a 3-class model provided the best balance between fit and complexity (AIC = 44,674.91), reflecting variation in continuous weight trajectories over time. For GMM, the 1-class model showed marginally lower AIC (42,886.66), although additional classes captured potential subgroup patterns. Overall, these results indicate that different modeling approaches reveal distinct patterns of weight gain, with the 2-class LPA and LCGA models and 3-class LGCM model providing the most parsimonious representations of heterogeneity in patient body weight responses.

Table 2
www.frontiersin.org

Table 2. Model fit statistics across LPA, LCGA, LGCM, and GMM for weight gain trajectories.

3.2 Identifying latent subgroups based on body weight gain patterns through latent profile analysis (LPA)

3.2.1 Best LPA model selection

Based on the AIC and BIC values, the class 2 model provides the best balance between model fit and complexity. The BIC is lowest for the class 1 model, but the AIC is smallest for the class 2 model.

The deviance statistics are almost identical for all models with 2, 3, and 4 classes, indicating that increasing the number of classes did not improve model fit substantially.

3.2.2 Overfitting concern

The 3-class and 4-class models show higher AIC and BIC values, suggesting they might overfit the data without providing much additional explanatory power over the 2-class model. The 2-class model is the most efficient and appropriate model within the LPA for DTG data, offering a good fit without the complexity of more classes.

To explore patterns of patients’ body weight gain, the probabilities of belonging to different classes by their body weight gain characteristics, across three distinct latent classes were identified in the analysis. Table 3 illustrates the probably of each patient belonging to each of the three classes by their weight gain characteristics.

Table 3
www.frontiersin.org

Table 3. Response probabilities for weight gain categories by latent class.

Each of the classes, as presented in Table 4, reflects unique subgroups within the patients characterized by different probabilities of experiencing weight gain in three categories: no body weight gain (0 kgs), body weight gain >0 and <5 kgs, and weight gain ≥5 kgs. Class 1 is associated with a high likelihood of significant body weight gain (≥5 kgs), with a smaller probability for no weight gain or moderate weight gain (>0 and <5 kgs). Class 2 shows more evenly distributed probabilities, with a notable likelihood of moderate weight gain, followed by significant weight gain and no weight gain. Class 3 is predominantly split into two, no weight gain and moderate weight gain. These item-response probabilities offer a deeper understanding of the distinct weight gain trajectories within the patient population. They also assist in identifying potential factors that may contribute to different weight gain patterns across the latent classes, further guiding clinical decision-making and personalized treatment strategies.

Table 4
www.frontiersin.org

Table 4. Proportions of individuals across LCGA weight gain trajectories.

Table 5 presents the latent class profiles for body weight gain associated with dolutegravir (DTG) based on two key factors: the proportion of individuals on antiretroviral therapy (ART) for ≥ 1 year and the proportion with obesity. Class 1illustrates the highest rates, with 35.75% on ART for ≥ 1 year and 24.09% with obesity. Class 2 shows the lowest rates, with 16.45% on ART for ≥ 1 year and 1.19% with obesity. Class 3 is intermediate, with 27.80% on ART for ≥ 1 year and 5.54% with obesity. The findings highlight differences in periods on DTG based regimen and obesity prevalence among the patients in the three classes.

Table 5
www.frontiersin.org

Table 5. Latent class profiles for DTG weight gain.

3.3 Identification of weight gain trajectory subgroups over time in patients on DTG-based ART regimens

Table 4 summarizes class proportions and corresponding sample sizes for the Latent Class Growth Analysis (LCGA) model. Class 1 (Moderate Growth) represents the largest group, comprising 97.62% of the sample (n = 3,441). Class 2 (Rapid Growth) accounts for 0.54% (n = 19), while Class 3 (Minimal/No Growth) includes 1.84% of the sample (n = 65). These results indicate that the majority of individuals experienced moderate gain, with smaller proportions showing rapid or minimal/no growth. The majority of individuals fall into Class 1, indicating moderate body weight gain is the most common trend. Class 2 (Rapid body weight gain) and Class 3 (Minimal/No gain) are much smaller groups, but their needs may differ and require targeted interventions. Understanding the characteristics of these smaller groups could help improve personalized care strategies.

Table 6 shows that the LCGA fixed effects differed across the three body weight gain classes. In Class 1 (Moderate Gain), linear and quadratic intercepts were nearly identical (53.05 vs. 53.04), indicating that the quadratic term adds little to model fit. In Class 2 (Rapid Gain), the linear intercept (89.37) slightly exceeded the quadratic (89.12), both significant (p < 0.001). In Class 3 (Minimal/No Gain), the quadratic intercept (13.32) slightly exceeded the linear (12.72), showing small differences. These results highlight the varying contributions of linear and quadratic terms across classes.

Table 6
www.frontiersin.org

Table 6. Fixed and random effects estimates for LCGA across weight gain trajectories.

Random-effects analysis showed similar variability in intercepts (linear 110.51 vs. quadratic 110.57) and identical residual standard errors (3.68 ± 0.05), indicating that differences stem mainly from fixed effects. The largest fixed-effects differences occurred in Classes 2 and 3. Including covariates reduced the variance of the linear intercept (57.23), suggesting substantial influence on linear growth, while the quadratic intercept variance remained stable (110.58), indicating limited impact on non-linear patterns.

Table 7 presents the distribution of participants across weight gain classes and the corresponding posterior classification probabilities. The table shows that most individuals (93.22%) belong to Class 1, representing “Moderate Weight Gain.” Class 2 (5.59%) reflects “Rapid Weight Gain,” a smaller but clinically relevant subgroup requiring closer monitoring. Class 3 (1.13%) includes those with “Minimal or No Weight Gain,” highlighting the need for targeted interventions, while Class 4 (0.06%) represents rare outliers, possibly exceptional responses, or data anomalies. These classifications provide insights into weight gain patterns and can guide personalized care and interventions for different subgroups.

Table 7
www.frontiersin.org

Table 7. Posterior classification probabilities and class membership distribution.

3.4 LCGA class separation

The latent class growth analysis models showed increasing classification precision with more classes. The 1-class model had an entropy of 0.00, indicating no meaningful separation, while the 2-class model improved slightly to 0.03. The 3-class model achieved substantially better classification with an entropy of 0.63, suggesting moderate certainty in assigning individuals to distinct trajectories. Overall, the results indicate that moving from one to three classes provides clearer differentiation of growth patterns in the data. Refer to Figure 2.

Figure 2
Line graph displaying entropy across three Latent Class Growth Analysis models (LCGA). The x-axis represents LCGA models with labels one-class, two-class, and three-class, while the y-axis shows entropy values from zero to one. The graph indicates a dramatic increase in entropy, starting near zero for one-class and two-class models, rising sharply to just under one for the three-class model.

Figure 2. LCGA 3 class entropy values.

The mean posterior probabilities indicate how confidently individuals are assigned to each latent class, with higher values reflecting clearer separation between classes. In our 3-class LCGA model, Class 1, Class 2, and Class 3 show mean posterior probabilities of 0.91, 0.97, and 0.90, respectively, suggesting good classification quality. These patterns are illustrated in Figure 3, which visualizes the distribution of posterior probabilities across the latent classes.

Figure 3
Line graph showing mean posterior probabilities across three latent classes for a three-class LCGA model. Class 1 decreases from one to zero, Class 2 increases from zero to one and then decreases, and Class 3 increases linearly from zero to one. Each class is represented by a different color: red for Class 1, green for Class 2, and blue for Class 3.

Figure 3. Posterior probability patterns across 3 Class LCGA model.

3.5 Identification of average (single) growth trajectories of patients’ weight gain over time

Latent Growth Curve Model (LGCM) was used to model individual body weight gain patterns over time by estimating both the initial status and the rate of growth of a given variable, Unlike Latent Class Growth Analysis (LCGA), which categorizes individuals into latent classes based on their growth trajectories, LGCM focuses on estimating continuous trajectories of growth for each participant.

Table 8 presents LGCM parameter estimates, highlighting distinct weight gain trajectories across the three classes. For fixed effects, Class 1 (Moderate Body Weight Gain) shows no significant linear effect (p = 0.859) but a significant quadratic effect (p < 0.001), indicating a curved trajectory over the 12 months on DTG-based regimens. Class 2 (Rapid Gain) has a significant negative linear intercept (p < 0.001) but a non-significant quadratic effect, reflecting a consistent trajectory from a lower starting point. Class 3 (Minimal/No Gain) shows no significant linear or quadratic effects, indicating a relatively flat trajectory.

Table 8
www.frontiersin.org

Table 8. Fixed and random effects estimates for LGCM across weight gain trajectories.

Random-effects analysis reveals substantial variability in baseline weight, with intercept variances highest in Class 1 (0.00931) and lower in Classes 2 (0.00271). Residual standard errors are consistent between linear and quadratic models, highest in Class 1 (12.29 ± 0.24 linear; 12.51 ± 0.24 quadratic), moderate in Class 2 (9.32 ± 0.19; 9.45 ± 0.19), and lowest in Class 3 (7.46 ± 0.18; 7.58 ± 0.18), indicating that weight gain is least predictable in Class 1 and most predictable in Class 3. The slight increase in residual error with the quadratic model suggests minimal improvement in prediction. Overall, Class 1 exhibits curved growth and high individual variability, Class 2 shows moderate predictability with a consistent trajectory, and Class 3 remains stable and well-explained.

3.6 Identification of multiple subgroups with distinct weight gain trajectories over time

To identify multiple subgroups of weight gain trajectories while considering individual variabilities within those groups, we fitted unconditional Growth Mixture Model (GMM), combining the aspects of growth curve and mixture modeling to account for individual differences in patterns of change. This allowed for the analysis of heterogeneous developmental patterns, model complex, and non-linear changes across the 12 months. We compared its performance with LGCM in determining heterogeneous developmental patterns of body weight gain amongst patients placed on DGT. Table 9 presents the GMM fit statistics for three class model.

Table 9
www.frontiersin.org

Table 9. Fixed and random effects estimates for latent class growth analysis (GMM) across weight gain trajectories.

Table 9 presents the parameter estimates for both the 2-class and 3-class GMM models. Each model includes fixed effects (intercepts and slopes) that describe the average weight gain trajectory within each class, as well as random effects to account for individual-level variability.

The results indicate significant weight gain trajectories for both Class 2 and Class 3. For Class 2 (Rapid Weight Gain), the linear intercept coefficient is 52.65 (p = 0.00188), and the quadratic coefficient is 52.65 (p = 0.00084), suggesting both a significant baseline weight and a non-linear growth pattern over time. Similarly, Class 3 (Minimal/No Weight Gain) shows a significant linear intercept of 53.84 (p < 0.0001) and an identical quadratic coefficient, indicating a stable weight pattern with no substantial increase. These results suggest that individuals in Class 2 experience notable weight gain, whereas those in Class 3 exhibit minimal or no weight gain over time. The random effects demonstrate considerable variability in baseline weight across trajectories in comparison to classes1 and 2. The variance in intercepts is 143.78 for the linear model and 144.45 for the quadratic model in Class 2, suggesting substantial individual differences in initial weight. In contrast, Class 3 exhibits a lower variance in intercept (59.94), reflecting less variation in baseline weight. The residual standard errors are 3.86 ± 0.12 and 3.80 ± 0.13 for Class 2, and 3.61 ± 0.11 and 3.59 ± 0.11 for Class 3, indicating unexplained variability in weight gain patterns for the two models. These findings emphasize the importance of considering both linear and quadratic components when modeling weight trajectories, particularly in individuals on dolutegravir (DTG). The presence of significant variation in weight gain patterns highlights the need for individualized treatment strategies that account for different weight gain trajectories.

3.7 Comparative evaluation of latent variable models for longitudinal data analysis

Figure 4 illustrates class-specific model performance for LCGA, LGCM, and GMM using Log-Likelihood, AIC, and BIC, presented on a dual y-axis to retain the metrics in their original scales. Log-Likelihood is shown with solid lines, while AIC (dashed) and BIC (dot-dash) are plotted on the primary axis.

LCGA demonstrated the best overall fit, with progressively improved performance across classes and achieving the lowest AIC (42,562.61), lowest BIC (42,624.29), and highest Log-Likelihood (−21,271.31) at Class 3. In contrast, LGCM consistently underperformed, displaying higher AIC (44,674.91), higher BIC (44,736.59), and lower Log-Likelihood (−22,327.45) across all class structures. GMM showed competitive but relatively stable performance, with minimal variation in AIC (42,898.65), BIC (42,972.66), and Log-Likelihood (−21,437.32) across classes.

Overall, LCGA offered the most optimal balance between model fit and interpretability, followed by GMM, while LGCM was the least optimal. The dual-axis plot enables clear visualization of these trends, facilitating comparison across Log-Likelihood, AIC, and BIC. These results underscore LCGA—and to a lesser extent GMM as the preferred approaches for capturing heterogeneity in longitudinal weight-gain trajectories while minimizing the risk of overfitting (Figure 5).

Figure 5
Line graph titled

Figure 5. Model performance comparison by class specific AIC values.

Figure 4
Line graph titled

Figure 4. Comparative evaluation of latent variable models.

4 Discussion

The key finding of this study is that LCGA provided the best statistical fit for identifying weight gain trajectories among PLHIV on DTG-based ART, suggesting that patients’ weight changes clustered into relatively homogeneous subgroups with distinct patterns. This has important clinical implications: DTG-related weight gain does not appear to follow a single continuous distribution but instead reflects sharply divergent courses, with some patients gaining minimally and others experiencing substantial increases. Identifying these classes early may enable more targeted interventions, such as nutritional counselling or closer metabolic monitoring for high-risk groups.

The performance of LCGA highlights the value of modeling distinct subgroups when clinical outcomes are heterogeneous. While LGCM allowed for individual variability, it assumed a single overarching trend, which obscured important subgroup differences. LPA was limited by its inability to incorporate longitudinal dynamics. Although GMM offers the theoretical advantage of capturing both between- and within-class variability, it did not outperform LCGA in this study and required substantially more complex estimation. This suggests that for ART-related weight trajectories, parsimony may be preferable, especially when the goal is to identify clinically interpretable patterns rather than maximize statistical flexibility. The high variances but nearly identical intercepts observed in the GMM are likely indicative of class overlap, which may result in over-extraction of latent classes.

Nevertheless, GMM remains valuable when within-class heterogeneity is of substantive interest, for example in metabolic or cardiovascular outcomes where differences among patients following a “high-gain” trajectory could alter intervention strategies (14, 28). The choice between LCGA and GMM should therefore be guided by both theoretical expectations and the practical need for interpretability. In line with Nagin (7) and Masyn (15), these results underscore the importance of balancing model fit, complexity, and generalizability, while avoiding overfitting.

In practical terms, our findings suggest that LCGA offers a robust and interpretable tool for monitoring weight gain in HIV programs, allowing providers to flag patients who may be at risk of excessive weight gain while avoiding unnecessary complexity. GMM can serve as a complementary approach when researchers seek to understand variability within classes or when interventions must be tailored to subgroups with overlapping but distinct risk profiles. Together, these methods provide a methodological toolkit for refining HIV program monitoring and improving patient outcomes in the DTG era.

4.1 Balancing model fit and interpretability

These results underscore the need to balance model fit and interpretability. LPA may be sufficient for broad classification, but LCGA and GMM provide richer insights for more complex, time-dependent data. As Nagin (7) noted, model selection should consider both statistical adequacy and theoretical clarity. Masyn (15) warned of the potential for overfitting in highly flexible models like GMM, while Muthén (16) suggested validating latent classes using external samples to enhance generalizability. In conclusion, GMM emerged as the most informative model for capturing diverse body weight gain patterns among DTG-treated patients, followed by LCGA. However, researchers must carefully weigh the trade-offs between parsimony and explanatory depth when choosing an appropriate model for longitudinal analysis.

4.2 Clinical implications and future directions

Our analyses identified distinct body weight gain trajectories among patients on DTG-based regimens, revealing clinically relevant subgroups. The majority of patients fell into the moderate weight gain trajectory (Class 1, ~93%), exhibiting predictable and steady body weight changes. In contrast, smaller subgroups demonstrated rapid body weight gain (Class 2, ~5–6%) or minimal/no body weight gain (Class 3, ~1%), highlighting heterogeneity in DTG treatment response. Rapid gainers were more likely to be younger and ART-naïve, suggesting a heightened metabolic response to DTG initiation, while minimal gainers were older or ART-experienced, possibly reflecting metabolic resistance or prior treatment effects. These patterns were consistent across multiple modeling approaches (LPA, LCGA, LGCM, GMM), emphasizing the robustness of the findings. Clinicians can use these insights to stratify patients by risk of atypical weight changes and tailor monitoring protocols accordingly, particularly during the first 6–12 months of therapy when deviations from expected trajectories are most pronounced.

From a management perspective, patients identified in the rapid gain trajectory may benefit from proactive interventions such as dietary counselling, physical activity guidance, or early pharmacologic strategies (e.g., metformin in high-risk cases) to mitigate cardiometabolic complications. Conversely, patients in the minimal/no gain group may require assessment for underlying nutritional or metabolic concerns, with consideration of therapy adjustments if clinically warranted. Incorporating routine weight monitoring, stratified by baseline characteristics such as age, sex, and prior ART experience, can facilitate early identification of patients at risk of atypical weight trajectories. Future research should explore the mechanistic drivers of these differential responses and evaluate targeted intervention strategies to optimize outcomes, supporting a more personalized approach to DTG-based treatment.

4.3 Limitations and future research

This study has several limitations. First, it was based on a single cohort using routine program data, which may limit generalizability and introduces potential measurement error, particularly in weight assessments. Second, the analysis relied on secondary data, restricting control over variable availability and measurement precision, and the models did not account for time-varying covariates such as dietary changes, comorbidities, or treatment adherence, which may influence weight gain trajectories. Third, although model fit indices guided the selection of latent classes, some subjective judgment was required in determining the optimal number and interpretation of classes, introducing potential model selection bias. Quadratic random intercepts were not supported by our data, as the estimated variance converged to zero, indicating that individual differences in quadratic growth were negligible in this sample. Finally, while distinct weight gain patterns were identified, biological, genetic, or behavioural predictors that could explain subgroup membership were not integrated. Future research should validate these trajectory classes in independent cohorts, incorporate metabolic and genetic biomarkers, and explore behavioural and contextual factors influencing weight outcomes. Such work would enhance external validity and support more precise targeting of interventions in HIV care.

5 Conclusion

This study underscores the differential performance of Latent Profile Analysis (LPA), Latent Class Growth Analysis (LCGA), Latent Growth Curve Modeling (LGCM), and Growth Mixture Modeling (GMM) in analysing longitudinal data. Among these models, LCGA and GMM exhibited the most robust performance in capturing complex body weight gain trajectories, with LCGA performing slightly better in terms of model fit. The ability of LCGA and GMM to model both individual growth trajectories and latent subgroups within the population allows for a more nuanced understanding of weight gain patterns, which is particularly valuable in clinical settings where patient’s heterogeneity is a key concern. LPA, while useful for simpler applications, may not be as effective in capturing the complex dynamics of weight gain over time, as it does not account for changes within individuals across the study period. LGCM also showed limitations due to its assumption of a single trajectory for all participants, which may not reflect the variability seen in heterogeneous populations.

Future research should further explore the application of LCGA and GMM in clinical contexts, especially with larger and more diverse populations, to confirm their robustness and generalizability. Comparative studies with other advanced modeling techniques, such as multilevel growth models or machine learning approaches, would also be beneficial to refine our understanding of how to best model complex longitudinal data in healthcare research. Ultimately, this study emphasizes the importance of selecting the right modeling approach based on the complexity of the data, balancing model fit with interpretability, to support evidence-based clinical decision-making.

Data availability statement

The raw data supporting the conclusions of this article will be made available by the authors, without undue reservation.

Ethics statement

The studies involving humans were approved by Ethical approval for the study was obtained from the National Health Sciences Research Committee (NHSRC) of Malawi’s Ministry of Health, (protocol V2.09 # 18/09/2139), and registered with USA’s Office of the Human Research Protections (OHRP) IRB # IRB00003509, FWA 99999576. Ethical review authorities in 40 of the participating health facilities independently reviewed and approved the data collection protocols from their facilities. No Individual written consent was required because this was a retrospective data collection process where there was no direct contact with patients. No identifiers (ART numbers, names, home addresses, or phone numbers) were extracted from any of the data sources used. Data was collected anonymously and solely from hospital records. The studies were conducted in accordance with the local legislation and institutional requirements. Written informed consent for participation in this study was provided by the participants’ legal guardians/next of kin.

Author contributions

HN: Conceptualization, Data curation, Formal analysis, Investigation, Methodology, Writing – original draft, Writing – review & editing. AM: Supervision, Validation, Writing – review & editing. SK: Supervision, Writing – review & editing. MK: Supervision, Writing – review & editing.

Funding

The author(s) declare that no financial support was received for the research and/or publication of this article.

Acknowledgments

The authors acknowledge the support of EGPAF for the data collection from health facilities.

Conflict of interest

The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Generative AI statement

The author(s) declare that Gen AI was used in the creation of this manuscript. AI was used for Language editing and grammar polishing.

Any alternative text (alt text) provided alongside figures in this article has been generated by Frontiers with the support of artificial intelligence and reasonable efforts have been made to ensure accuracy, including review by the authors wherever possible. If you identify any issues, please contact us.

Publisher’s note

All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.

References

1. Sereika, SM, Zheng, Y, Hu, L, and Burke, LE. Modern methods for modeling change in obesity research in nursing. West J Nurs Res. (2017) 39:1028–44. doi: 10.1177/0193945917697221

PubMed Abstract | Crossref Full Text | Google Scholar

2. Collins, LM, and Lanza, ST. Latent class and latent transition analysis: With applications in the social, behavioral, and health sciences. Hoboken, NJ: John Wiley & Sons (2010). doi: 10.1002/9780470567333

Crossref Full Text | Google Scholar

3. Jung, T, and Wickrama, KAS. An introduction to latent class growth analysis and growth mixture modeling. Soc Personal Psychol Compass. (2008) 2:302–17. doi: 10.1111/j.1751-9004.2007.00054.x

Crossref Full Text | Google Scholar

4. Bollen, KA, and Curran, PJ. Latent curve models: a structural equation perspective In: Latent curve models: A structural equation perspective. Hoboken, NJ: John Wiley & Sons (2006). doi: 10.1002/0471746096

Crossref Full Text | Google Scholar

5. Ram, N, and Grimm, KJ. Growth mixture modeling: a method for identifying differences in longitudinal change among unobserved groups. Int J Behav Dev. (2009) 33:565–76. doi: 10.1177/0165025409343765

PubMed Abstract | Crossref Full Text | Google Scholar

6. Muthén, B, and Shedden, K. Finite mixture modeling with mixture outcomes using the EM algorithm. Biometrics. (1999) 55:463–9. doi: 10.1111/j.0006-341X.1999.00463.x

PubMed Abstract | Crossref Full Text | Google Scholar

7. Nagin, D. Group-based modeling of development. Choice Rev Online. (2005) 43:1258. doi: 10.5860/choice.43-1258

Crossref Full Text | Google Scholar

8. Kwon, JY, Sawatzky, R, Baumbusch, J, Lauck, S, and Ratner, PA. Growth mixture models: a case example of the longitudinal analysis of patient-reported outcomes data captured by a clinical registry. BMC Med Res Methodol. (2021) 21:79. doi: 10.1186/s12874-021-01276-z

PubMed Abstract | Crossref Full Text | Google Scholar

9. Nylund, KL, Asparouhov, T, and Muthén, BO. Erratum: deciding on the number of classes in latent class analysis and growth mixture modeling: a Monte Carlo simulation study (structural equation modeling (2007) 14: 4 (535)). Struct Equ Model. (2008) 15:3320. doi: 10.1080/10705510701793320

Crossref Full Text | Google Scholar

10. R Core Team. (2019). R: A language and environment for statistical computing. In R foundation for statistical computing.

Google Scholar

11. Rosenberg, J, Beymer, P, Anderson, D, van Lissa, C j, and Schmidt, J. TidyLPA: an R package to easily carry out latent profile analysis (LPA) using open-source or commercial software. J Open Source Softw. (2018) 3:978. doi: 10.21105/joss.00978

Crossref Full Text | Google Scholar

12. Proust-Lima, C, Philipps, V, and Liquet, B. Estimation of extended mixed models using latent classes and latent processes: the R package lcmm. J Stat Softw. (2017) 78:i02. doi: 10.18637/jss.v078.i02

Crossref Full Text | Google Scholar

13. Rosseel, Y. Lavaan: an R package for structural equation modeling. J Stat Softw. (2012) 48:i02. doi: 10.18637/jss.v048.i02

Crossref Full Text | Google Scholar

14. Koethe, JR, Lagathu, C, Lake, JE, Domingo, P, Calmy, A, Falutz, J, et al. HIV and antiretroviral therapy-related fat alterations. Nat Rev Dis Primers. (2020) 6:48. doi: 10.1038/s41572-020-0181-1

Crossref Full Text | Google Scholar

15. Masyn, KE. Latent class analysis and finite mixture modeling In: TD Little, editor. The Oxford Handbook of Quantitative Methods in Psychology: Statistical Analysis, New York, NY: Oxford University Press. vol. 2 (2013) 551–611. doi: 10.1093/oxfordhb/9780199934898.013.0025

Crossref Full Text | Google Scholar

16. Muthén, B. Statistical and substantive checking in growth mixture modeling: comment on Bauer and Curran (2003). Psychol Methods. (2003) 8:369–77. doi: 10.1037/1082-989X.8.3.369

PubMed Abstract | Crossref Full Text | Google Scholar

17. Bauer, DJ, and Curran, PJ. The integration of continuous and discrete latent variable models: potential problems and promising opportunities. Psychol Methods. (2004) 9:3–29. doi: 10.1037/1082-989X.9.1.3

PubMed Abstract | Crossref Full Text | Google Scholar

18. Berlin, KS, Parra, GR, and Williams, NA. An introduction to latent variable mixture modeling (part 2): longitudinal latent class growth analysis and growth mixture models. J Pediatr Psychol. (2014) 39:188–203. doi: 10.1093/jpepsy/jst085

PubMed Abstract | Crossref Full Text | Google Scholar

19. Connell, AM, and Frye, AA. Growth mixture modelling in developmental psychology: overview and demonstration of heterogeneity in developmental trajectories of adolescent antisocial behaviour. Infant Child Dev. (2006) 15:609–21. doi: 10.1002/icd.481

Crossref Full Text | Google Scholar

20. Marcoulides, KM, and Trichera, L. Detecting unobserved heterogeneity in latent growth curve models. Struct Equ Model. (2019) 26:4591. doi: 10.1080/10705511.2018.1534591

Crossref Full Text | Google Scholar

21. Mathur, S, Pilgrim, N, Patel, SK, Okal, J, Mwapasa, V, Chipeta, E, et al. HIV vulnerability among adolescent girls and young women: a multi-country latent class analysis approach. Int J Public Health. (2020) 65:399–411. doi: 10.1007/s00038-020-01350-1

PubMed Abstract | Crossref Full Text | Google Scholar

22. Millstein, RA, Golden, J, Healy, BC, Amonoo, HL, Harnedy, LE, Carrillo, A, et al. Latent growth curve modeling of physical activity trajectories in a positive-psychology and motivational interviewing intervention for people with type 2 diabetes. Health Psychol Behav Med. (2022) 10:713–30. doi: 10.1080/21642850.2022.2104724

PubMed Abstract | Crossref Full Text | Google Scholar

23. Muthén, BO, and Muthén, LK. Integrating person-centered and variable-centered analyses: growth mixture modeling with latent trajectory classes. Alcohol Clin Exp Res. (2000) 24:882–91. doi: 10.1111/j.1530-0277.2000.tb02070.x

PubMed Abstract | Crossref Full Text | Google Scholar

24. Nieh, HP, Chang, CJ, and Chou, LT. Differential trajectories of fathers’ postpartum depressed mood: a latent class growth analysis approach. Int J Environ Res Public Health. (2022) 19:1891. doi: 10.3390/ijerph19031891

PubMed Abstract | Crossref Full Text | Google Scholar

25. Vasilenko, SA, Kugler, KC, and Lanza, ST. Latent classes of adolescent sexual and romantic relationship experiences: implications for adult sexual health and relationship outcomes. J Sex Res. (2015) 53:742–53. doi: 10.1080/00224499.2015.1065952

PubMed Abstract | Crossref Full Text | Google Scholar

26. Carrig, MM, and Bauer, DJ (n.d.). A Comparison of Cluster Analysis and Growth Mixture Modeling in the Recovery of Developmental Trajectory Classes. Chapel Hil: University of North Carolina

Google Scholar

27. Enders, CK, and Tofighi, D. The impact of misspecifying class-specific residual variances in growth mixture models. Struct Equ Modeling. (2008). 15. doi: 10.1080/10705510701758281

Crossref Full Text | Google Scholar

28. Rosenberg, J, Beymer, P, Anderson, D, van Lissa, C j, and Schmidt, J. TidyLPA: an R package to easily carry out latent profile analysis (LPA) using open-source or commercial software. J Open Source Softw. (2018) 3:978. doi: 10.21105/joss.00978

Crossref Full Text | Google Scholar

Keywords: latent class growth analysis, growth mixture model, model performance, trajectory analysis, longitudinal data, statistical model comparison

Citation: Nkhoma H, Mulaga AN, Kumwenda S and Kamndaya M (2025) Measuring the performance of LPA, LCGA, LGCM, and GMM in identifying the homogenous subgroups (latent classes) within the wider heterogeneous population of patients on DTG. Front. Appl. Math. Stat. 11:1664415. doi: 10.3389/fams.2025.1664415

Received: 11 July 2025; Revised: 09 October 2025; Accepted: 12 November 2025;
Published: 05 December 2025.

Edited by:

Mohammad G. M. Khan, University of the South Pacific, Fiji

Reviewed by:

Youssri Hassan Youssri, Egypt Uinversity of Informatics, Egypt
Muhammad Zohaib, Federal Directorate of Education Islamabad, Pakistan

Copyright © 2025 Nkhoma, Mulaga, Kumwenda and Kamndaya. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.

*Correspondence: Harrid Nkhoma, cGhkYXBzMjMtaGJua2hvbWFAbXViYXMuYWMubXc=

Disclaimer: All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.