1. Introduction
Abnormal adiposity in children and adolescents is one of the most pressing public health challenges of the 21st century, with prevalence rates rising dramatically over the past four decades in both high- and low- to middle-income countries [
1]. In 2022, more than 390 million children and adolescents aged 5 to 19 were overweight or obese worldwide [
1]. The presence of abnormal adiposity at an early age is associated with a wide range of metabolic, hepatic, mechanical, and psychological complications. Consistent evidence shows that insulin resistance, dyslipidemia, and hypertension increasingly appear in affected youth, heightening lifetime risk for type 2 diabetes and cardiovascular disease [
2]. In Spanish children, the OBESTIGMA study reported the psychological impact, such as low self-esteem, stigma, and discrimination related to obesity [
3]. The ALADINO 2023 study reported a prevalence of 36.1% for excess weight (overweight and obesity) among Spanish schoolchildren, reflecting a 4.5% reduction since 2019 [
4]. Despite this decline, Spain remains among the European Union countries with the highest prevalence of pediatric adiposity, with obesity rates remaining particularly persistent in low-income households [
5].
While these national surveillance programs provide essential population-level snapshots, significant knowledge gaps persist, limiting clinical and policy responses. First, current data primarily derive from cross-sectional designs, which offer a static view of prevalence, but fail to capture the longitudinal “inertia” or “fluidity” of weight status as children age [
6]. There is a lack of mathematical understanding of how and when children transition between BMI categories—data that is essential for identifying the biological and behavioral “traps” that prevent weight normalization [
7]. Second, there is a marked scarcity of data from secondary and tertiary hospital settings. Most surveillance occurs in schools, yet the “clinical filter” of hospital care often reveals a population with higher metabolic complexity and a more acute need for multidisciplinary intervention. Electronic Health Records (EHRs) offer a vast source of real-world data (RWD) that remains underutilized within the Spanish pediatric context, particularly for modeling dynamic health state transitions.
Consequently, this study aims to address these gaps by utilizing RWD from the HM Hospitales “Observatorio de la Obesidad Infantil” (2021–2026). Our primary objectives are: (1) to describe the frequency and temporal trends of abnormal adiposity across a multi-regional clinical cohort in Spain; and (2) to apply Markov chain modeling to evaluate the probability of transitioning between body mass index (BMI) categories over time, thereby identifying the specific developmental stages—or “critical windows”—where adiposity remains most plastic versus where it becomes entrenched.
2. Methods
2.1. Study Design
This is an observational cohort based on the analysis of RWD extracted from the EHRs of pediatric patients treated at HM Hospitales Group centers. The study is part of the Childhood Obesity Observatory, a continuous monitoring initiative promoted by the HM Hospitals Research Foundation (FiHM).
2.2. Data Source and Study Population
Data were extracted from the EMR of pediatrics, pediatric endocrinology, and cardiology services across the HM Hospitals Group, spanning the regions of Catalonia, Galicia, Castile and León, and Castile-La Mancha (January 2021 to March 2026). All patients aged 0 to 18 years with at least one record of anthropometric measurements were included.
Duplicate records from the same visit, as well as visits within a span of less than 4 weeks, were consolidated by retaining the most recent value per patient. Temporal trend analysis utilized comparable annual cohorts. A complete-case approach was implemented: individuals missing crucial baseline clinical variables (age, sex, height, or weight) or missing a valid longitudinal date tracker, were excluded from the final analysis. Patients with only a first visit were excluded from the longitudinal analysis.
2.3. Anthropometric Variables and Indicators
Weight was measured with a calibrated scale at each center. Height was measured with a stadiometer. BMI was calculated as weight/height
2 (kg/m
2). BMI z-score by age and sex was calculated using local tables (specifically, the Spanish pediatric growth references) as a reference: (
BMI-Reference BMI Mean)/
Reference BMI Standard Deviation [
8]. Weight categories were defined by z-score value as underweight (BMI z-score < −2), Normal weight (z-score ≥ −2 and z-score ≤ 1), overweight (z-score > 1 and z-score ≤ 2), and obesity (z-score > 2).
2.4. Ethical Considerations
The study was conducted in accordance with the principles of the Declaration of Helsinki, Spanish data protection legislation (Organic Law 3/2018, LOPDGDD), and the European Union’s General Data Protection Regulation (GDPR 2016/679). Data were anonymized before analysis.
The study protocol was approved by the HM Hospitals Research Ethics Committee in October 2023 (Code 23.10.2241-GHM). Due to the retrospective nature of the study and the use of fully anonymized data, the requirement for informed consent was waived by the Ethics Committee.
2.5. Statistical Analysis
Statistical analyses were performed using R version 4.5.3 (R Foundation for Statistical Computing, Vienna, Austria) and the RStudio IDE version 2025.05 (Posit, PBC). Initial descriptive statistics, including means, medians, standard deviations, 95% confidence intervals, and frequency distributions, were generated for all variables, stratified by age, sex, and autonomous community. Prevalence analysis involved estimating the point prevalence of overweight and obesity for each year of the study period. For subgroup comparisons, we established age groups based on standard pediatric developmental milestones and the Spanish educational framework: infants/toddlers (0–24 months), preschoolers (2–5 years), school-age children (6–11 years), and adolescents (12–18 years); sex; and region—we used Chi-square (χ2) tests or Fisher’s exact test for categorical variables. Continuous variables were compared using ANOVA for parametric data or Kruskal–Wallis/Mann–Whitney-Wilcoxon tests for non-parametric data, with corrections applied for multiple comparisons.
To analyze the longitudinal evolution of weight status, we utilized continuous-time Markov chain models. These models define the transition space using the established BMI categories, allowing us to evaluate the probability of movement between states over time. We constructed a homogeneous discrete-time Markov chain from longitudinal observations, and the continuous-time models were fitted using an intensity-based framework, with time measured as the continuous interval in years between recorded anthropometric measures. Continuous-time Markov modeling was selected over standard longitudinal techniques (e.g., mixed models) because our primary objective was to quantify the directional probability of moving between distinct clinical health states, rather than to model continuous mean trajectories. Furthermore, Markov frameworks naturally handle highly irregular, unequally spaced real-world clinical follow-up intervals. The continuous-time transition intensity matrix was estimated via Maximum Likelihood Estimation (MLE) using the BFGS optimization algorithm. Interval censoring was handled structurally by computing continuous hazards from transition intensities.
A complete-case approach was implemented, requiring individuals to have at least two recorded visits to model transitions over time. Single-visit patients were excluded from the longitudinal Markov analysis. To evaluate potential selection and attrition biases, a comprehensive baseline comparison was executed between single-visit and multi-visit patients, revealing minor but statistically significant differences in age and baseline obesity distribution (
Supplementary Table S1).
The discrete-time chain served as an exploratory layout, while the continuous-time framework yielded the definitive results. The probabilities represent 1-year transitions, calculated from the continuous-time transition intensity matrix. A 1-year time horizon (t = 1) was selected for matrix projection to optimize clinical interpretability, aligning directly with standard annual pediatric development visits and Spanish public health surveillance frequencies. Models were stratified by key developmental periods defined strictly by the patient’s age at baseline (2–5 years, 6–11 years, and 12–18 years) to estimate distinct transition probabilities for each cohort. Because stratification was based on baseline age, subsequent transition observations throughout the entire follow-up period contributed to the patient’s baseline-assigned cohort, even if the child chronologically aged into a subsequent developmental period during follow-up. Thus, the transition probabilities represent the long-term longitudinal trajectories of cohorts defined by their entry age. Infants aged 0–24 months were excluded from this specific analysis due to high age-related variability in body weight.
The terms “plasticity” and “trap” are operationally defined based on BMI z-score fluidity and persistence thresholds, respectively. These concepts represent purely statistical constructs derived from longitudinal transition probabilities, rather than direct indicators of proven cellular biological mechanisms or clinical trial intervention effects.
4. Discussion
The “Observatorio de la Obesidad Infantil” cohort highlights the significant clinical burden of abnormal adiposity, with baseline excess weight prevalence exceeding 20%. Longitudinal analysis revealed an “initial drop” effect, with BMI z-scores for overweight and obese patients declining sharply following the baseline clinical assessment, suggesting a robust response to initial intervention; however, this sharp initial z-score decline may be substantially driven by statistical regression to the mean (RTM), where extreme baseline values naturally gravitate toward the population average. The findings of change were supported by Markov chain modeling, which indicates nearly universal metabolic plasticity in the 2–5-year age group, where children have a ~75% probability of transitioning to normal weight regardless of baseline status. This fluidity diminishes significantly in the 6–11-year age bracket, where an “adiposity trap” emerges: obesity persistence is 60.0%, and overweight children face a 23.2% risk of progression to obesity. Although the 12–18-year cohort shows higher reversion rates from overweight to normal weight (46.6%)—possibly attributable to pubertal growth or increased health autonomy—the metabolic entrenchment observed after age five confirms that early childhood is the critical window for effective weight normalization. Importantly, because our Markov models track children based on their baseline age cohort, these findings demonstrate that entering clinical observation during the 2–5-year critical window carries a highly favorable prognostic trajectory that persists even as children transition chronologically into school age.
These results provide an important complement—and in some respects a counterpoint—to national surveillance data. The ALADINO 2023 study [
4] reported a modest downward trend, with a 4.5% point reduction in excess weight since 2019; however, our hospital-based frequency of obesity among children aged 6 to 11 years (10.3%) is lower than the 15.9% reported for children aged 6 to 9 years at the national level. Rather than indicating a lower burden, this discrepancy likely reflects a combination of age–structure differences and a “clinical trajectory effect,” whereby children attending specialized care may already be undergoing early behavioral or therapeutic changes that reduce BMI at first measurement, as observed in the sharp initial z-score decline across groups. At the same time, our longitudinal design revealed patterns that are not captured by cross-sectional surveillance. The Markov transition probabilities showed a high persistence of obesity in children aged 6–11 years (60.0%) and a substantial risk of progression from overweight to obesity (23.2%), consistent with an “adiposity trap.” Here, we operationally define “adiposity trap” not as an irreversible biological pathway, but as a statistical threshold where the 1-year probability of remaining obese reaches 60.0%, and the risk of moving from overweight to obesity is substantially elevated (23.2%), creating a pattern of strong diagnostic tracking. Compared with Spanish population-based longitudinal cohorts, particularly the ELOIN study in Madrid [
9], which reported that approximately 75–77% of children with obesity remained obese during follow-up from ages 4 to 6 and 4 to 9 years, respectively, our clinical registry demonstrated even stronger persistence of severe weight categories at baseline. These factors contribute to Spain’s high rate of pediatric obesity, maintaining the country’s position among the European nations most affected by this condition [
5].
Furthermore, although baseline obesity prevalence in early childhood (2–5 years) was comparable to that observed in older groups (~10.5%), this age group demonstrates markedly greater reversibility, with approximately three-quarters transitioning to normal weight, highlighting a critical window of metabolic plasticity that is not captured in population-based surveys such as PASOS 2022, which are restricted to older children (8–16 years) [
10]. Our observation of a closing therapeutic window after age five mirrors international longitudinal data, such as the US elementary school cohorts and the UK Millennium Cohort Study, which consistently demonstrate that early childhood weight status is the strongest statistical predictor of persistent adolescent and adult obesity [
10,
11]. Crucially, the relationship between the preschool critical window and the school-age adiposity trap is sequentially and causally linked within pediatric development [
12]. The critical window between ages two and five represents a finite period of elevated physiological and behavioral plasticity. If targeted clinical or lifestyle counter-measures are not successfully established during this highly malleable phase, the physiological architecture—such as the timing of the adiposity rebound and adipocyte hypertrophy—matures and hardens [
12]. Consequently, missing this early window of opportunity directly drives the transition into the adiposity trap, transforming a highly fluid and reversible weight status into an entrenched, chronic clinical trajectory after age five.
The observed increase in adiposity inertia after age five necessitates a fundamental shift in public health strategy toward the preschool years. A critical barrier is the parental perception gap: ALADINO 2023 reports that 89.1% of parents of overweight children and 48.8% of parents of children with obesity misperceive their child’s weight as normal [
4]. This normalization of excess weight can delay clinical intervention until the child enters the 6–11-year “adiposity trap,” where the probability of spontaneous regression is halved. Furthermore, these findings must be interpreted through the lens of socio-economic equity; while ALADINO 2023 data show improvements in middle- and high-income families, obesity rates remain stubbornly persistent in low-income households [
4]. From a biological perspective, the high plasticity observed in the 2–5 age group coincides with the period preceding the physiological adiposity rebound. Conversely, the entrenchment observed after age five aligns with the adiposity rebound window, during which accelerated adipocyte hypertrophy and shifts in insulin sensitivity make weight normalization physiologically more difficult to sustain [
13]. The age-stratified transition probabilities observed carry profound clinical and public health implications. The 75.5–76.2% probability of reverting to normal weight among preschoolers (ages 2–5) demonstrates that early childhood is a period of high metabolic and behavioral malleability. Clinically, this justifies a proactive shift away from a passive ‘wait-and-see’ clinical attitude; pediatricians should utilize this highly responsive window for universal early counseling and family-based lifestyle interventions [
14]. Conversely, the 60.0% persistence rate observed in school-aged children (ages 6–11) indicates that once obesity is established past age five, it transitions into a highly stable, chronic clinical state [
14]. Public health policy must therefore recognize that standard, low-intensity behavioral advice is highly unlikely to succeed in this ‘adiposity trap’. Consequently, clinical guidelines should reinforce early, intensive, multidisciplinary metabolic management, paired with structural public health policies—such as strict school-environment nutrition standards and screen-time reduction initiatives—to break this entrenchment [
15]. Environmental factors exacerbate this: children with obesity are more likely to have screen-based devices in their rooms and spend three or more hours daily on sedentary screen time, a trend that increases with age [
16]. To be effective, public health interventions must move beyond simple dietary advice and address these structural inequities [
17].
The primary strength of this study lies in its use of robust RWD from a multi-regional hospital network, offering a continuous stream of pediatric growth data that traditional cross-sectional or biennial surveys cannot replicate. With a cohort of over 37,000 patients across diverse Spanish autonomous communities, this research provides high statistical power and a granular longitudinal perspective. Unlike school-based surveys, this clinical cohort allowed for the application of Markov chain modeling, uncovering the specific age-dependent transition probabilities and the “adiposity trap” that characterizes the shift from early to middle childhood. However, several limitations warrant consideration. First, as a hospital-based cohort within a private healthcare group, there is an inherent selection bias. The study population likely skews toward a higher socio-economic status compared to the general Spanish population. Our sample reflects families with access to private medical infrastructure, underrepresenting lower-income demographics. Because national data (e.g., ALADINO 2023 [
4]) indicate that pediatric obesity is inversely tied to income, our cohort likely overestimates spontaneous reversion rates and underestimates long-term persistence, masking the full extent of the adiposity trap in more vulnerable populations. Second, the reliance on EHR ensures high precision for anthropometric measurements, but limits the availability of uniform data on confounding lifestyle variables—such as caloric intake, specific dietary patterns, or screen time—which are known to significantly influence BMI trajectories in the Spanish context. Third, our registry lacks data on major maternal, early-life, and biological determinants—including parental BMI, birth weight, breastfeeding duration, and pubertal development status (Tanner staging). Consequently, the observed boundaries of our developmental categories may be partly influenced by unmeasured residual confounding, rather than purely isolated chronological windows. Nevertheless, this limitation highlights an important future research direction; subsequent prospective cohorts should combine long-term anthropometric tracking with multiomic assessments of the gut microbiota–metabolites–immune axis—incorporating mechanistic models of intestinal barrier and microenvironmental regulation [
18]—to fully elucidate the molecular and cellular pathways that dictate the transition from pediatric tissue plasticity to entrenched adiposity. Fourth, the EHR data lack precise metrics on the specific type, timing, or adherence to clinical interventions, limiting our ability to directly attribute the initial z-score drop to specific therapeutic components. Fifth, differential follow-up frequencies between weight classes pose an inherent selection bias. Our data indicate that children with baseline underweight or normal weight had a slightly higher frequency of follow-up visits compared to those with obesity (2.97 ± 2.73 vs. 2.58 ± 2.46, respectively;
p < 0.001). This pattern introduces a potential ‘healthy user bias’ (or selective adherence bias), where families with highly motivated health-seeking behaviors or children showing positive progress are more likely to remain active in clinical registries. While continuous-time intensity-based modeling balances irregular time intervals, high obesity persistence could still be partially influenced by more rigid clinical follow-up in severe cases. Sixth, lacking an untreated control group, we cannot disentangle true early therapeutic efficacy from RTM. Seventh, our utilization of local Spanish pediatric growth charts to compute BMI z-scores, while optimizing clinical relevance within the Spanish healthcare system, limits direct comparability with the international literature using World Health Organization standards. Finally, our continuous-time Markov framework structurally required the exclusion of single-visit patients. As demonstrated in
Supplementary Table S1, these excluded individuals were slightly older (7.30 vs. 5.33 years) and presented with a marginally higher baseline obesity rate (10.9% vs. 9.8%) than the longitudinal cohort (
p < 0.001). This indicates an attrition pattern in which older or more severely affected children are less frequently retained for continuous tracking. Consequently, our longitudinal transition estimates should be interpreted with the understanding that they may slightly underestimate the true persistence or severity of abnormal weight categories in the broader, unobserved cross-sectional population.
In conclusion, this longitudinal study utilizing continuous-time Markov chains reveals distinct, age-stratified transition probability patterns in pediatric weight trajectories. Our findings identify the preschool period (ages 2–5) as a highly fluid statistical ‘critical window’ with high probabilities of spontaneous reversion to normal weight, whereas school age (ages 6–11) marks a transition into a highly stable ‘adiposity trap’ characterized by entrenched obesity. While these statistical constructs do not capture underlying biological pathways or direct intervention effects, they carry vital public health implications. Clinical strategies should shift away from a passive ‘wait-and-see’ approach during early childhood, prioritizing proactive, family-centered lifestyle interventions before these metabolic and behavioral trajectories become structurally entrenched.