Manuscript Offprint
arXiv:2611.07937Joint Modeling of Conditional Mean and Variability in Multilevel Functional Data: Application to Postprandial Glucose Trajectories in the AEGIS Study
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Functional data analysis (FDA) regression models provide a natural analytical framework for quantifying time-varying associations between Euclidean predictors and high-frequency biological signals (e.g., minute-by-minute physical activity measurements and glucose trajectories). In digital health applications, multiple functional trajectories are often collected from each participant. Existing multilevel functional regression methods primarily focus on modeling the conditional mean as a function of individual-level covariates (e.g., age, body mass index, and demographic characteristics), whereas conditional variability has received comparatively little attention, despite its importance for understanding biological processes and characterizing individual heterogeneity. To address this gap, we introduce, to the best of our knowledge, the first heteroskedastic functional mixed-effects regression framework that jointly models the conditional mean and variance of repeated functional observations while incorporating participant-specific random effects in both components. This framework enables the simultaneous characterization of time-varying biological responses and their variability, capturing dimensions of individual heterogeneity that conventional multilevel functional regression models cannot adequately represent. We further develop a participant-level bootstrap procedure to quantify uncertainty in the estimated functional parameters. We apply the proposed framework to postprandial glucose trajectories from the AEGIS study, revealing clinically relevant patterns of time-varying variability that are overlooked by conventional analyses focusing primarily on mean glucose responses. In this general adult population, premeal glucose levels, carbohydrate intake, and meal type exhibit distinct time-dependent associations with postprandial glucose variability, whereas glycated hemoglobin (HbA1c) shows a comparatively weaker association with variability despite retaining its association with the conditional mean. We also identify substantial between-participant heterogeneity in residual variability, even among individuals with similar observed covariates, highlighting dimensions of biological heterogeneity that cannot be adequately characterized through conditional mean models alone. Overall, our findings establish heteroskedastic functional mixed-effects regression as a flexible framework for jointly characterizing the conditional mean, variability, and participant-specific heterogeneity of longitudinal biological signals, with important implications for personalized modeling in digital health and precision nutrition in the analyzed case study.
1 Introduction
The ongoing revolution in biological measurement technologies is enabling the collection of multiple high-frequency time series of physiological variables, such as glucose levels and heart rate, on different time scales, with the potential to accelerate scientific discovery and improve clinical decision making. Matabuena et al. (2023). A key feature of these modern datasets is that devices record observations every few seconds or minutes; these time-stamped measurements can be naturally represented as a mathematical function over time. Because individuals are typically monitored repeatedly (e.g., across days or other time periods), the resulting data structure collected is functional and multilevel (hierarchical) Matabuena and Crainiceanu (2026). To emphasize this structure, Figure 1 displays, for two participants in the AEGIS study, glucose trajectories after breakfast, lunch and dinner, recorded every five minutes on five days, together with the corresponding fitted mean curves and gaussian assympotic prediction bands. The plots of individual glucose trajectories show substantial heterogeneity both within and between individuals across meals and over days, underscoring the importance of multilevel random-effects models that capture individual variation specific to the time after a meal for personalized prediction.
In digital health applications, multilevel functional models are increasingly used to analyze high-frequency measurements of functional biomarkers. When individual-level covariate information is not available and only repeated functional trajectories are observed, the prevailing approach is multilevel functional principal component analysis (MFPCA) (Di et al., 2009). MFPCA has been developed for a wide range of hierarchical designs and estimation paradigms (Crainiceanu et al., 2024), and recent work has introduced computationally efficient algorithms for both Gaussian and non-Gaussian functional outcomes (Cui et al., 2023; Leroux et al., 2023).
When individual-level covariate information is available (e.g. demographic and anthropometric measures), a range of frequentist and Bayesian functional regression methods have been proposed to model the conditional mean function (Morris and Carroll, 2006; Greven and Scheipl, 2017). Scalable implementations for large cohorts, such as NHANES, have also emerged (Cui et al., 2022; Sun and Kowal, 2025). These often rely on a “mass-univariate-then-smooth” pipeline: separate univariate models are fitted at each time point on the functional grid and the resulting coefficient estimates are then smoothed over time to enforce temporal regularity and improve statistical inference. Because each time point can be modeled independently, this strategy is naturally parallelizable and scales well in large epidemiological studies—for example, minute-by-minute accelerometer-derived physical activity signals collected from about 100,000 participants in the UK Biobank.
Despite substantial progress in multilevel functional modeling, most multilevel functional regression methods target only the conditional mean, leaving other distributional features, such as the conditional variance, largely unmodeled. Approaches that capture temporal structure in conditional variability are still scarce (Backenroth et al., 2018; Stöcker et al., 2021), although variability is key for characterizing individual heterogeneity and for designing temporally targeted digital health interventions (e.g., chronobiologically personalized interventions). For scalar repeated measurements, mixed-effects location-scale models allow covariates and subject-specific random effects to influence both the conditional mean and within-subject variance (Hedeker et al., 2008; Hedeker and Nordgren, 2013). Subsequent developments have extended these models to nonlinear learning curves (Williams et al., 2019) and dyadic data (Rast and Ferrer, 2018), while recent computational advances have enabled more efficient estimation (Gill and Hedeker, 2023; Wu and Hedeker, 2026). However, these approaches are designed for scalar responses and do not directly accommodate the functional structure of repeated trajectories, where both the conditional mean and variability may evolve continuously over time. To address this limitation, we propose a joint multilevel functional location-scale model that simultaneously estimates covariate-dependent mean and variance functions, enabling the characterization of time-varying biological responses and their heterogeneity across individuals.
Why variability matters. Understanding biological variability is essential for elucidating physiological mechanisms, characterizing individual heterogeneity, and informing the development of personalized, time-dependent interventions. Across clinical domains, variability provides information beyond average responses. In oncology, variability patterns have been used to characterize tumor heterogeneity and identify clinically relevant subtypes (Chen et al., 2013); in diabetes, glucose variability complements mean glucose as an indicator of glycemic regulation and metabolic instability (Rodbard, 2018); and in physical activity, temporal variability has been associated with circadian organization and age (Xiao et al., 2015; Li et al., 2021). Despite its clinical relevance, biological variability is frequently summarized using scalar measures, such as daily standard deviations (Rodbard, 2018), which obscure how variability evolves throughout the day or in response to specific physiological stimuli. This limitation is particularly relevant for high-frequency biological signals, such as continuous glucose monitoring (CGM) trajectories, where both the magnitude and timing of variability may carry important physiological information. For example, two individuals may exhibit similar average postprandial glucose responses but differ substantially in the day-to-day variability of their glucose trajectories, with these differences changing over the postprandial period (Figure 1). Characterizing such heterogeneity requires moving beyond conditional mean regression to explicitly model the conditional variance as a function of time and individual-level covariates, thereby capturing aspects of biological regulation that conventional summary measures may overlook.
AEGIS motivation. Our methodological development is motivated by the need to characterize time-dependent variability in postprandial glucose responses among adults without diabetes, using continuous glucose monitoring (CGM) data from the AEGIS study (Gude et al., 2017; Calvo-Malvar et al., 2025), while accounting for individual characteristics and meal composition. Postprandial glucose regulation reflects complex interactions among dietary composition, insulin sensitivity, pancreatic beta-cell function, and other physiological processes. Large-scale studies have documented substantial interindividual heterogeneity in glycemic responses to identical meals, providing a

