Keywords

1 Introduction

Despite the numerous developmental delays observed in children with autism spectrum disorder (ASD) compared to their typically developing peers (TD), the neural mechanisms underpinning these delays are not well characterized. To address this gap, our motivating study collected resting-state electroencephalograms (EEG) on TD and ASD children aged two to twelve years old, making it possible to contrast neural processes between the two diagnostic groups over a wide developmental range. EEG and magnetoencephalography (MEG) characterize cortical and intracortical brain activity, respectively, via the measurement of electrical potentials and their corresponding oscillatory dynamics (i.e. spectral characteristics). Recent studies in cognitive development using both EEG and MEG highlight the peak alpha frequency (PAF), defined as the location of a single prominent peak in the spectral density within the alpha frequency band (6–14 Hz), as a potential biomarker associated with autism diagnosis [7,8,9]. Specifically, the location of the PAF tends to shift from lower to higher frequencies as TD children age but this chronological shift is notably delayed or absent in ASD children [7, 8, 12, 16]. This trend is observed in our motivating data from a temporal electrode (T8) where the PAF, identifiable as ‘humps’ in age-specific slices of the group-specific bivariate mean spectral density (across age and frequency), increases in frequency with age for TD children but not for ASD children (Fig. 1(a)).

Fig. 1.
figure 1

(a) The group-specific bivariate mean alpha band spectral density (across age and frequency (6–14 Hz)) at ages 50, 70, 90 and 110 months from the T8 electrode. (b) A diagram of the 25 electrode montage used in our motivating data with the T8 electrode marked by a star.

Although the PAF holds promise as a biomarker for neural development in TD and ASD children, emphasis on the identification of a single peak produces considerable drawbacks. Estimation of a subject-electrode specific PAF can be error prone due to the presence of noise and multiple local maxima [6] and measurement of PAF inherently reduces the information from the alpha spectral band to a single scalar summary resulting in a loss of information. To avoid these limitations, we follow Scheffler et al. [15] and consider the entire spectral density across the alpha band as a functional measurement of neural activity. We focus on modeling and contrasting patterns of alpha spectral variation regionally across the scalp and chronologically across development for both the ASD and TD diagnostic groups. While Scheffler et al. [14] proposed a hybrid principal components analysis (HPCA) decomposition that models variation in region-referenced functional EEG data, it does not allow for the covariance structure to change across development as needed in our application. Previous research clearly shows that alpha spectral dynamics differ as a function of age between TD and ASD children and to assume a constant covariance structure across development risks missing important findings. To avoid this misspecification, we propose a covariate-adjusted hybrid principal components analysis (CA-HPCA) that models variation in high-dimensional functional data while simultaneously allowing the patterns of variation to change as a function of subject-specific covariates. CA-HPCA assumes the covariance process is weakly separable conditional on observed covariates, allowing for covariate-adjustments to be made on the marginal covariances rather than the full covariance leading to stable and computationally efficient estimation.

In the simplified context of one-dimensional functional data, existing methods allow for covariate-adjustments to the functional covariance in two ways: (1) both the eigenvalues and eigenfunctions of the functional covariance are allowed to change as a function of observed covariates or (2) the eigenfunctions are assumed to be constant across the covariate dimension but their corresponding eigenvalues (hence principal scores) are covariate-dependent. In the former class, Cardot [2] proposed a non-parametric covariate-adjusted functional principal components analysis (FPCA) in the context of dense functional data and Jiang and Wang [10] extended covariate-adjusted FPCA to noisy or sparse settings by estimating subject-specific scores using conditional expectation. In both cases, covariance estimation is performed non-parametrically by simultaneous smoothing across the covariate and functional domains via kernel methods. By fixing eigenfunctions across the covariate domain, Chio et al. [5] introduced a semi-parametric functional regression model that estimates covariate-dependent principal scores using a single-index model and Backenroth et al. [1] developed a heteroscedastic FPCA for repeatedly measured curves that models eigenvalues as an exponential function of covariate and subject-dependent effects.