Figure 1: Postprandial glucose trajectories of two AEGIS participants after breakfast, lunch and dinner on five study days (D1–D5), on a five-minute grid from the start of each meal. Solid lines are the observed glucose and dashed lines the participant's fitted mean for that meal. Shading is an approximate pointwise 95% prediction band with asymptotic approximation, the fitted mean ±1.96 times the fitted residual standard deviation; crosses mark observations outside it.
scientific basis for personalized nutrition approaches (Zeevi et al., 2015; Berry et al., 2020). More recently, detailed metabolic phenotyping has demonstrated that individual responses to different carbohydrate-rich foods are associated with underlying metabolic characteristics, including insulin resistance and beta-cell dysfunction (Wu et al., 2025). However, considerable variability may also arise within the same individual across repeated exposures to similar meals. Recent evidence has highlighted the limited reproducibility of postprandial glycemic responses to duplicate meals, raising questions about the reliability of personalized dietary recommendations derived from a small number of CGM observations (Hengist et al., 2025). Together, these findings motivate statistical approaches that distinguish expected postprandial glucose responses from their within-individual variability, while accounting for individual metabolic characteristics and differences in meal composition.
Although glycemic variability is increasingly recognized as an important dimension of glucose regulation, clinical assessments commonly rely on scalar summaries, such as the coefficient of variation and time-in-range metrics (Battelino et al., 2019). While these measures provide useful information about overall glycemic patterns, they do not directly characterize how the conditional variability of repeated postprandial trajectories evolves over the period following a meal. Functional data analysis (FDA) offers a natural framework for studying high-resolution glucose trajectories (Gaynanova et al., 2022), and previous analyses of AEGIS postprandial responses have employed multilevel functional regression to investigate associations with individual and meal characteristics (Calvo-Malvar et al., 2025; Matabuena et al., 2026). However, existing approaches have primarily focused on conditional mean responses or summarized variability using scalar measures (Gude et al., 2017). Consequently, the time-dependent structure of within-individual glucose variability, and its association with metabolic and dietary characteristics, remains insufficiently characterized.
Goals and contributions. This paper addresses the lack of methods for estimating conditional variability in multilevel functional data. We propose a computationally efficient algorithm that estimates the conditional mean and then, in further steps, the conditional variability (heteroscedasticity) in multilevel functional models and provides uncertainty quantification for functional parameters. The model is a functional mixed-effects location-scale model, in which covariates and participant random functions act on both the mean and the log residual standard deviation of each trajectory (Section 2.1). The conditional mean and the conditional variability at a covariate profile are two parallel primary targets, each with its own time-varying covariate effects (Section 2.2). Our key idea is a three-step fitting strategy: (i) to estimate the conditional mean with a multilevel functional regression fitted score by score on a spline basis, (ii) to estimate the conditional variability by a regression of cross-fitted squared residuals on covariates, with participant random functions, and (iii) to correct this scale fit for the error in predicting each participant's mean. Step (iii) addresses the main difficulty of variance estimation in multilevel functional data: when participants contribute few trajectories, the squared residuals also contain the error of the predicted participant mean, which pulls the estimated variance slopes towards zero and does not vanish as the number of participants grows (Section 2.4). The correction estimates this component, removes it through conditional refits of the scale model, and estimates the level of variability separately. To propagate uncertainty from all steps, we use a participant bootstrap that repeats every step and yields pointwise and simultaneous confidence bands for the conditional mean and conditional variance functional parameters.
We further demonstrate the practical relevance of our framework through an analysis of postprandial glucose trajectories from the AEGIS study, uncovering distinct time-varying associations between premeal glucose levels, carbohydrate intake, meal type, and conditional glucose variability. These associations would be systematically underestimated without the proposed bias correction. Finally, we introduce an individual-level functional that quantifies the model-based reduction in squared prediction error relative to a common population variance. Its substantial variation across participants reveals pronounced heterogeneity in the extent to which the model explains individual glucose variability.
Paper roadmap. Section 2 introduces the modeling framework and the associated estimation and inference procedures. Section 3 presents a detailed analysis of the AEGIS case study. Section 4 concludes with a discussion of the results, limitations, and future work. The Appendix gives estimation and inference details and implementation details of the case study.
2.1 Data, notation and model
We observe independent participants sampled from a common population. Participant has available functional observations , , where is a separable Hilbert space of real-valued functions defined on a common time domain . A natural example that we assume along this paper is , the space of square-integrable functions, equipped with the inner product and the induced norm . In our application, represents the first 180 minutes following a meal. The trajectories are observed on a common discrete grid .
Each functional observation is associated with a -dimensional covariate vector , where the first component corresponds to the intercept. We write for the collection of covariates associated with participant . Covariates may vary across participants, across repeated trajectories within the same participant, or both.
Grid points and basis functions are indexed by and , respectively, and denotes the total number of observed trajectories. We use to denote the entire functional trajectory and to denote its value at time . For covariate vectors and coefficient functions, the subscript indicates exclusion of the intercept component, whereas the subscript identifies the th component. The superscripts and distinguish quantities associated with the mean and scale models, respectively, including the spline bases and and their respective dimensions and . Hats denote estimators, while the superscript indicates quantities computed excluding cross-fitting fold , denotes the th scale-model refit ( for the initial fit), and * indicates bootstrap quantities obtained by resampling participants. Finally, denotes the identity matrix, the -dimensional vector of ones, and statistical independence.
Suppose that the trajectories follow a function-on-scalar location-scale model:
where and are coefficient functions governing the conditional mean and log residual standard deviation (SD), respectively. The participant-specific random effects and act on the mean and log residual SD and are shared across all trajectories of participant . Both effects are centered, with and . When the functional quantities are replaced by scalars, model (1) reduces to a mixed-effects location-scale model for repeated measurements (Hedeker et al., 2008; Hedeker and Nordgren, 2013; Lee and Nelder, 2006). In the absence of participant-specific random effects, it reduces to a location-scale regression model (Rigby and Stasinopoulos, 2005).
Define
as the participant-specific conditional mean and residual SD, respectively. Thus, , where is a standardized error process. We impose the following assumptions:
(C1) and ;
(C2) are conditionally independent given ;
(C3) is independent of .
The random effects capture participant-specific departures from the population-level mean and scale functions. For participants with the same covariates, a positive indicates a higher expected glucose level at time after a meal, whereas a positive indicates greater residual variability around the participant-specific mean trajectory relative to the fixed-effect scale. Conditions (C1) and (C2) specify that, conditional on the covariates and participant effects, trajectories are independent, with conditional means and residual SDs . Thus, within-participant dependence across trajectories is induced by the shared random effects.
Condition (C3) assumes that the participant effects are independent of both the covariates and the number of observed trajectories, (Seaman et al., 2014). This assumption allows the coefficient functions and to characterize covariate associations with the conditional mean and log residual SD, as developed in Section 2.2. Independence from is particularly relevant because participants contributing more trajectories receive greater weight in estimation; an association between cluster size and the random effects could therefore introduce bias. The mean and scale random effects may be correlated, as in scalar mixed-effects location-scale models (Hedeker et al., 2008). Importantly, these assumptions impose no restrictions on temporal dependence within individual trajectories.
2.2 Estimands
Our primary estimands characterize the conditional mean and within-participant variability of functional trajectories at a given covariate profile . Specifically, we define the population-level mean function and the participant-averaged residual variance
The second equality follows from (C1), whereas the third uses (C3). The mean function represents the expected trajectory at covariate profile x, averaged over participant-specific effects. In contrast, quantifies the residual variability around participant-specific mean trajectories, averaged over participants with the same covariate profile. We call the reference mean, and and together the reference moments at profile .
Under (C1) and (C3), the total conditional variance admits the decomposition
separating between-participant heterogeneity from within-participant residual variability.
The non-intercept coefficient functions describe covariate associations with the mean and residual variability. Holding other covariates fixed, a one-unit increase in the th covariate changes the conditional mean by and multiplies the participant-specific residual SD by . These effects describe conditional associations rather than causal relationships.
Let denote the non-intercept coefficient functions in the scale model. Since
averaging over the participant-specific scale effects changes only the intercept, leaving the covariate slopes unchanged. Accordingly, we report the overall level of within-participant variability through rather than through the intercept of the log-SD model. Appendix ?? further relates to the residual variance evaluated at .
2.3 Estimating the mean and the scale
2.3.1 Conditional mean
We represent the coefficient functions in a finite spline basis and estimate participant effects through score-wise linear mixed models, following functional mixed-model constructions (Guo, 2002; Greven and Scheipl, 2017) and basis-space functional mixed models that fit each basis coefficient separately (Morris and Carroll, 2006). Let be a cubic B-spline basis for the mean model, made orthonormal on by QR decomposition: with . We approximate
with projection coefficients and . Projecting (1) in the same way gives exactly
where is the projection score of trajectory in direction and is the projected residual; basis approximation error enters only through the reconstruction in (4). For each , (3) is a random-intercept model, with shared by the trajectories of participant and of mean zero (Appendix ??). It is fitted by restricted maximum likelihood (REML) (Bates et al., 2015) as a working Gaussian mixed model with and ; cross-score covariance is not modeled in these fits. The fitted coefficients give
where is the shrinkage prediction of participant 's effect from that participant's trajectories (Harville, 1976), and . Appendix ?? gives the basis construction, the derivation and properties of (3) and the REML fit.
2.3.2 Conditional scale
The residual of Section 2.3.1 is on average smaller in magnitude than the deviation , because itself enters and pulls towards . With three trajectories, for instance, each makes up a third of the average from which is predicted.
We therefore use cross-fitted residuals (Fan et al., 2012; Chernozhukov et al., 2018), which replace by a prediction from a mean fit that does not use . The trajectories are split into folds , , each containing at most one trajectory per participant. For , refitting the mean model without fold gives , where is predicted from participant 's other trajectories; the cross-fitted residual and its square are
Each trajectory lies in exactly one fold, so is determined by ; we omit the superscript from and from later quantities computed from the cross-fitted fits.
We model the conditional mean of with a log-link Gamma regression, a standard approach to variance-function estimation from squared residuals (Davidian and Carroll, 1987):
where contains the covariate effects on this log mean and is a participant random function. The Gamma distribution is a working assumption for estimating this mean. As in Section 2.3.1, both functions are expanded in an orthonormalized cubic B-spline basis :
The participant coefficients are penalized as random effects, with one penalty for each selected by fast REML, treating the grid points of a trajectory as independent in this working fit (Appendix ??). Like , the coefficients are not penalized, so the smoothness of and is set by and , which are fixed before fitting.
If the mean-prediction error were zero, then by (C1), so in (6) would equal . Matching this with gives and , and hence the estimates
However, the mean-prediction error is not zero, so these estimates are uncorrected; the superscript marks them as the starting point of the correction in Section 2.4. This two-stage construction draws on separate dispersion modeling (Smyth, 1989) and functional and distributional regression (Stöcker et al., 2021; Klein, 2024).
2.4 Scale correction for mean-prediction error
By (1) and (5), a cross-fitted residual is the error of the held-out trajectory plus the mean-prediction error :
As grows, the second term of vanishes at rate , apart from the spline approximation error of , because is estimated from all participants. The first term does not vanish when stays bounded, because is predicted from only the other trajectories of participant . Under (C1) and (C2), given , has mean zero and is independent of the training trajectories that determine , so the cross term has mean zero. Squaring and taking expectations gives (Appendix ??)
Unlike the working model (6), which uses only, this expectation conditions on all of , because depends on the covariates of participant 's other trajectories; it averages over and the training errors. On average, the squared residual therefore exceeds by the prediction-error variance .
For a trajectory-level covariate, which changes but leaves unchanged, the local log-variance slope is multiplied by , so the uncorrected slopes are pulled towards zero (Appendix ??). The distortion is largest for participants with few trajectories, whose effects are predicted least precisely. The correction estimates (Step 1), refits the scale model with this component removed to estimate the slopes (Step 2), and then estimates the level of (Step 3).
Step 1: estimate the prediction-error variance. Let and collect the participant scores and projected residuals in (3). In the training set of fold , participant has trajectories, and the shrinkage factors of Appendix ?? give
where is the average of the over these trajectories, and the approximation ignores the estimation error in and the part of outside the mean basis (Appendix ??). The two terms are the error from shrinkage towards the population mean and the noise in the average of the training trajectories (Harville, 1976); by (C1) they are uncorrelated, so is approximately the sum of their variances. With and the moment estimates, from the training set, of and of the covariance of pooled over participants (Appendix ??), the working estimate of is
where
are computed once per fold. Because is pooled, the factor rescales the averaging noise to participant i: it is the ratio of the fitted residual variance at t of participant i's other trajectories to that of all trajectories, and it is the only part of (9) that changes with the scale fit. Appendix ?? defines , and Appendix ?? states the approximation it involves.
Step 2: estimate the covariate slopes by conditional refitting. Subtracting from could give negative responses, which the penalized Gamma fit with participant effects cannot use. We instead multiply by an estimate of , which by (8) would turn the mean of into . Because this factor involves the unknown , we compute it from the current scale fit, refit the scale model to the rescaled , and repeat; the number of refits S is fixed in advance. Starting from the fitted predictor of (6), for , refit r fits the model of Appendix ??, with reselected penalties, to
where is the fitted residual variance from fit and is (9) with computed from these fitted variances; refit gives . In an idealized version of the update (Appendix ??), decreases to , and at each refit the error is multiplied by at most . With partitioned like , the corrected slopes are .
Step 3: estimate the participant-averaged variance level. The covariate part of the refits estimates the residual variance of a participant with , and by (2) is this variance times , which does not depend on . By (8) and (C3), . We therefore hold the slopes fixed and estimate from a separate intercept function , the value of at = 0. In this level fit, with expanded in the scale basis and , its coefficients solve
This is the Gamma quasi-score (Wedderburn, 1974) used as an estimating equation, so individual negative values of are allowed. Appendix ?? gives the starting values of the refits and the solver for (11).
Corrected estimates. With solving (11), the participant-averaged residual variance is estimated by
Participant-specific scale curves use the last refit, and ; the level-fit intercept, which already averages over the , is not substituted into them (Appendix ??).
2.5 Participant-bootstrap inference
Participants are independent, and every estimate in Sections 2.3 and 2.4 is built from participant-level contributions. Drawing participants with replacement therefore mimics drawing a new cohort from the same population, while keeping each participant's trajectories, their within-participant dependence and their number intact (Davison and Hinkley, 1997, Section 3.8). Field and Welsh (2007) and Field et al. (2010) study such cluster bootstraps for clustered and multilevel data. Each replicate keeps each trajectory's original fold label and repeats all other lines of Algorithm1: the full-data mean fit, mean cross-fitting, Gamma penalty selection, the refits and the level fit. The bootstrap distribution therefore includes the variability these steps add.
For an estimand curve , such as a coefficient function or , let be its estimate from replicate and the SD of , the bootstrap standard error at . The 95% simultaneous band and the statistic that calibrates it are
where is the empirical 0.95 quantile of (Fan and Zhang, 2000; Chang et al., 2017; Montiel Olea and Plagborg-Møller, 2019; Cui et al., 2022). Because is the largest deviation of replicate from the estimate, in standard errors, 95% of the replicate curves lie entirely inside the band. Each band is simultaneous over the grid of one curve only. A pointwise interval at uses instead the 0.95 quantile of the standardized deviations at alone. We report both: a pointwise interval concerns a single time, whereas a band supports statements about the whole curve, such as the times at which it excludes zero. For , the bands cover its spline projection, the target that the score means identify under (C1) and (C3) (Appendix ??). For , work with and exponentiate the limits. A whole-curve test of for all compares the largest distance of the estimate from zero with :
When testing multiple coefficient functions, such as the non-intercept terms in a model, we adjust the resulting -values using the Benjamini–Hochberg (BH) procedure (Benjamini and Hochberg, 1995). Appendix ?? provides further details on the treatment of duplicated participants and failed fits in bootstrap replicates, the quantile definition, and the lower bound imposed on .
2.6 Software implementation
All analyses were performed in R version 4.6.1 (R Core Team, 2026). Cubic B-splines were generated with splines::bs and normalized by QR decomposition. The score-wise mean models and the penalized Gamma scale models were fitted with custom R functions that use the structure of the model: with the orthonormal basis, each curve model separates into score-wise problems, and each participant effect involves only that participant's trajectories. The mean fits minimize the profiled REML criterion of lme4::lmer (Bates et al., 2015). The Gamma fits use the penalized quasi-likelihood iterations (Breslow and Clayton, 1993) and fREML criterion of mgcv::bam with method = "fREML" (Wood et al., 2015; Wood, 2017), evaluated exactly rather than with the covariate discretization of discrete = TRUE (Wood et al., 2017).
The prediction-error covariances, conditional refits, level fit and participant bootstrap were implemented in custom R functions. Bootstrap refits were run in parallel, with a separate random-number seed for each attempt, so that results do not depend on the number of workers. In the analysis of Section 3, Algorithm1 fits the penalized Gamma model (6) four times: once initially and once in each of the three conditional refits of Step 2 in Section 2.4 (). On these data, one such fit took on average 0.36 seconds (SD 0.02) with our functions and 178.62 seconds (SD 1.30) with mgcv::bam (version 1.9-4), even with its faster approximate option discrete = TRUE. Both were timed over 10 single-thread runs on a MacBook Pro with an Apple M5 chip and 16 GB of memory. The 500 bootstrap refits therefore need 2,000 such fits, which at these speeds take about 12 minutes with our functions and about 99 hours with mgcv::bam.
3 AEGIS case study
3.1 Data and analysis
The A Estrada Glycation and Inflammation Study (AEGIS) investigated blood glucose and its relation to inflammation and obesity in the general adult population (Matabuena et al., 2026). Its baseline examination took place in A Estrada, Galicia, northwestern Spain, between August 2012 and March 2015 (Calvo-Malvar et al., 2025). Adults aged 18 years or older were drawn as a stratified random sample from the Spanish National Health System registry (Gude et al., 2017; Matabuena et al., 2026). The study was approved by the Clinical Research Ethics Committee of Galicia (code 2012/025), and all participants gave informed consent. Of the 1,516 participants examined, 581 completed blinded CGM monitoring for up to seven days and, over the same days, recorded their meals in a food diary that a dietitian reviewed. Of these 581 participants, 516 did not have diabetes (Matabuena et al., 2026). Among them, we analyzed the who had complete data and at least three recorded meals of each type (breakfast, lunch and dinner), 5,237 meals in total (9–15 per participant). The method itself needs fewer meals (Algorithm1); we required three of each type so that each participant's summaries in Section 3.4 rest on at least three meals of each type.
The glucose response of a person to the same meal can differ substantially between different days and conditions, which limits how well one response predicts the next (Hengist et al., 2025). Because each participant recorded repeated meals in free-living conditions, the expected postmeal course of glucose can be separated from this meal-to-meal variation. We therefore study how meal composition and participant characteristics are associated with the expected course and with this variation. Specifically, we address five questions. (i) Does the association of carbohydrate with the mean and the meal-to-meal variability of glucose differ between breakfast, lunch and dinner? (ii) How is premeal glucose associated with the mean and the variability? (iii) Is HbA1c associated with both the mean and the variability? (iv) How does the variability change after a meal and between meal types? (v) Is the individual similar across participants?
In the notation of Section 2.1, indexes the meals of participant , and the fitted model (1) specifies
with the same covariates in both parts,
where is premeal glucose, and are the calories (kcal) and carbohydrate (g) of meal , and is 0 for female and 1 for male participants. Age, BMI, HbA1c and sex describe the participant, and the other covariates describe the meal. Table 1 summarizes the covariates.
Carbohydrate intake is a primary dietary determinant of postprandial glucose, whereas total caloric intake reflects the overall energy content of a meal, including contributions from fat and protein. HbA1c reflects average glycemic exposure over the preceding months and is widely used in the diagnosis of diabetes and prediabetes (American Diabetes Association, 2020). Premeal glucose represents the initial condition of the metabolic system from which the postprandial glucose response evolves, influencing the subsequent glucose trajectory (Matabuena et al., 2026). Age, sex, BMI, and meal timing have also been associated with postprandial glycemic responses in this population (Calvo-Malvar et al., 2025). Finally, meal-type indicators allow glucose responses and their associations with carbohydrate intake to differ across breakfast, lunch, and dinner.
The indicator is 1 if meal is a breakfast and 0 otherwise; and do the same for lunch and dinner. Breakfast is the reference meal, so only and appear on their own in , and their coefficients are differences from breakfast. The carbohydrate amount enters only through the last three entries of , its products with the three indicators, so each meal type has its own carbohydrate slope. The difference between two meal types therefore depends on the carbohydrate amount, and we report it at 50 g with the other covariates fixed.
The fixed effects are the coefficient functions and , whose 11 non-intercept curves are shown in Figures 2 and 3. The random effects are the participant mean and scale effects and , shared by all meals of participant . Given , and , the only random part of is the standardized error , which varies from meal to meal. The variance in the second equation therefore describes variation between meals of the same participant, and does not enter it. Variation between participants with the same covariates enters through and . Their distribution is not specified, and by (C3) it does not depend on the covariates. Section 3.3 reports their estimated SDs. By (C1) and (C3), the reference mean is the expected glucose minutes after a meal with covariates , and the participant-averaged residual variance is the expected squared deviation of such a meal from its participant's mean curve.
Trajectories were analyzed on a grid of points from 0 to 180 minutes after meal start, at five-minute intervals. We used mean and scale basis functions and applied the estimation procedure in Sections 2.3–2.4, with meal-wise cross-fitting folds formed by randomly ordering each participant's meals and conditional refits. Effects are reported in the natural increments shown in the figures. Carbohydrate slopes describe an increase of 10 g at fixed calories.
Pointwise intervals, simultaneous bands and whole-curve tests were computed as in Section 2.5 from participant-bootstrap refits, with BH adjustment within each model's 11 non-intercept coefficient curves. Appendix ?? gives implementation and contrast details.
Table 1: Characteristics of the 363 participants and their 5,237 meals. Continuous variables are summarized as mean (SD); female participants are summarized as count (percentage). Participant characteristics are calculated once per participant, and meal covariates are calculated within each meal type.
| (a) Participant characteristics | |
|---|---|
| Characteristic | Summary |
| Age (years) | 47.2 (14.2) |
| BMI (kg/m²) | 28.1 (5.0) |
| HbA1c (%) | 5.35 (0.33) |
| Female, n (%) | 230 (63.4) |
| (b) Meals | ||||
|---|---|---|---|---|
| Meal type | Meals | Calories (kcal) | Carbohydrate (g) | (mg/dL) |
| Breakfast | 1727 | 318.1 (200.1) | 44.8 (29.1) | 102.6 (13.9) |
| Lunch | 1755 | 879.6 (425.6) | 74.0 (46.0) | 100.8 (14.7) |
| Dinner | 1755 | 649.2 (389.9) | 59.2 (40.3) | 104.6 (16.2) |
3.2 Covariate associations in conditional mean and conditional variability
Ten of the 11 mean coefficient curves and seven of the 11 log-SD curves had BH-adjusted (Figures 2 and 3, Table 2).
Question (i) concerns carbohydrate and meal type. Carbohydrate was associated with higher mean glucose and greater residual SD at all three meals. The slopes differed between meals only in contrasts involving dinner, and only after 100 minutes. In the mean model, the carbohydrate bands excluded zero at 5–125 minutes for breakfast, 0–165 for lunch and 0–180 for dinner. In the log-SD model, they excluded zero at 0–95 minutes for breakfast, 0–60 and 75–95 for lunch, and 5–150 for dinner.
We also compared the three carbohydrate slopes directly, using paired contrasts within each bootstrap refit. The dinner-minus-breakfast mean slope was positive at 135–180 minutes and passed BH adjustment over the three meal-pair comparisons (). The dinner-minus-lunch slope was positive at 110–135 and 155–170 minutes in the mean model () and at 100–140 minutes in the log-SD model (). The other comparisons did not pass the adjusted 0.05 threshold (Appendix Table ??).
Higher premeal glucose (question ii) was associated with higher mean glucose over the whole 180 minutes and with greater residual SD at 0–95 minutes. Premeal glucose is likely related to the participant effects, contrary to (C3), so these associations may partly reflect differences between participants.
For HbA1c (question iii), the evidence was weak. HbA1c was associated with the mean only at 170–180 minutes (). Its association with the residual SD did not pass BH adjustment (). Participants did not have diabetes, so HbA1c varied little (SD 0.33 percentage points; Table 1).
Among the other covariates, age had a positive mean association at 40–105 minutes, with an isolated finding at 0 minutes. BMI had a positive mean association at 90–180 minutes. With carbohydrate held fixed, calories had a negative association with the mean at 0–55 minutes and with residual SD at 0–20 minutes. Recorded sex passed BH adjustment in neither model, nor did age and BMI in the log-SD model. Section 3.3 describes the meal-type contrasts.
The directions of the mean associations agree with those reported by Calvo-Malvar et al. (2025), who applied multilevel functional regression to 514 participants without diabetes from the same study but only focus on conditional mean estimation. In both analyses, glucose increased with meal carbohydrate (glycemic load in their analysis), age, BMI and HbA1c, and the carbohydrate association lasted longer after lunch and dinner than after breakfast.