Our proposed covariate-adjusted hybrid principal components analysis combines existing one-dimensional methods for covariate-dependent functional heteroscedasticity with recent advances in multi-dimensional FPCA to allow covariate-adjustments in the context of high-dimensional functional data. We briefly explore the methodological contributions of our proposed model and the resulting computational gains. A central theme in FPCA decompositions for multi-dimensional functional data is the use of simplifying assumptions regarding the covariance structure to ease estimation. A flexible approach in modeling two-dimensional functional data is to assume weak separability of the covariance process [4, 11] in which the marginal covariances along each dimension are targeted and the full covariance is projected onto a tensor basis formed from the corresponding marginal eigenfunctions. Thus, estimation is reduced from that of the total covariance in four-dimensions to the marginal covariances in two-dimensions for which efficient two-dimensional smoothers exist. Scheffler et al. [14] extended weak separability to region-referenced functional EEG data (similar to our motivating study) by allowing a discrete regional dimension via HPCA. We leverage the simplifying assumptions and computational efficiency of HPCA through the proposed CA-HPCA which introduces covariate-dependence to the marginal covariances rather than the total covariance and allows the marginal eigenvalues and eigenfunctions to change across the covariate domain.

CA-HPCA provides a flexible modeling framework but introduces potential compute burden through the addition of a covariate dimension to estimation of the marginal covariances which for a scalar covariate requires smoothing across three dimensions. Previous methods such as Cardot [2] and Jiang and Wang [10] utilized kernel methods to estimate covariate-dependent marginal covariances but these approaches are computationally intensive and scale poorly with the introduction of additional covariates. To address this challenge, we extend the fast functional covariance smoothing proposed by Cederbaum et al. [3] to allow for covariate-adjustments by including an additional basis along the covariate dimension. Thus, CA-HPCA generalizes covariate-adjustments to high-dimensional functional covariances and substantially reduces the resulting computational burden by applying adjustments to the marginal covariances and introducing covariate-dependence to cutting-edge fast covariance smoothers. A mixed effects framework is proposed to estimate the model components and is paired with parametric bootstrap resampling to perform inference across the covariate domain. The remaining sections are organized as follows. Section 2 introduces the proposed CA-HPCA and Sect. 3 describes the corresponding estimation procedure. Application of the proposed method to our resting state EEG data follows in Sect. 4. Section 5 concludes with a brief summary and discussion.

2 Covariate-Adjusted Hybrid Principal Components Analysis (CA-HPCA)

Let \(Y_{di}(a_i, r, \omega )\) be a random function observed in the presence of some continuous non-functional covariate \(a_i \in \mathcal {A}\), for subject i, \(i = 1, \ldots , n_d\), from group d, \(d = 1,\ldots , D\), in region r, \(r = 1, \ldots , R\), and at frequency \(\omega \), \(\omega \in \varOmega \). We decompose \(Y_{di}(a_i, r, \omega )\) additively such that the expectation and covariance of the process depend on the covariate \(a_i\),

$$\begin{aligned} Y_{di}(a_i, r, \omega )= & {} \eta _d(a_i, r, \omega ) + Z_{di}(a_i, r, \omega ) + \epsilon _{di}(a_i, r, \omega ), \end{aligned}$$

where \(\eta _d(a_i, r, \omega ) = E\{Y_{di}(a_i, r, \omega )|a_i\}\) denotes the group-region mean function, \(Z_{di}(a_i, r, \omega )\) denotes a mean zero region-referenced stochastic process with total variance \(\varvec{\varSigma }_{d,T}(a_i; r, \omega ; r', \omega ') = \text {cov}\{Z_{di}(a_i, r, \omega ), Z_{di}(a_i, r', \omega ')|a_i\}\), and \(\epsilon _{di}(a_i, r, \omega )\) denotes measurement error with mean zero and variance \(\sigma _d^2\) that is independent across the regional and functional domains. We assume the group-region means \(\eta _d(a, r, \omega )\) are smooth in both the functional domain \(\varOmega \) and the non-functional domain \(\mathcal {A}\) though we place no restrictions across the regional domain \(\mathbb {R}^R\).

In the proposed CA-HPCA model, we assume that the total covariance \(\varvec{\varSigma }_{d,T}(a; r, \omega ; r', \omega ')\) is weakly separable for each \(a \in \mathcal {A}\). Weak separability, a concept recently proposed by Lynch and Chen [11] and adapted by Scheffler et al. [14] to region-referenced functional EEG data, implies that a covariance can be approximated by a weighted sum of separable covariance components and that the direction of variation (i.e. eigenvectors/eigenfunctions) along one dimensions of the EEG data is the same across fixed slices of the other dimension. Note that weak separability is more flexible than strong separability (i.e. separability) commonly utilized in spatiotemporal modeling which requires the total covariance, not just the directions of variation, is the same up to a constant for fixed slices of the other dimensions. Unlike previously applications of weak separability, we assume that the total covariance is weakly separable conditional on observed covariates and the marginal covariance functions vary smoothly along the covariate domain. Let the covariate-adjusted regional and functional marginal covariances be defined as

$$\begin{aligned} \{\varvec{\varSigma }_{d,\mathcal {R}}(a_i)\}_{r,r'}= & {} \int _{\varOmega } \text {cov}\{Z_{di}(a_i, r, \omega ),Z_{di}(a_i, r', \omega )\} d\omega = \sum _{k=1}^R \tau _{d k, \mathcal {R}} (a_i)\text {v}_{dk}(a_i, r) \text {v}_{dk}(a_i,r'),\\ \varvec{\varSigma }_{d,\varOmega }(a_i, \omega ,\omega ')= & {} \sum _{r=1}^R \text {cov}\{Z_{di}(a_i,r, \omega ),Z_{di}(a_i,r, \omega ')\} =\sum _{\ell =1}^{\infty } \tau _{d \ell , \varOmega } (a_i)\phi _{d\ell }(a_i,\omega )\phi _{d\ell }(a_i,\omega '), \end{aligned}$$

where \(\text {v}_{dk}(a, r)\) are covariate-adjusted marginal eigenvectors, \(\phi _{d\ell }(a,\omega )\) are covariate-adjusted marginal eigenfunctions, and \(\tau _{d k, \mathcal {R}}(a)\) and \(\tau _{d \ell , \varOmega }(a)\) are their respective covariate-adjusted marginal eigenvalues. Utilizing the covariate-dependent eigenvectors and eigenfunctions, the covariate-adjusted hybrid principal components decomposition (CA-HPCA) of \(Y_{di}(a_i, r, \omega )\) is given as,

$$\begin{aligned} Y_{di}(a_i, r, \omega )= & {} \eta _d(a_i, r, \omega ) + Z_{di}(a_i,r, \omega ) + \epsilon _{di}(a_i, r, \omega ) \nonumber \\= & {} \eta _{d}(a_i,r,\omega )+ \sum _{k=1}^{R} \sum _{\ell =1}^{\infty } \xi _{di,k\ell }(a_i) \text {v}_{dk}(a_i,r) \phi _{d\ell }(a_i,\omega ) +\epsilon _{di}(a_i, r, \omega ), \end{aligned}$$

where \(\xi _{di,k\ell }(a_i)\) are subject-specific scores defined through the projection \(\langle Z_{di}(a_i, r, \omega ), \) \(\text {v}_{dk}(a_i, r) \phi _{d\ell }(a_i, \omega ) \rangle = \) \(\sum _{r=1}^R \int Z_{di}(a_i, r, \omega )\) \( \text {v}_{dk}(a_i, r) \phi _{d\ell }(a_i, \omega )d\omega \). Weak separability of the total covariance at each covariate value implies that the scores \(\xi _{di,k\ell }(a_i)\) are uncorrelated leading to the decomposition of the total covariance \(\varvec{\varSigma }_{d,T}(a; r, \omega ; r', \omega ')\) as follows,

$$\begin{aligned} \varvec{\varSigma }_{d, T}(a; r, \omega ; r', \omega ')= & {} \,\text {cov}\{Z_{di}(a, r, \omega ),Z_{di}(a, r', \omega ')|a\}+\sigma _{d}^2 \delta (a; r, \omega ; r', \omega ') \nonumber \\= & {} \,\sum _{k=1}^{R} \sum _{\ell =1}^{\infty } \tau _{d,k\ell }(a) \text {v}_{dk}(a, r)\text {v}_{dk}(a, r') \phi _{d\ell }(a, \omega ) \phi _{d\ell }(a, \omega ') + \sigma _{d}^2 \delta (a; r, \omega ; r', \omega '), \end{aligned}$$

where \( \tau _{d,k\ell }(a) = \text {var}\{\xi _{di,k\ell }(a)\}\). Note, the above model assumes that both the marginal directions of variation and their associated tensor weights are allowed to vary across the covariate domain. In practice, the CA-HPCA decomposition is truncated to include only \({K_d}\) and \({L_d}\) covariate-adjusted marginal eigencomponents for the regional and functional domains, respectively, with the number of components initially selected on the marginal fraction of variance explained (FVE). One guideline is to include the minimum number of covariate-adjusted marginal eigencomponents in the CA-HPCA expansion that explain at least 90\(\%\) of variation in their respective covariate-adjusted marginal covariances. The final number of components can be fixed after the subject-specific scores and their associated variance components are estimated in Sect. 3 which allow enumeration of the overall FVE in the observed data not just the marginal covariances.

3 Estimation of Model Components and Inference

The following section outlines the CA-HPCA estimation procedure, provides detailed descriptions of each step, and outlines how to perform inference via parametric bootstrap.

(1) Estimation of group-region mean functions: We estimate the group-region mean function \(\eta _d(a, r, \omega )\) for each region via smoothing performed by projection onto a tensor basis formed by penalized marginal B-splines in the regional and functional domains. Smoothing parameter selection and variance components are estimated using restricted maximum likelihood (REML) methods.

(2) Estimation of covariate-adjusted marginal covariances and measurement error variance: We estimate the covariate-adjusted marginal covariances by assuming each two-dimensional marginal covariance varies smoothly over the covariate dimension. For the functional marginal covariance, \(\varvec{\varSigma }_{d,\varOmega }(a, \omega , \omega ')\), we extend the fast bivariate covariance smoother of Cederbaum et al. [3] to include a third covariate dimension \(a \in \mathcal {A}\). The resulting trivariate smoother maintains the computational efficiency of Cederbaum et al. [3] while simultaneously allowing the marginal functional covariance to vary smoothly along the covariate dimension. As an added bonus, we also obtain an initial estimate of the measurement error variance \(\hat{\sigma }_{d, \varOmega }^2\).

figure a

For fixed slices of the covariate domain, the regional marginal covariance \(\{\varvec{\varSigma }_{d,\mathcal {R}}(a)\}_{r,r'}\) is discrete and thus not amenable to trivariate smoothers as the functional marginal covariance above. Therefore, we estimate the raw regional marginal covariance at each covariate-value, remove the measurement variance from the diagonals as in Scheffler et al. [14] and then apply a Nadarya-Watson kernel smoother to the resulting matrices entry-by-entry along the covariate domain. Our kernel smoother is the kernel weighted-average, \(\{\widehat{\varvec{\varSigma }}_{d,\mathcal {R}}(a_o)\}_{(r, r')} = {\sum _{i=1}^{n_d}}\) \({\sum _{\omega \in \varOmega } K_\lambda (a_o, a_i) \widehat{Y}_{di}^c(a_i, r, \omega )\widehat{Y}_{di}^c(a_i, r', \omega ) / |\varOmega | \sum _{i = 1}^{n_d} K_\lambda (a_o, a_i)}\), where \(K_\lambda (\cdot \ , \cdot \ )\) is some kernel with smoothness parameter \(\lambda \) and \(|\varOmega |\) is the number of observed functional grid points. The smoothing parameter \(\lambda \) is selected to minimize the \(\text {LOSOCV}(\lambda )\) statistic across all channel pairs \((r, r')\), \(\text {LOSOCV}(\lambda ) = \sum _{r = 1}^R \sum _{r ' < r} \text {LOSOCV}(\lambda ,r,r'),\) \(\text {LOSOCV}(\lambda ,r,r') = (1 / |\varOmega | n_d) \sum _{i = 1}^{n_d} \sum _{\omega \in \varOmega } \) \(\big [\widehat{Y}_{di}^c(a_i, r, \omega )\) \(\widehat{Y}_{di}^c(a_i, r', \omega ) - \{\widehat{\varvec{\varSigma }}^{(-i)}_{d,\mathcal {R}}(a_i)\}_{(r, r')} \big ]^2\), where \( \{\widehat{\varvec{\varSigma }}^{(-i)}_{d,\mathcal {R}}(a_i)\}\) is the smoothed marginal covariance matrix with the ith subject left out. Thus, we introduce two novel covariate-adjusted smoothers that allow for calculation of the covariate-adjusted marginal covariances which are then used for subsequent covariate-adjusted eigendecompositions.

(3) Estimation of covariate-adjusted marginal eigencomponents: To estimate the covariate-adjusted marginal eigencomponents we perform eigendecompositions at each fixed covariate-value as described in Scheffler et al. [14] retaining a common number of \({K_d}\) and \({L_d}\) covariate-adjusted eigencomponents.

(4) Estimation of covariate-adjusted variance components and subject-specific scores via linear mixed effects models: We make use of the estimated functional fixed effects and marginal eigencomponents to propose a linear mixed effects framework for modeling covariate-adjusted region-referenced functional data. Under the assumption of joint normality of the covariate-adjusted subject-specific scores and measurement error, the proposed mixed effects framework induces regularization and stability in modeling the data by enforcing a low-rank structure on the covariate-adjusted variance components \(\tau _{dg}(a)\). The resulting variance components can be used to select the number of eigencomponents to include in the CA-HPCA decomposition by quantifying the proportion of variance explained and for hypothesis testing and point-wise confidence bands via parametric bootstrap. We present the linear mixed effects modeling framework below.

To make the notation more compact, we replace the double index \(k\ell \) in CA-HPCA truncated at \({K_d}\) and \({L_d}\) with a single index \(g=(k-1)+{K_d}(\ell -1)+1\),

$$\begin{aligned} Y_{di}(a_i, r, \omega )= \eta _{d}(a_i,r,\omega )+ \sum _{g=1}^{{G_d}} \xi _{di,g}(a_i) \varphi _{dg}(a_i, r, \omega ) +\epsilon _{di}(a_i, r, \omega ), \end{aligned}$$

where \(\varphi _{dg}(a_i, r, \omega )=\text {v}_{dk}(a_i, r) \phi _{d\ell }(a_i, \omega )\), \(\zeta _{dig}(a_i)=\langle Z_{di}(a_i, r, \omega ),\varphi _{dg}(a_i, r, \omega )\rangle \), \(\tau _{dg}=\text {cov}\{\zeta _{dig}(a_i)\}\), and \({G_d}={K_d L_d}\). Let \(\varvec{Y}_{di}(a_i)\) represent the vectorized form of \(Y_{di}(a_i, r, \omega )\) for subject i, \(i=1, \ldots , n_d\), observed along with covariate value \(a_i\). Note, an argument for the covariate domain a is included to stress that a subject’s covariance is covariate-dependent. Analogous vectorized forms for the covariate-adjusted functional fixed effects, \(\eta _d(a_i, r, \omega )\), the region-referenced stochastic process \(Z_{di}(a_i, r, \omega )\), multidimensional orthonormal basis \(\varphi _{dg}(a_i, r, \omega )\), and the measurement error \(\epsilon _{di}(a_i, r, \omega )\) are denoted by \(\varvec{\eta }_{di}(a_i)\), \(\varvec{Z}_{di}(a_i)\), \(\varvec{\varphi }_{dg}(a_i)\), and \(\varvec{\epsilon }_{di}\), respectively. Under the assumption that \(\varvec{\zeta }_{di}(a_i) = \{ \zeta _{di1}(a_i), \ldots , \zeta _{diG_d}(a_i) \}\) and \(\varvec{\epsilon }_{di}\) are jointly Gaussian and \(\text {cov}\{\varvec{\zeta }_{di}(a_i), \varvec{\epsilon }_{di}\} = \varvec{0}\) at a fixed value of \(a_i\), the proposed linear mixed effects model is given as

$$\begin{aligned} \varvec{Y}_{di}(a_i)&=\varvec{\eta }_{di}(a_i)+\varvec{Z}_{di}(a_i)+\varvec{\epsilon }_{di} \nonumber \\&= \varvec{\eta }_{di}(a_i)+\sum _{g=1}^{G_d} \zeta _{dig}(a_i) \varvec{\varphi }_{dg}(a_i)+\varvec{\epsilon }_{di}, \quad \text {for} \quad i=1,\ldots ,n_d. \end{aligned}$$
(1)

The model can be fit separately in each group, \(d=1,\ldots ,D\) and the regional and functional dependencies in \(\varvec{Y}_{di}(a_i)\) are induced through the subject-specific random effects \(\zeta _{dig}(a_i)\) in (1). Given the assumption that the total covariance is weakly separable for fixed values of a, \(\text {cov}\{\zeta _{dig}(a_i), \zeta _{dig\prime }(a_i)\} = 0\) for \(g \ne g\prime \) and thus the covariance of the subject-specific scores possess a diagonal diagonal structure, \(\text {cov}\{\varvec{\zeta }_{di}(a_i)\} = \varvec{T}_d(a_i) = \text {diag}\{\varvec{\tau }_d(a_i)\}\), where \(\varvec{\tau }_d(a_i) = \{\tau _{d1}(a_i), \ldots , \tau _{dG}(a_i) \}\). We further assume that \(\varvec{T}_d(a)\) evolves smoothly along the covariate domain and target the smooth variance components through their corresponding precision components. Given previous estimates for \(\varvec{\eta }_{di}(a_i)\) and \(\varvec{\varphi }_{dg}(a_i)\), estimates of the variance components and subject-specific scores are obtained using REML methods [17].

The assumption that the variance components evolve smoothly over the covariate domain resolves several challenges that emerge when modeling the covariate-adjusted subject-specific scores. First, the estimation procedure is able to borrow strength across the covariate-domain when modeling variation, a necessity when specific covariate values may only be observed once as in our motivating data. Second, we are able to project the precision components onto a smooth low-rank basis which induces regularization and control over the speed at which \(\tau _g(a)\) is allowed to vary. Alternatively, a projection based approach is less computationally burdensome with estimates of the subject-specific scores obtained directly by numerical integration, \(\hat{\zeta }_{dig}(a_i)=\langle Z_{di}(a_i, r, \omega ),\hat{\varphi }_{dg}(a_i, r, \omega )\rangle \) and their corresponding variance components calculated empirically, \(\hat{\tau }_{dg}=\text {cov}\{\hat{\zeta _{dig}}(a)\}\), but the resulting estimates are unstable due to the limited number of observations at each point along the covariate domain. Therefore, despite the added compute time, our proposed linear mixed effects framework is better suited for providing covariate-adjustments to the region-referenced functional process in a controlled and principled manner.

The estimated variance components are used to choose the number of eigencomponents included in the CA-HPCA decomposition where \({G'_d}\) denotes a set of eigencomponents such that the total fraction of variance explained (\(FVE_{dG'_d}\)) is greater than 0.8 in each group \(d=1, \ldots , D\). We recommend starting with a larger number \({G_d}={K_d L_d}\) of eigencomponents in the mixed effects modeling used for the estimation of \(\{\tau _{dg}(a_i): g=1,\ldots , {G_d}\}\) and then reducing or adding components as appropriate to fix the final value of \({G'_d}\). In order to estimate the group-specific fraction of total variance explained via the \({G'_d}\) eigencomponents, we consider the quantity, \(FVE_{dG'_d}=\int \{ \sum _{i = 1}^{n_d} \sum _{g=1}^{{G'_d}} \hat{\tau }_{dg}(a_i) \}da / \int [\sum _{i=1}^{n_d} \{|| Y_{di}(a_i, r, \omega )-\hat{\eta }_{d}(a_i, r, \omega )|| - R \int \hat{\sigma }_{d}^2 da\}]da\), where \(||f(a_i, r, \omega )||^2=\sum _{r=1}^R \int f(a_i, r, \omega )^2d\omega \). Once \({G'_d}\) is selected, the subject-specific scores can be obtained using their best linear unbiased predictor (BLUP) as in Scheffler et al. [14].

(5) Inference via parametric bootstrap: Inference in the form of hypothesis testing and point-wise confidence intervals can be performed via a parametric bootstrap based on the estimated CA-HPCA model components. To test the null hypothesis that all groups have equal means in the region r for a fixed covariate value \(a \in \mathcal {A}\), i.e. \(H_{0}:\eta _d(a, r, \omega )=\eta (a, r, \omega )\) for \(d=1,\ldots D\), we propose a parametric bootstrap procedure based on the CA-HPCA decomposition. For \(b = 1, \ldots , B\), the proposed parametric bootstrap generates outcomes based on the estimated model components under the null hypothesis as \(Y^b_{di}(a_i, r, \omega )=\hat{\eta }(a_i, r, \omega )+Z^b_{di}(a_i, r, \omega )+\epsilon ^b_{di}(a_i, r, \omega )= \hat{\eta }(a_i, r, \omega )+\sum _{g=1}^{{G'_d}} \zeta ^b_{dig} (a_i)\hat{\varphi }_{dg}(a_i, r, \omega )+\epsilon ^b_{di}(a_i, r, \omega )\) in region r and as \(Y^b_{di}(a_i, r, \omega )=\hat{\eta }_d(a_i, r, \omega )+Z^b_{di}(a_i, r, \omega )+\epsilon ^b_{di}(a_i, r, \omega )=\hat{\eta }_d(a_i, r, \omega )+\sum _{g=1}^{{G'_d}} \zeta ^b_{dig} \hat{\varphi }_{dg}(a_i, r, \omega )+\epsilon ^b_{di}(a_i, r, \omega )\) in the other regions, where subject-specific scores and measurement error are sampled from \(\zeta ^b_{dig}(a_i) \sim \mathcal {N}\{0,\hat{\tau }_{dg}(a_i)\}\) and \(\epsilon ^b_{di}(a_i, r, \omega ) \sim \mathcal {N}(0,\hat{\sigma }_{d}^2)\). The proposed test statistic \(T_{r}(a)=[ \sum _{d=1}^D \int \{\hat{\eta }_d(a, \omega ,s)-\hat{\eta }(a, r, \omega )\}^2 d\omega ] ^{1/2}\) is based on the norm of the sum of the departures of the estimated group-region shifts \(\hat{\eta }_d(a, r, \omega )\) from the estimate of the common shift across groups, \(\hat{\eta }(a, r, \omega )\). The common region shift estimate \(\hat{\eta }(a, r, \omega )\), under the null, is set to the point-wise average of the group-region shift estimates, \(\hat{\eta }_d(a, r, \omega )\), \(d=1,\ldots ,D\). We utilize the proposed parametric bootstrap to estimate the distribution of the test statistic \(T_{r}(a)\) which can be used to evaluate the null hypothesis along the covariate domain.

To generate point-wise confidence intervals for estimates of \(\hat{\eta }_{d}(a,r,\omega )\), we repeat the above parametric bootstrap procedure but instead generate outcomes from the model \(Y^b_{di}(a_i, r, \omega )=\hat{\eta }_{d}(a_i, r, \omega )+\sum _{g=1}^{{G'_d}} \zeta ^b_{dig} \hat{\varphi }_{dg}(a_i, r, \omega )+\epsilon ^b_{di}(a_i, r, \omega )\). At each iteration of the bootstrap, estimate \(\hat{\eta }_{d}^b(a, r, \omega )\) from the simulated data and then form point-wise confidence intervals based on percentiles of the estimated group-region mean functions as a function of a, r and \(\omega \) across iterations, \(\{\hat{\eta }_{dg}^b(a, r, \omega ): b =1, \ldots , B\}\).

4 Application to the Task-Free Paradigm Data

Data structure: In our motivating data application, EEG signals were sampled at 500 Hz for two minutes from a 128-channel HydroCel Geodesic Sensor Net on 58 ASD and 39 TD children aged 25 to 146 months old (diagnostic groups were age matched). EEG recordings were collected during an ‘eyes-open’ paradigm in which bubbles were displayed on a screen in a sound-attenuated room to subjects at rest [7]. We describe the dataset in our previous work and present an abbreviated description here, though the reader may reference Scheffler et al. [15] for technical details related to pre-processing and data acquisition. EEG data for each subject is interpolated down to a standard 10–20 system 25 electrode montage (R = 25) using spherical interpolation as detailed in Perrin et al. [13], producing 25 electrodes with continuous EEG signal (Fig. 1 (b)). Alpha spectral density \((\varOmega = (6\,\mathrm {Hz},\, 14\,\mathrm {Hz})\)) estimates for each electrode were obtained and the resulting electrode-specific alpha spectral estimates form an instance of region-referenced functional data.

Data analysis results: We present the results from our application of CA-HPCA to the EEG data collected under the ‘eyes-open’ paradigm. While the main focus of our analysis is to characterize differences in alpha spectral dynamics between TD and ASD children over the course of development via inference on the group-region mean functions, we begin by briefly discussing the eigencomponents produced by the decomposition. The leading four; four and four; six covariate-adjusted regional and functional marginal eigencomponents are collectively found to explain 1.006 and 0.895 of the total FVE (\(FVE_{dG'_d}\)) in the TD and ASD groups, respectively. In the functional dimension along the covariate domain, the first least leading covariate-adjusted marginal eigenfunctions \(\phi _{d1}(a, \omega )\) (Fig. 2(a), top row) display maximal variation at approximately 6 and 10 Hz (in opposing directions), where the location of maximal variation shifts in TD children from higher to lower frequencies as age increases but remains relatively constant in ASD children. The second leading covariate-adjusted marginal eigenfunctions \(\phi _{d2}(a, \omega )\) (Fig. 2(a), bottom row) show maximal variation at 6 Hz, 8.5 Hz, 10.5 Hz and 6 Hz, 7.5 Hz in the TD and ASD groups, respectively, where again peak variation moves from higher to lower frequencies as age increases in the TD group but not the ASD group which instead displays shifts in the magnitude of maximal variation across development. The first two leading covariate-adjusted marginal eigenfunctions together explain at least 65\(\%\) of the variation in the covariate-adjusted functional marginal covariances. In the regional dimension along the covariate domain, the first leading covariate-adjusted marginal eigenvectors \(\text {v}_{d1}(a,r)\) (Fig. 2(b), top row) display maximal variation in the central; right temporal; left posterior and central; middle posterior electrodes at younger ages with a shift to right posterior and frontal; right temporal electrodes at older ages in the TD and ASD groups, respectively. The second leading covariate-adjusted marginal eigenvector \(\text {v}_{d2}(a,r)\) (Fig. 2(b), bottom row) shows maximal variation in the frontal and right frontal; right temporal electrodes at younger ages which moves to frontal; right posterior (opposing directions) and central; left posterior (opposing directions) at older ages in the TD and ASD groups, respectively. The first two covariate-adjusted marginal eigenvectors together explain at least 70\(\%\) of the variation in the covariate-adjusted regional marginal covariances.

Fig. 2.
figure 2

(a) Estimated first and second leading covariate-adjusted eigenfunctions \(\phi _{d1}(a, \omega )\) and \(\phi _{d2}(a, \omega )\) at \(a = 50, 70, 90, 110\) months. (b) Estimated first and second leading covariate-adjusted eigenvectors \(\text {v}_{d1}(a, r)\) and \(\text {v}_{d2}(a, r)\) at \(a = 50, 70, 90, 110\) months.

Fig. 3.
figure 3

(a) The \(-\text {log}_{10}\) transformed p-values from the hypothesis test for each electrode from the parametric bootstrap test for \(a = 25, \ldots , 145\) months. (b) The estimated group-region mean functions \(\eta _d(a, r, \omega )\) at ages \(a = 50, 70, 90, 110\) months from the T8 and T10 electrodes. Grey shading denotes 95\(\%\) point-wise confidence intervals for each estimate.

To test for differences between TD and ASD groups in the alpha spectrum over development, we utilize the parametric bootstrap procedure described in Sect. 3 under the null hypothesis that the TD and ASD group-region mean functions are equal for every electrode r at each age \(a = 25, \ldots , 145\) months which takes the form \(H_0: \eta _d(r, \omega , a) = \eta (r, \omega , a)\), \(d = 1, 2\). Figure 3(a) displays the results of the hypothesis tests for all electrodes and ages with p-values transformed to the \(-\text {log}_{10}\) scale to better stratify results where values greater than \(-\text {log}_{10}(0.05) = 1.30\) denote significance at level \(\alpha = .05\). Nearly all electrodes show significant differences between diagnostic groups in the alpha spectrum at some point over development (with the exception of the P3 and P7 electrodes) with the strongest group differences occurring at younger ages (30–50 months) and older ages (100–130 months) in the frontal, central, temporal, and posterior regions.

The greatest differences in the group-region mean functions across development are observed in the T8 and T10 electrodes displayed in Fig. 3(b) along with their 95\(\%\) point-wise confidence intervals generated as described in Sect. 3. At both electrodes, the TD group displays a well-defined peak in the alpha spectrum that shifts from 8 Hz–10 Hz moving from 50–110 months, whereas the ASD group generally has less clearly-defined peaks that tend to center around 9 Hz throughout development. Differences in the estimated group-region mean functions mirror the results found from the parametric bootstrap procedure with separation of the point-wise confidence intervals occurring at 50; 90; 110 months and 110 months for the T8 and T10 electrodes, respectively. When aggregated, the observations and inferences obtained from the CA-HPCA model components provide evidence for differences in both the mean structure and patterns of covariation between the two diagnostic groups that shift and change over development highlighting the need to provide covariate-adjustments in modeling the high-dimensional EEG data.

5 Discussion

We proposed a covariate-adjusted hybrid principal components analysis (CA-HPCA) which decomposes region-referenced functional data and accounts for covariate-dependent heteroscedasticity by assuming the high-dimensional covariance structure is weakly separable conditional on observed covariates. The proposed estimation procedure develops computationally efficient fast-covariance smoothers that incorporate covariate-dependence when estimating marginal covariances as well as a mixed effects framework which admits inference along the covariate-domain via bootstrap sampling. The CA-HPCA decomposition was developed to model EEG data over a broad developmental range but may be applied to other settings where high-dimensional data is expected to exhibit differential covariation as a function heterogenous covariates.