Figure 2: Mean-glucose associations over postmeal time and meal type. Panels show 11 conditional-mean coefficient effects in mg/dL, with covariate increments in the labels. Dark shading shows pointwise nominal 95% intervals and light shading simultaneous bands from 500 participant-bootstrap refits. Meal contrasts compare lunch and dinner with breakfast at 50 g carbohydrate; female (sex coded 0) is the recorded-sex reference. Calories and carbohydrate adjust for each other. The three carbohydrate panels share a vertical scale, as do the two meal-contrast panels.

Figure 3: Residual-SD associations over postmeal time. Effects are displayed as percent change in residual SD, with increments in the panel labels; effects and band limits are calculated on the log-SD scale before transformation. Dark and light shading show pointwise nominal 95% intervals and simultaneous bands from 500 participant-bootstrap refits. Meal contrasts use breakfast at 50 g carbohydrate, and female (sex coded 0) is the recorded-sex reference. The three carbohydrate panels share a vertical scale, as do the two meal contrasts; each simultaneous band covers one coefficient curve.
Table 2: AEGIS whole-curve tests and exclusion windows. BH adjustment is applied within each model's 11 coefficient curves. Values of below 0.05 are in bold. Windows are in minutes and use each curve's nominal 95% simultaneous band, with signs in parentheses; they are not jointly simultaneous across coefficients. Covariate increments follow Figures 2-3, and meal contrasts are evaluated at 50 g carbohydrate.
| Coefficient | Conditional mean, | Log residual SD, | ||
|---|---|---|---|---|
| Windows | Windows | |||
| Age | 0.003 | 0 (+); 40-105 (+) | 0.074 | none |
| BMI | 0.017 | 90-180 (+) | 0.117 | none |
| HbA1c | 0.033 | 170-180 (+) | 0.329 | none |
| Recorded sex | 0.124 | none | 0.707 | none |
| Calories | 0.003 | 0-55 (-) | 0.004 | 0-20 (-) |
| Premeal glucose | 0.003 | 0-180 (+) | 0.004 | 0-95 (+) |
| Lunch vs breakfast | 0.003 | 5-25 (-); 60-180 (+) | 0.038 | 90-140 (+) |
| Dinner vs breakfast | 0.003 | 5-35 (-); 60-180 (+) | 0.004 | 65-180 (+) |
| Carbohydrate: breakfast | 0.003 | 5-125 (+) | 0.004 | 0-95 (+) |
| Carbohydrate: lunch | 0.003 | 0-165 (+) | 0.015 | 0-60 (+); 75-95 (+) |
| Carbohydrate: dinner | 0.003 | 0-180 (+) | 0.004 | 5-150 (+) |
3.3 Reference mean and variability
To compare the fitted trajectories on a common covariate profile, we fixed the continuous covariates at their sample means, sex at female and carbohydrate at 50 g. Figure 4 shows, at this profile , the reference mean and the participant-averaged residual variance defined in Section 2.2. The mean peaks occurred at 40, 45 and 60 minutes for breakfast, lunch and dinner, respectively, with peak values of 118.1–118.5 mg/dL. At this profile, the differences between the lunch or dinner curves and the breakfast curve are the meal contrasts tested in Table 2: the mean contrast for , and twice the log-SD contrast for . In the mean, lunch and dinner were below breakfast at 5–25 and 5–35 minutes, respectively, and above breakfast at 60–180 minutes. Dinner fell most slowly after its peak.
Turning to question (iv), rose from about 6 to 257–271 (mg/dL) by 45 minutes, then fell after breakfast and lunch but not after dinner. The value at meal start is low because premeal glucose is a covariate. By 180 minutes, was about 40% below its peak after breakfast and lunch, while the dinner curve stayed between 253 and 276 (mg/dL) from 45 minutes on. In the log-SD meal contrasts, lunch had greater residual SD than breakfast at 90–140 minutes, and dinner at 65–180 minutes. No lunch-versus-dinner contrast was computed at this profile.
Participants differed substantially in residual variability: averaged over 5 to 180 minutes, the model-implied SD of was 0.35, so at the same covariates, participants one SD apart differed in residual SD by a factor of about 1.4. Averaged over the grid, the participant mean effect had SD 6.9 mg/dL and accounted for 12–22% of the variance of the projection scores , so most of the conditional variance was meal-to-meal variation within a participant.
(a) Conditional mean

(b) Conditional variability

Figure 4: Dinner has a broader late elevation in the reference mean and residual variance. Part (a) shows and part (b) shows at the sample covariate means, female sex and 50 g carbohydrate. The participant-averaged residual variance excludes between-participant mean variation. The three meal panels within each part share a vertical scale. Dark and light shading show pointwise nominal 95% intervals and simultaneous bands from 500 participant-bootstrap refits; variance limits are constructed on the log scale and exponentiated.
3.4 Individual contribution of participant mean effects
An individual summarizes how much model-based squared error remains for participant relative to a common population variance. A meal of participant can be predicted by the reference mean , which uses only the covariates, or by the participant-specific mean . Averaging their expected squared errors over 0–180 minutes gives
(12)
In the first two lines, the expectation is over the standardized error , which varies from meal to meal, with , and fixed, so by (C1) the expected squared errors at time are and . The variance in the third line is over participants and meals. We estimate by the average of over all curves, where is their pointwise mean, which gives (mg/dL)^2, an SD of 19.0 mg/dL; integrals use normalized trapezoidal weights on . We report the averages over the meals of participant , written and . Both use all covariates and and differ only by the paired contribution of , . They are estimated by substituting and , and are structural model-based summaries rather than measures of observed prediction accuracy.
The individual varied widely between participants, so the answer to question (v) is no. The median was 0.477 (IQR 0.173–0.639) for the reference mean and 0.548 (0.294–0.702) for the participant-specific mean (Figure 5a). The median paired contribution was 0.054 (IQR 0.024–0.117), and 109 of 363 participants had (panel b). This median, 5.4% of , is not the difference between the two group medians. There were 57 negative values of and 38 of , where the model-based squared error exceeded the common baseline.
(a) Paired values per participant

(b) Contribution of mean effects

Figure 5: Participant mean effects reduce model-based squared error by a median of 5.4% of the common population variance (D = 361.5 (mg/dL) ). (a) Each point pairs and of one participant; axes have the same range and the solid line is the identity line. (b) Distribution of the paired contribution , with its median marked. All 363 participants and negative values are retained. Both values retain the fitted participant scale effect and treat participant effects as known; the nonnegative contribution follows from the definition. No individual uncertainty intervals are shown.
4 Discussion
Previous work has used multilevel functional regression to study the conditional mean of postprandial glucose trajectories in the AEGIS cohort, leaving the analysis of conditional variability for future research (Matabuena et al., 2026). In this paper, we extend this approach by jointly modeling the conditional mean and variance of repeated functional observations. To our knowledge, this is the first multilevel functional location-scale model that allows covariates and participant-specific random effects to influence both the mean and residual variability of the trajectories.
The AEGIS results show the value of studying both the mean and variability of postprandial glucose trajectories. At the reference covariate profile, the participant-averaged residual variance reached 257–276 (mg/dL)², corresponding to a standard deviation of about 16–17 mg/dL. This is similar in magnitude to the average postmeal glucose increase of approximately 15 mg/dL. Higher carbohydrate intake was associated with greater glucose variability at breakfast, lunch, and dinner. We also found that residual variability was higher after dinner than after breakfast, particularly from 65 minutes after the meal onwards. Variability also differed considerably between participants. For the same covariate values, a one-standard-deviation difference in the participant-specific scale effect corresponded to an approximately 1.4-fold difference in residual standard deviation. These findings represent associations rather than causal effects. Finally, the contribution of participant-specific mean effects to individual varied across participants. These values describe how well the model explains individual trajectories relative to a common population variance and should not be interpreted as measures of predictive performance.
Several limitations should be acknowledged. Our interpretation relies on condition (C3), which may be restrictive because premeal glucose is likely associated with participant-specific effects in AEGIS. Although the model allows the mean and scale random effects to be correlated, as in conventional mixed-effects location-scale models (Hedeker et al., 2008), the proposed prediction-error correction does not explicitly account for this correlation. Moreover, the residual variability observed in AEGIS may reflect several sources beyond physiological variation, including sensor measurement error, unrecorded meal components, and inaccuracies in carbohydrate intake or meal timing. Some of these sources may increase with meal size and contribute to the observed associations between carbohydrate intake and residual variability. The proposed correction also relies on an approximation of the prediction-error variance through the rescaling factor and does not account for participant-level variation outside the selected mean basis. The confidence bands do not correct for smoothing or projection bias (Hall and Horowitz, 2013).
Future work could extend the proposed correction to account for correlation between participant-specific mean and scale effects and explore other aspects of the conditional distribution beyond the mean and variance. More generally, the proposed framework provides a way to study both the expected response and its variability in repeated functional data, with potential applications to other wearable sensors and longitudinal physiological measurements.
References
American Diabetes Association. 2. classification and diagnosis of diabetes: Standards of medical care in diabetes—2020. Diabetes Care, 43(Supplement 1):S14–S31, 2020. ISSN 0149-5992. doi: 10.2337/dc20-S002. URL https://care.diabetesjournals.org/content/43/Supplement_1/S14.
Daniel Backenroth, Jeff Goldsmith, Michelle D. Harran, Juan C. Cortes, John W. Krakauer, and Tomoko Kitago. Modeling motor learning using heteroscedastic functional principal components analysis. Journal of the American Statistical Association, 113(523):1003–1015, 2018. doi: 10.1080/01621459.2017.1379403. URL https://doi.org/10.1080/01621459.2017.1379403. PMID: 30416231.
Douglas Bates, Martin Mächler, Ben Bolker, and Steve Walker. Fitting linear mixed-effects models using lme4. Journal of Statistical Software, 67(1):1–48, 2015. doi: 10.18637/jss.v067.i01. URL https://doi.org/10.18637/jss.v067.i01.
Tadej Battelino, Thomas Danne, Richard M. Bergenstal, et al. Clinical targets for continuous glucose monitoring data interpretation: Recommendations from the international consensus on time in range. Diabetes Care, 42(8):1593–1603, 2019. doi: 10.2337/dci19-0028.
Yoav Benjamini and Yosef Hochberg. Controlling the false discovery rate: A practical and powerful approach to multiple testing. Journal of the Royal Statistical Society: Series B (Methodological), 57(1):289–300, 1995. doi: 10.1111/j.2517-6161.1995.tb02031.x.
Sarah E. Berry, Ana M. Valdes, David A. Drew, et al. Human postprandial responses to food and potential for precision nutrition. Nature Medicine, 26(6):964–973, 2020. doi: 10.1038/s41591-020-0934-0.
N. E. Breslow and D. G. Clayton. Approximate inference in generalized linear mixed models. Journal of the American Statistical Association, 88(421):9–25, 1993. doi: 10.1080/01621459.1993.10594284.
Mar Calvo-Malvar, Óscar Lado-Baleato, Ana Cao Ríos, Cristina Porca Fernández, Alfonso Benítez-Calvo, Carmen Fernandez-
Merino, Juan Sánchez-Castro, Robert Wagner, Marcos Matabuena, and Francisco Gude. Age, sex, BMI, meal timing, and glycemic response to meal glycemic load. JAMA Network Open, 8(9):e2533193, 2025. doi: 10.1001/jamanetworkopen.2025.33193.
Chung Chang, Xuejing Lin, and R. Todd Ogden. Simultaneous confidence bands for functional regression models. Journal of Statistical Planning and Inference, 188:67–81, 2017. doi: 10.1016/j.jspi.2017.03.002. URL https://doi.org/10.1016/j.jspi.2017.03.002.
Guanhua Chen, Patrick F. Sullivan, and Michael R. Kosorok. Biclustering with heterogeneous variance. Proceedings of the National Academy of Sciences, 110(30):12253–12258, 2013. doi: 10.1073/pnas.1304376110. URL https://www.pnas.org/doi/abs/10.1073/pnas.1304376110.
Victor Chernozhukov, Denis Chetverikov, Mert Demirer, Esther Duflo, Christian Hansen, Whitney Newey, and James Robins. Double/debiased machine learning for treatment and structural parameters. The Econometrics Journal, 21(1):C1–C68, 2018. doi: 10.1111/ectj.12097. URL https://doi.org/10.1111/ectj.12097.
Ciprian M. Crainiceanu, Jeff Goldsmith, Andrew Leroux, and Erjia Cui. Functional Data Analysis with R. Chapman and Hall/CRC, Boca Raton, FL, 2024. doi: 10.1201/9781003278726.
Erjia Cui, Andrew Leroux, Ekaterina Smirnova, and Ciprian M. Crainiceanu. Fast univariate inference for longitudinal functional models. Journal of Computational and Graphical Statistics, 31(1):219–230, 2022. doi: 10.1080/10618600.2021.1950006.
Erjia Cui, Ruonan Li, Ciprian M. Crainiceanu, and Luo Xiao. Fast multilevel functional principal component analysis. Journal of Computational and Graphical Statistics, 32(2):366–377, 2023. doi: 10.1080/10618600.2022.2115500.
Marie Davidian and Raymond J. Carroll. Variance function estimation. Journal of the American Statistical Association, 82(400):1079–1091, 1987. doi: 10.1080/01621459.1987.10478543.
Anthony C. Davison and David V. Hinkley. Bootstrap Methods and their Application. Cambridge University Press, Cambridge, 1997.
Chong-Zhi Di, Ciprian M Crainiceanu, Brian S Caffo, and Naresh M Punjabi. Multilevel functional principal component analysis. The Annals of Applied Statistics, 3(1):458–488, 2009. doi: 10.1214/08-AOAS206.
Jianqing Fan and Wenyang Zhang. Simultaneous confidence bands and hypothesis testing in varying-coefficient models. Scandinavian Journal of Statistics, 27(4):715–731, 2000. doi: 10.1111/1467-9469.00218. URL https://doi.org/10.1111/1467-9469.00218.
Jianqing Fan, Shaojun Guo, and Ning Hao. Variance estimation using refitted cross-validation in ultrahigh dimensional regression. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 74(1):37–65, 2012. doi: 10.1111/j.1467-9868.2011.01005.x.
Chris A. Field and Alan H. Welsh. Bootstrapping clustered data. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 69(3):369–390, 2007. doi: 10.1111/j.1467-9868.2007.00593.x. URL https://doi.org/10.1111/j.1467-9868.2007.00593.x.
Christopher A. Field, Zhen Pang, and Alan H. Welsh. Bootstrapping robust estimates for clustered data. Journal of the American Statistical Association, 105(492):1606–1616, 2010. doi: 10.1198/jasa.2010.tm09541.
Irina Gaynanova, Naresh Punjabi, and Ciprian Crainiceanu. Modeling continuous glucose monitoring (CGM) data during sleep. Biostatistics, 23(1):223–239, 2022. doi: 10.1093/biostatistics/kxxa023.
N. Gill and Donald Hedeker. Fast estimation of mixed-effects location-scale regression models. Statistics in Medicine, 42(9):1430–1444, 2023. doi: 10.1002/sim.9679.
Sonja Greven and Fabian Scheipl. A general framework for functional regression modelling. Statistical Modelling, 17(1-2):1–35, 2017. doi: 10.1177/1471082X16681317.
Francisco Gude, Pablo Díaz-Vidal, Cintia Rúa-Pérez, Manuela Alonso-Sampedro, Carmen Fernández-Merino, Jesús Rey-García, Carmen Cadarso-Suárez, Marcos Pazos-Couselo, José M. García-López, and Arturo Gonzalez-Quintela. Glycemic variability and its association with demographics and lifestyles in a general adult population. Journal of diabetes science and technology, 11(4):780–790, 2017. doi: 10.1177/1932296816682031.
Wensheng Guo. Functional mixed effects models. Biometrics, 58(1):121–128, 2002. doi: 10.1111/j.0006-341X.2002.00121.x.
Peter Hall and Joel Horowitz. A simple bootstrap method for constructing nonparametric confidence bands for functions. The Annals of Statistics, 41(4):1892–1921, 2013. doi: 10.1214/13-AOS1137.
David Harville. Extension of the Gauss-Markov theorem to include the estimation of random effects. The Annals of Statistics, 4(2):384–395, 1976. doi: 10.1214/aos/1176343414.
Donald Hedeker and Rachel Nordgren. MIXREGLS: A program for mixed-effects location scale analysis. Journal of Statistical Software, 52(12):1–38, 2013. doi: 10.18637/jss.v052.i12.
Donald Hedeker, Robin J. Mermelstein, and Hakan Demirtas. An application of a mixed-effects location scale model for analysis of ecological momentary assessment (EMA) data. Biometrics, 64(2):627–634, 2008. doi: 10.1111/j.1541-0420.2007.00924.x.
Aaron Hengist, Jude Anthony Ong, Katherine McNeel, Juen Guo, and Kevin D. Hall. Imprecision nutrition? intraindividual variability of glucose responses to duplicate presented meals in adults without diabetes. The American Journal of Clinical Nutrition, 121(1):74–82, 2025. doi: 10.1016/j.ajcnut.2024.10.007.
Nadja Klein. Distributional regression for data analysis. Annual Review of Statistics and Its Application, 11:321–346, 2024. doi: 10.1146/annurev-statistics-040722-053607.
Youngjo Lee and John A. Nelder. Double hierarchical generalized linear models (with discussion). Journal of the Royal Statistical Society: Series C (Applied Statistics), 55(2):139–185, 2006. doi: 10.1111/j.1467-9876.2006.00538.x.
Andrew Leroux, Ciprian Crainiceanu, and Julia Wrobel. Fast Generalized Functional Principal Components Analysis, June 2023. URL http://arxiv.org/abs/2305.02389. arXiv:2305.02389 [stat].
Jingen Li, Virend K Somers, Francisco Lopez-Jimenez, Junrui Di, and Naima Covassin. Demographic characteristics associated with circadian rest-activity rhythm patterns: a cross-sectional study. International Journal of Behavioral Nutrition and Physical Activity, 18(1):107, 2021. doi: 10.1186/s12966-021-01174-z.
Marcos Matabuena and Ciprian M. Crainiceanu. Multilevel functional distributional models with applications to continuous glucose monitoring in diabetes clinical trials. The Annals of Applied Statistics, 20(1):476–495, March 2026. doi: 10.1214/26-AOAS2139. URL https://doi.org/10.1214/26-AOAS2139.
Marcos Matabuena, Marta Karas, Sherveen Riazati, Nick Caplan, and Philip R. Hayes. Estimating knee movement patterns of recreational runners across training sessions using multilevel functional regression models. The American Statistician, 77(2):169–181, 2023. doi: 10.1080/00031305.2022.2105950. URL https://doi.org/10.1080/00031305.2022.2105950.
Marcos Matabuena, Joseph Sartini, and Francisco Gude. Beyond scalar metrics: Functional data analysis of postprandial continuous glucose monitoring in the AEGIS study. BMC Medical Research Methodology, 26:39, 2026. doi: 10.1186/s12874-025-02748-2.
José Luis Montiel Olea and Mikkel Plagborg-Møller. Simultaneous confidence bands: Theory, implementation, and an application to SVARs. Journal of Applied Econometrics, 34(1):1–17, 2019. doi: 10.1002/jae.2656.
Jeffrey S. Morris and Raymond J. Carroll. Wavelet-based functional mixed models. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 68(2):179–199, 2006. doi: 10.1111/j.1467-9868.2006.00539.x.
R Core Team. R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria, 2026. URL https://www.R-project.org/. Version 4.6.1.
Philippe Rast and Emilio Ferrer. A mixed-effects location scale model for dyadic interactions. Multivariate Behavioral Research, 53(5):756–775, 2018. doi: 10.1080/00273171.2018.1477577.
Robert A. Rigby and D. Mikis Stasinopoulos. Generalized additive models for location, scale and shape. Journal of the Royal Statistical Society: Series C (Applied Statistics), 54(3):507–554, 2005. doi: 10.1111/j.1467-9876.2005.00510.x. URL https://doi.org/10.1111/j.1467-9876.2005.00510.x.
David Rodbard. Glucose variability: a review of clinical applications and research developments. Diabetes Technology & Therapeutics, 20(S2):S2-5-S2-15, 2018. doi: 10.1089/dia.2018.0092.
Shaun Seaman, Menelaos Pavlou, and Andrew Copas. Review of methods for handling confounding by cluster and informative cluster size in clustered data. Statistics in Medicine, 33(30):5371–5387, 2014. doi: 10.1002/sim.6277.
Gordon K Smyth. Generalized linear models with varying dispersion. Journal of the Royal Statistical Society: Series B (Methodological), 51(1):47–60, 1989. doi: 10.1111/j.2517-6161.1989.tb01747.x.
Almond Stöcker, Sarah Brockhaus, Sophia Anna Schaffer, Benedikt von Bronk, Madeleine Opitz, and Sonja Greven. Boosting functional response models for location, scale and shape with an application to bacterial competition. Statistical Modelling, 21(5):385–404, 2021. doi: 10.1177/1471082X20917586.
Thomas Y Sun and Daniel R Kowal. Ultra-efficient mcmc for bayesian longitudinal functional data analysis. Journal of Computational and Graphical Statistics, 34(1):34–46, 2025. doi: 10.1080/10618600.2024.2362227.
R. W. M. Wedderburn. Quasi-likelihood functions, generalized linear models, and the Gauss-Newton method. Biometrika, 61(3):439–447, 1974. doi: 10.1093/biomet/61.3.439.
Donald R. Williams, Daniel R. Zimprich, and Philippe Rast. A Bayesian nonlinear mixed-effects location scale model for learning. Behavior Research Methods, 51(5):1968–1986, 2019. doi: 10.3758/s13428-019-01255-9.
Simon N Wood. Generalized additive models: an introduction with R. Chapman and Hall/CRC, 2 edition, 2017. doi: 10.1201/9781315370279.
Simon N. Wood, Yannig Goude, and Simon Shaw. Generalized additive models for large data sets. Journal of the Royal Statistical Society: Series C (Applied Statistics), 64(1):139–155, 2015. doi: 10.1111/rssc.12068.
Simon N. Wood, Zheyuan Li, Gavin Shaddick, and Nicole H. Augustin. Generalized additive models for gigadata: Modeling the U.K. black smoke network daily data. Journal of the American Statistical Association, 112(519):1199–1210, 2017. doi: 10.1080/01621459.2016.1195744. URL https://doi.org/10.1080/01621459.2016.1195744.
Brian Ping-Huan Wu and Donald Hedeker. Fast estimation and valid statistical inference for mixed-effect location-scale models using variational inference. Statistics in Medicine, 45(13–14):e70640, 2026. doi: 10.1002/sim.70640.
Yue Wu, Ben Ehlert, Ahmed A. Metwally, et al. Individual variations in glycemic responses to carbohydrates and underlying metabolic physiology. Nature Medicine, 31(7):2232–2243, 2025. doi: 10.1038/s41591-025-03719-2.
Luo Xiao, Lei Huang, Jennifer A Schrack, Luigi Ferrucci, Vadim Zipunnikov, and Ciprian M Crainiceanu. Quantifying the lifetime circadian rhythm of physical activity: a covariate-dependent functional approach. Biostatistics, 16(2):352–367, 2015. doi: 10.1093/biostatistics/kxu045.
David Zeevi, Tal Korem, Niv Zmora, et al. Personalized nutrition by prediction of glycemic responses. Cell, 163(5):1079–1094, 2015. doi: 10.1016/j.cell.2015.11.001.