Covariate-Guided Bayesian Mixture of Spline Experts for the Analysis of Multivariate Time Series
Abstract
With rapid development of techniques to measure brain activity and structure, statistical methods for analyzing modern brain-imaging play an important role in the advancement of science. Imaging data that measure brain function are usually multivariate time series and are heterogeneous across both imaging sources and subjects, which lead to various statistical and computational challenges. In this paper, we propose a group-based method to cluster a collection of multivariate time series via a Bayesian mixture of smoothing splines. Our method assumes each multivariate time series is a mixture of multiple components with different mixing weights. Time-independent covariates are assumed to be associated with the mixture components and are incorporated via logistic weights of a mixture-of-experts model. We formulate this approach under a fully Bayesian framework using Gibbs sampling where the number of components is selected based on a deviance information criterion. The proposed method is compared to existing methods via simulation studies and is applied to a study on functional near-infrared spectroscopy (fNIRS), which aims to understand infant emotional reactivity and recovery from stress. The results reveal distinct patterns of brain activity, as well as associations between these patterns and selected covariates.
Keywords Bayesian mixture model Brain-imaging Functional near-infrared spectroscopy Model-based clustering Multivariate time series Smoothing splines Face-to-face still-face
1 Introduction
Time series are realizations of random processes. Obtaining estimated time series trajectories may provide insights into many practical problems. Functional near-infrared spectroscopy (fNIRS) is a noninvasive brain imaging technique that measures changes in both oxy- and deoxy-hemoglobin using near-infrared light (Jobsis, 1977). In fNIRS, processed data are nonstationary multivariate time series with a non-constant mean and high variability across time, which pose many statistical challenges in inference and estimation. In the case of fNIRS, different subjects could have distinct patterns of multivariate time series trajectories, which could be associated with certain clinical or demographic characteristics. The analysis of fNIRS data requires an appropriate method for the analysis of a collection of multivariate time series observed from different subjects, which is often referred to as a replicated multivariate time series setting.
Cluster analysis is often used to address the issue of heterogeneity and identify subgroups from collections of time series observed from different subjects. Time series clustering has been used in diverse scientific areas to discover trajectory patterns, which can uncover valuable information from complex and massive datasets (Liao, 2005). Time series clustering partitions the entire collection of data into different groups such that homogeneous time series are grouped together based on a certain similarity measure. Challenges in time-series clustering include computational issues due to high-dimensionality and the selection of proper similarity measures (Lin and others, 2003; Keogh and Pazzani, 2000). Several authors have proposed clustering algorithms for multivariate time series. Kakizawa and others (1998) used Kullback-Leibler discrimination information as the minimum discrimination criterion for clustering multivariate Gaussian time series. Wang and others (2007) used a modified -means clustering algorithm for clustering multivariate time series based on univariate structures. A variety of papers have established different model-based clustering methods for clustering multivariate time series, such as multivariate autoregressive models (Maharaj, 1999; He and others, 2022), a hidden Markov model (Li and others, 2001) and smoothing splines (Krafty and others, 2017; Li and Krafty, 2019). Comprehensive review of methods for time series clustering can be found in Liao (2005) and in Maharaj and others (2019).
Covariate-dependent structures can often be associated with the mixture components from a clustering of time series. Bertolacci and others (2022) presented an analysis of multiple nonstationary time series by using a covariate-dependent infinite mixture with logistic stick-breaking weights, where mixing weights are computed based on covariates. The mixture-of-experts model (Jacobs and others, 1991) assigns weights to each expert via a covariate-dependent multinomial logists. Huerta and others (2003) addressed the issue of time series model mixing based on covariates using the hierarchical mixture-of-experts (Jordan and Jacobs, 1994).
Smoothing splines, which are nonparametric methods that utilize roughness-based penalties, have been widely used in the analysis of time series (Wang, 2011; Gu, 2013). Bayesian interpretations of smoothing splines were first discussed by Kimeldorf and Wahba (1970). Wahba (1978) showed that the solution to the smoothing splines objective function is equivalent to Bayesian estimation with a partially diffuse prior. Speckman and Sun (2003) adopted a fully Bayesian approach for implementing smoothing splines with a noninformative prior on the variance component, as well as derived necessary and sufficient conditions for the propriety of the posterior. Smoothing splines require estimation of a large number of coefficients, which might be impractical in high-dimensional settings. Gu and Kim (2002) used a subset of reproducing kernel functions to achieve a low-dimensional approximation. Wood and others (2002) obtained a subset of basis functions using the eigen-decomposition of the Gaussian kernel. Krafty and others (2017) proposed a tensor-product model for the analysis of replicated multivariate time series which decomposes the power spectrum into products of univariate outcomes and frequencies.
Our goal in this paper is to perform a covariate-guided clustering of multivariate time series that can capture trajectory patterns of mixture components and evaluate the relationship between covariates and trajectory patterns. To this end, each mixture component is modeled via smoothing splines, and time-independent covariates are incorporated into the mixture model via the mixing weights. The method is formulated in a fully Bayesian framework. The rest of this paper is organized as follows. In Section 2 we introduce the motivating study. Sections 3 and 4 present the proposed model and priors. Section 5 introduces the sampling scheme. In Section 6 we report simulation results under different settings and Section 7 illustrates our proposed method with application to the motivating study. Section 8 concludes the paper with a discussion.
2 Motivating Study
Our motivating study aims to understand patterns of infant’s brain activity before, during and after an emotionally stressful probe called face-to-face still-face (FFSF) (Tronick and others, 1978). Participant mothers in this study were recruited from the longitudinal Pittsburgh Girls Study (PGS), a population-based study of 2,450 girls who were recruited in the city of Pittsburgh between the ages of 5 and 8 (Keenan and others, 2010). In 2016, a large-scale sub-study of the PGS was initiated to investigate how environmental factors, such as psychological stressors experienced during childhood and adolescence, affect later maternal pregnancy and child health. The study is part of the National Institutes of Health Environmental Influences of Child Health Outcomes (ECHO) program, which examines different impacts of prenatal environmental exposures across biological, chemical, physical and social domains on offspring health and development (Gillman and Blaisdell, 2018). The PGS-ECHO study enrolls PGS participants as they become pregnant or recently deliver a live birth. Participants complete multiple prenatal lab visits and the children are followed from ages 6 to 36 months. The lab protocol includes interviews and interaction tasks to assess contextual stressors, health, mood, lifestyle behaviors and offspring behavioral and emotional development.
Face-to-face interactions between mothers and infants are essential to the development of infants with respect to communication and social skills, as well as the regulation of emotion and temperament (Hipwell and others, 2019). The FFSF paradigm is a widely used stress task (a violation of the expectation of social interaction) that allows for biobehavioral measurement of individual differences in infant response and recovery. The FFSF comprises of three phases: interact (or baseline), still-face and recovery (Adamson and Frick, 2003). In phase 1, mothers perform normal interactions with infants without the use of toys; this phase serves as the baseline. In phase 2, mothers adopt a neutral facial expression (still-face with no facial or oral communication) to infants, followed by phase 3, where mothers resume normal interactions with their infants. Prior to the start of the FFSF, an fNIRS cap is fitted on the infant’s head to measure the level of and change in brain activation across the three phases.
PGS-ECHO fNIRS still-face data are recorded using a continuous NIRS imaging system (NIRScout; NIRx Medical Technologies, Berlin, Germany) at the sampling rate of 7.8125 Hz and using the NIRStart acquisition software. The data are measured simultaneously at two wavelengths (760 nm and 850 nm). As shown in Figure 1(a), this fNIRS probe consists of 12 channels from 8 sources and 4 detectors.
In the current study, we measured infant brain activity using the above fNIRS probe (roughly seconds of measurements for each phase). At the end of 2021, recorded fNIRS still-face data had been collected from 155 infant subjects. Demographic variables of infants and mothers such as gestational age, infant age, sex, birth weight, head circumference, along with parent reports on the Infant Behavior Questionnaire-Revised (IBQ-R) (Gartstein and Rothbart, 2003) were also collected. By removing infants who did not complete the three phases of the still-face paradigm, who had large outliers based on leverage and who had a very short period of measurements in any of the three still-face phases, there were a total of 82 subjects with complete fNIRS still-face data available for future analysis. The above quality control steps were performed by the NIRS brain AnalyzIR toolbox in MATLAB (Santosa and others, 2018). Moreover, additional data pre-processing steps were performed in R software, including data interpolation and rescaling. Finally, processed fNIRS data had a total of 1,500 measurement points for each subject and each channel, where each phase consisted of 500 points. All measurements and sampling times were rescaled to be between 0 and 1, with the interact phase occurring between time 0 to 1/3, still-face between 1/3 to 2/3, and recovery between 2/3 to 1. An example of processed fNIRS time series from two selected subjects and four selected channels is displayed in Figure 2.
The goals of our analysis are to identify distinct patterns of brain activity trajectories from multiple fNIRS channels represented by the relative concentration of oxy-hemoglobin, and to assess the association between trajectory patterns and relevant covariates.
3 Model
In this section, we provide a detailed description of our proposed covariate-guided Bayesian mixture of spline experts model. The proposed model consists of spline components whose mixing weights depend on covariates.
3.1 Mixture of splines model
We propose a tensor-product mixture of splines model for multivariate time series. For each subject , let be the -vector corresponding to the -dimensional time series for , where contains the trajectory of measurements on the th entry of the time series evaluated over a grid of time points for , and is the -vector of errors. Following the model representation of Krafty and others (2017), the tensor-product model for the -dimensional multivariate time series, conditional on component , , can be written as:
| (1) |
where are latent indicators as described in Section 3.3, is a -vector of intercepts and slopes, is a -vector of basis function coefficients as described in Section 4.1, is a identity matrix and denotes a tensor product. The matrix is given by and the columns of the matrix are smoothing splines basis functions as described in Section 4.1. We assume the error vector follows a distribution, where is the identity matrix, and is a diagonal matrix with the error variances . We assume each subject has a common grid of time points across all entries, such that and are common to all subjects, although our proposed method can be generalized to the case where subjects are observed at different grids of time points. In addition, we assume for .
To simplify notation, we let and . Equation (1) can then be rewritten as:
| (2) |
3.2 Model for the mixing weights
The mixture-of-experts model (Jacobs and others, 1991) is applied to form a covariate-guided structure for our proposed model, where the mixing weights are multinomial logits that are functions of selected covariates. As in Sun and others (2007), the mixing weights are expressed as
| (3) |
where is a vector of length containing values of covariates for subject , and is the corresponding coefficient vector. For identifiability, we set . Equation (3) differs slightly from the weights in the traditional mixture of experts model in that it includes a random term for each subject. This term accounts for unmeasured factors beyond the observed covariates, and enhances model performance and inference of the mixing weights.
3.3 Augmented likelihood
To account for heterogeneity across subjects, we assume that the th entry of the multivariate time series, , comes from a mixture model with components, i.e.,
| (4) |
where is the probability density function of the multivariate normal distribution with mean vector and covariance matrix for the th component and the th entry. The are mixing weights that depend on covariates as described in Section 3.2.
As is common in mixture models, augmenting the likelihood with latent variables indicating the component from which a time series originates simplifies the computation greatly (Dempster and others, 1977). In particular, let if the th multivariate time series belongs to the th component and , otherwise. Let be all observed multivariate time series and be the aggregation of all parameters for component and entry . The parameter vector for all components and all entries is then denoted by . The augmented likelihood of all multivariate time series is given by
| (5) |
where is the probability density function as appeared in the (4). From Bayes’ rule, the distribution of the latent indicators is given by
| (6) |
4 Priors
In this section, the priors on the model parameters are introduced.
4.1 Smoothing splines prior
The conditional expectation of a mixture component in model (4) is given by . We place a smoothing spline prior on and let , where is a zero-mean Gaussian process with variance covariance matrix (Wahba, 1980; Wood and others, 2002), such that , is a smoothing parameter for component and entry , and the th element of is given by for . The matrix is common to all subjects since all entries of the multivariate time series are observed at common time points.
As seen above, the matrix is , and to avoid the computational burden for large , a low-rank approximation is often adopted. To facilitate this approximation, we obtain basis functions via the spectral decomposition of , as has been proposed in Wood and others (2002) and used in Rosen and others (2009); Rosen and others (2012); Krafty and others (2011). In particular, the matrix consists of basis functions evaluated at times , and is an -dimensional vector of basis function coefficients. These basis functions are obtained by applying the spectral decomposition to such that , where is the matrix of eigenvectors of , and is a diagonal matrix containing the eigenvalues of . We then let the design matrix and place a normal prior on , which leads to or as mentioned above.
By using the low-rank approximation, the number of columns of is reduced from to (), which greatly reduces the computational burden without sacrificing the model fit (Wahba, 1980; Wood, 2006). Eubank (1999) indicated that the eigenvalues in the diagonal matrix decay rapidly as increases. Thus, we can achieve a good approximation by selecting a relatively small number of basis functions. The number of basis functions is set to in simulation studies as described in Section 6, which has been shown (Krafty and others 2011) to explain more than of the total variability.
The prior on is thus , where diag is the covariance matrix of . The vector contains fixed prior variances for the regression coefficients , common to all components and entries. In particular, we fix the common prior variance . The vector contains the smoothing parameters for the th mixture component and is an -vector of ones. We assume independence between the regression coefficients and the basis function coefficients .
4.2 Priors on the smoothing parameters
We assume the smoothing parameters vary across components and entries . Although the most common choice for the prior on a variance parameter is the inverse gamma distribution, Gelman (2006) and Wand and others (2011) suggested that a half- prior on the standard deviation can reflect lack of information on a scale parameter. The half- is a family of heavy-tailed distributions and has a good shrinkage performance. It can be expressed as a scale mixture of inverse gamma random variables using a latent variable which follows an inverse gamma distribution (Wand and others, 2011). Thus, we assume a half- distribution such that , where is a degrees of freedom parameter, and is a scale parameter. We set and for all components and entries.
4.3 Priors on the error variances
We assume and set and for all components and entries.
4.4 Priors on the logistic parameters and the variances of random intercepts
This section provides details on the prior distributions placed on the parameters of the logistic weights (3). For ease of notation, we denote , where , . We let where is a vector of all zeros except for a single in the th position, and is a matrix consisting of the rows , . Gaussian priors are placed on the logistic parameters, i.e., , where , and the priors on the random intercepts satisfy . As for the hyperparameters, we assume for all components and covariates, and , where and for all components.
To sample the logistic parameters, Polson and others (2013) proposed a data augmentation scheme incorporating Pólya-Gamma latent variables, which facilitates Gibbs steps. Details on sampling the logistic parameters are provided in the Supplementary Material.
5 Sampling scheme
This section outlines the Gibbs steps for sampling from the conditional posterior distributions of all the model parameters. More details are given in Supplementary Material.
5.1 Gibbs sampling steps
Letting denote the current Gibbs sampling iteration, parameter values at the th iteration are drawn according to the following steps.
- 1.
Draw from , where and are mean vectors and covariance matrices.
- 2.
Draw from , where is the current number of subjects in the th component, is the error vector for the th component, the th subject and the th entry, and is a latent variable in the scale mixture underlying the half- distribution.
- 3.
Draw from , where is a latent variable as in 2.
- 4.
Draw from , where is a Pólya-Gamma latent variable in the augmentation described in Section 4.4.
- 5.
- 6.
The mixing weights are obtained by computing from Equation (3).
- 7.
Draw according to Equation (6).
5.2 Selecting the number of components
Spiegelhalter and others (2002) suggested the use of the deviance information criterion (DIC) for model selection based on the effective number of parameters. Gelman and others (2003) introduced an alternative measure of effective number of parameters based on the variance of the log predictive density across MCMC iterations. This measure is robust and more accurate than the original one. Moreover, it has the advantages of always being positive and invariant to reparameterizations (Gelman and others, 2003).
In this paper, we use DIC to select the number of components for our proposed mixture model.
6 Simulation studies
To demonstrate the performance of the proposed method, we conduct simulation studies by generating data sets from the proposed model under two scenarios: two-component mixture () of trivariate time series () and four-component mixture () of bivariate time series (. We simulate replicates in each simulation setting with time series of length . A total of Gibbs sampling iterations are run with a burn-in of . In all simulation settings, the hyperparameters are assigned the same values, given in Section 4.
6.1 Two-component trivariate model
In this scenario, we consider the two-component trivariate model. From Equation (1), the th component of the proposed mixture model is given by
| (7) |
where is the trivariate time series evaluated at time , , and , are independent intercepts and slopes for each component, respectively. The vector consists of the th spline coefficients of all variates for component , and is the th spline basis function evaluated at time . The are independent zero-mean error terms, distributed as , where and . The smoothing parameters are set to and .
We investigate the performance of the trajectory and logistic parameter (see Equation (3)) estimates. For the former, we calculate the averaged root square error (ARSE) of each mixture component
where is the expectation of according to the th component, and is the th entry of the time series evaluated at time . The are the estimated posterior means of for and .
To handle a potential label switching across mixture components, we compute as the minimum value across all components, by using the estimate of the th component and the truth of each group, . After obtaining correct component labels by evaluating ARSE, we also report the averaged bias (A-bias) and the variance of the bias (V-bias) of each mixture component , where
and is computed by calculating the sample variance of the bias over entries and time points.
For each replicate, time series trajectories are estimated by three methods: the proposed method, the R package gbmt (Magrini, 2022) and the TRAJ procedure in SAS (Nagin and others, 2018). Boxplots of ARSE, A-bias and V-bias of each component are given in Figure 3. Notably, TRAJ is able to fit a regression spline model by treating basis functions as time-varying covariates, while gbmt is only able to fit a cubic model. Our proposed method fits a penalized spline model under the Bayesian framework and is able to outperform both gbmt and TRAJ in terms of ARSE and V-bias for both components. A-biases are close to zero and comparable for all three methods. These findings demonstrate that all three methods are able to achieve a reasonable fit to group-based trajectories since bias over the entire time series is close to zero. Our proposed method is able to obtain more precise estimates of trajectories as is evident from the smaller V-biases.
To evaluate the performances of the logistic parameters, we compute the root mean squared error (RMSE) for each logistic parameter using the proposed method and TRAJ. Notably, gbmt is not able to incorporate covariates into the computation of mixing weights. Results of RMSEs of each logistic parameter are given in Table 1. We also compare RMSEs between the proposed method and TRAJ under four settings of different combinations of and . Our proposed method yields smaller RMSEs of the logistic parameters in all cases, especially for the intercept and the first covariate . This is to be expected since TRAJ uses a multinomial logistic model, which may result in inflated parameter estimates in cases of unbalanced outcomes or perfect separation, while our proposed method is able to obtain a shrinkage result using the penalization method.
6.2 Four-component bivariate model
In this scenario, we consider the four-component bivariate model whose th component is given in Equation (7), where the values of the intercepts and slopes are , , , , , , and . By analogy to the two-component trivariate model, the errors are independent zero-mean bivariate Gaussian random variables, distributed as , where , , and .
The performances of the estimated trajectories and logistic parameters for this scenario are displayed in Figure 4 and Table 2. As in the first scenario, our proposed method outperforms both gbmt and TRAJ in terms of ARSE and V-bias for all components. Notably, TRAJ fails to yield precise estimates in several replicates and thus results in larger mean ARSE and V-bias. In terms of the logistic parameters, the proposed method performs well with smaller RMSEs in almost all cases, especially for and . More simulation results based on different values of and under the two scenarios considered above are presented in the Supplementary Material.
7 Real data application
We apply our proposed method to the analysis of the fNIRS still-face study introduced in Section 2. Six covariates are considered in our covariate-guided model, including Infant Behavior Questionnaire-Revised negative emotionality (IBQ-NE) score, Infant Behavior Questionnaire-Revised effortful control (IBQ-EC) score, gestational age (in Days), infant age (in Months), head circumference (in cm) and sex. All continuous covariates are centered and scaled. We set the number of basis functions at and run a total of Gibbs iterations with a burn-in period of . The values of the hyperparameters are the same as the ones used in the simulation studies.
The IBQ-NE construct combines data from the following subscales: Sadness, Distress to Limitations, Fear, and Falling Reactivity/Rate of Recovery from Distress. IBQ-EC refers to the ability to inhibit a dominant response to perform a subdominant one and has been shown to be protective against a myriad of difficulties (Gartstein and others, 2013). Finally, the data consist of 79 subjects with complete fNIRS and covariate values. We present results based on analyzing one set of four-channels. Additional results based on analyzing another set of four channels and all channels are given in the Supplementary Material. The four channels are S1D1, S2D2, S5D3 and S6D4. Channels S1D1 and S5D3 are in the central prefrontal region, while channels S2D2 and S6D4 are in the left and right prefrontal region, respectively. We fit our proposed model with the number of components varying from 2 to 6. Based on values of DIC introduced in Section 5.2, the two-component model is selected as the best model for this four-channel analysis.
Figure 5 presents the estimated trajectories of the two-component model fitted to the four channels. We are interested in brain activation signals in the still-face period while the interact period is used as the reference level. For component 1, a decreasing trajectory is observed for the still-face period in all four channels. In contrast, an increasing trend is observed for the still-face period in all four channels for component 2. After fitting the mixture model and finding above trajectory patterns, we define component 1 as the no response component and component 2 as the response component based on trajectory patterns in the still-face period. Figure 6 displays the logistic parameter estimates for all covariates in the 2-component model, where component 2 is used as the reference. There is evidence that IBQ-NE scores differ between the two components as its 95% credible interval does not include zero. A positive coefficient of IBQ-NE indicates that a higher IBQ-NE score is associated with component 1, which has decreased brain activation levels in the still-face period for all four channels. Though other logistic coefficients have 95% credible intervals that include zero, the negative posterior mean estimate of the IBQ-EC score could still indicate that a high IBQ-EC is associated with an increased brain activation as shown for component 2. These conclusions are consistent with findings in Gartstein and others (2013) that IBQ-NE is negatively associated with IBQ-EC. Enlow and others (2016) reported a negative association between activity level and IBQ-NE among infants whose families encourage a high level of activities. Furthermore, a negative posterior mean of logistic coefficient of infant age suggests that younger infant tends to have a decreasing brain activation level in the still-face period.
8 Discussion
The proposed covariate-guided Bayesian mixture of spline experts model aims to perform a model-based clustering of multivariate time series from multiple subjects. The mixture components in this model are penalized splines, and the mixing weights incorporate covariates. Our proposed method is compared to two commonly used methods through simulation studies which demonstrate a better performance of our method under different scenarios. We apply our proposed method to a fNIRS still-face study and find distinct patterns of components of time series trajectories, as well as an association between IBQ-NE score and a pattern of decreased brain activity in the still-face period. To the best of our knowledge, this is the first still-face study using fNIRS whose purpose is to identify trajectory components.
Our proposed method has some limitations. First, as in any mixture models, label switching may occur, especially in the real-data application. We have adopted the Equivalence Classes Representatives (ECR) algorithm proposed by Papastamoulis and Iliopoulos (2010) to make the components interpretable, but other methods may be considered. Second, the proposed method assumes independence among the entries of the time series and does not allow spatial dependence. Spatial correlations of fNIRS are correlations among fNIRS channels based on the placements and locations of each source and detector. An extension to a multilevel multivariate model would be possible by considering spatial correlations among time series entries. Lastly, our proposed method uses DIC to select the number of components which might be sub-optimal. Bayesian model averaging and reversible jump MCMC (RJMCMC) methods could be considered, but trans-dimensional sampling methods would pose challenges in providing interpretable components.
9 Software
Software in the form of R codes, together with an example data, is available at https://github.com/HaoyiFu1993/CBMOSE.
References
- Adamson and Frick (2003) Adamson, Lauren B and Frick, Janet E. (2003). The still face: A history of a shared experimental paradigm. Infancy 4(4), 451–473.
- Bertolacci and others (2022) Bertolacci, Michael, Rosen, Ori, Cripps, Edward and Cripps, Sally. (2022). Adaptspec-x: Covariate-dependent spectral modeling of multiple nonstationary time series. Journal of Computational and Graphical Statistics 31(2), 436–454.
- Dempster and others (1977) Dempster, Arthur P, Laird, Nan M and Rubin, Donald B. (1977). Maximum likelihood from incomplete data via the em algorithm. Journal of the Royal Statistical Society: Series B (Methodological) 39(1), 1–22.
- Enlow and others (2016) Enlow, Michelle Bosquet, White, Matthew T, Hails, Katherine, Cabrera, Ivan and Wright, Rosalind J. (2016). The infant behavior questionnaire-revised: Factor structure in a culturally and sociodemographically diverse sample in the united states. Infant Behavior and Development 43, 24–35.
- Eubank (1999) Eubank, Randall L. (1999). Nonparametric regression and spline smoothing. CRC press.
- Gartstein and others (2013) Gartstein, Maria A, Bridgett, David J, Young, Brandi N, Panksepp, Jaak and Power, Thomas. (2013). Origins of effortful control: Infant and parent contributions. Infancy 18(2), 149–183.
- Gartstein and Rothbart (2003) Gartstein, Maria A and Rothbart, Mary K. (2003). Studying infant temperament via the revised infant behavior questionnaire. Infant behavior and development 26(1), 64–86.
- Gelman (2006) Gelman, Andrew. (2006). Prior distributions for variance parameters in hierarchical models (comment on article by browne and draper). Bayesian analysis 1(3), 515–534.
- Gelman and others (2003) Gelman, A, Carlin, JB, Stern, HS, Rubin, DB and others. (2003). Bayesian data analysis.
- Gillman and Blaisdell (2018) Gillman, Matthew W and Blaisdell, Carol J. (2018). Environmental influences on child health outcomes, a research program of the nih. Current opinion in pediatrics 30(2), 260.
- Gu (2013) Gu, Chong. (2013). Smoothing spline ANOVA models, Volume 297. Springer.
- Gu and Kim (2002) Gu, Chong and Kim, Young-Ju. (2002). Penalized likelihood regression: General formulation and efficient approximation. Canadian Journal of Statistics 30(4), 619–628.
- He and others (2022) He, Linchen, Wang, Chan, Hu, Jiyuan, Gao, Zhan, Falcone, Emilia, Holland, Steven M, Blaser, Martin J and Li, Huilin. (2022). Arzimm: A novel analytic platform for the inference of microbial interactions and community stability from longitudinal microbiome study. Frontiers in genetics 13.
- Hipwell and others (2019) Hipwell, Alison E, Tung, Irene, Northrup, Jessie and Keenan, Kate. (2019). Transgenerational associations between maternal childhood stress exposure and profiles of infant emotional reactivity. Development and psychopathology 31(3), 887–898.
- Huerta and others (2003) Huerta, Gabriel, Jiang, Wenxin and Tanner, Martin A. (2003). Time series modeling via hierarchical mixtures. Statistica Sinica, 1097–1118.
- Jacobs and others (1991) Jacobs, Robert A, Jordan, Michael I, Nowlan, Steven J and Hinton, Geoffrey E. (1991). Adaptive mixtures of local experts. Neural computation 3(1), 79–87.
- Jobsis (1977) Jobsis, Frans F. (1977). Noninvasive, infrared monitoring of cerebral and myocardial oxygen sufficiency and circulatory parameters. Science 198(4323), 1264–1267.
- Jordan and Jacobs (1994) Jordan, Michael I and Jacobs, Robert A. (1994). Hierarchical mixtures of experts and the em algorithm. Neural computation 6(2), 181–214.
- Kakizawa and others (1998) Kakizawa, Yoshihide, Shumway, Robert H and Taniguchi, Masanobu. (1998). Discrimination and clustering for multivariate time series. Journal of the American Statistical Association 93(441), 328–340.
- Keenan and others (2010) Keenan, Kate, Hipwell, Alison, Chung, Tammy, Stepp, Stephanie, Stouthamer-Loeber, Magda, Loeber, Rolf and McTigue, Kathleen. (2010). The pittsburgh girls study: overview and initial findings. Journal of Clinical Child & Adolescent Psychology 39(4), 506–521.
- Keogh and Pazzani (2000) Keogh, Eamonn J and Pazzani, Michael J. (2000). A simple dimensionality reduction technique for fast similarity search in large time series databases. In: Pacific-Asia conference on knowledge discovery and data mining. Springer. pp. 122–133.
- Kimeldorf and Wahba (1970) Kimeldorf, George S and Wahba, Grace. (1970). A correspondence between bayesian estimation on stochastic processes and smoothing by splines. The Annals of Mathematical Statistics 41(2), 495–502.
- Krafty and others (2011) Krafty, Robert T, Hall, Martica and Guo, Wensheng. (2011). Functional mixed effects spectral analysis. Biometrika 98(3), 583–598.
- Krafty and others (2017) Krafty, Robert T, Rosen, Ori, Stoffer, David S, Buysse, Daniel J and Hall, Martica H. (2017). Conditional spectral analysis of replicated multiple time series with application to nocturnal physiology. Journal of the American Statistical Association 112(520), 1405–1416.
- Li and others (2001) Li, Cen, Biswas, Gautam, Dale, Mike and Dale, Pat. (2001). Building models of ecological dynamics using hmm based temporal data clustering—a preliminary study. In: International Symposium on Intelligent Data Analysis. Springer. pp. 53–62.
- Li and Krafty (2019) Li, Zeda and Krafty, Robert T. (2019). Adaptive bayesian time–frequency analysis of multivariate time series. Journal of the American Statistical Association 114(525), 453–465.
- Liao (2005) Liao, T Warren. (2005). Clustering of time series data—a survey. Pattern recognition 38(11), 1857–1874.
- Lin and others (2003) Lin, Jessica, Keogh, Eamonn and Truppel, Wagner. (2003). Clustering of streaming time series is meaningless. In: Proceedings of the 8th ACM SIGMOD workshop on Research issues in data mining and knowledge discovery. pp. 56–65.
- Magrini (2022) Magrini, Alessandro. (2022). Assessment of agricultural sustainability in european union countries: a group-based multivariate trajectory approach. AStA Advances in Statistical Analysis, 1–31.
- Maharaj (1999) Maharaj, Elizabeth Ann. (1999). Comparison and classification of stationary multivariate time series. Pattern Recognition 32(7), 1129–1138.
- Maharaj and others (2019) Maharaj, Elizabeh Ann, D’Urso, Pierpaolo and Caiado, Jorge. (2019). Time Series Clustering and Classification. chapman and hall/CRC.
- Nagin and others (2018) Nagin, Daniel S, Jones, Bobby L, Passos, Valeria Lima and Tremblay, Richard E. (2018). Group-based multi-trajectory modeling. Statistical methods in medical research 27(7), 2015–2023.
- Papastamoulis and Iliopoulos (2010) Papastamoulis, Panagiotis and Iliopoulos, George. (2010). An artificial allocations based solution to the label switching problem in bayesian analysis of mixtures of distributions. Journal of Computational and Graphical Statistics 19(2), 313–331.
- Polson and others (2013) Polson, Nicholas G, Scott, James G and Windle, Jesse. (2013). Bayesian inference for logistic models using pólya–gamma latent variables. Journal of the American statistical Association 108(504), 1339–1349.
- Rosen and others (2009) Rosen, Ori, Stoffer, David S and Wood, Sally. (2009). Local spectral analysis via a bayesian mixture of smoothing splines. Journal of the American Statistical Association 104(485), 249–262.
- Rosen and others (2012) Rosen, Ori, Wood, Sally and Stoffer, David S. (2012). Adaptspec: Adaptive spectral estimation for nonstationary time series. Journal of the American Statistical Association 107(500), 1575–1589.
- Santosa and others (2018) Santosa, Hendrik, Zhai, Xuetong, Fishburn, Frank and Huppert, Theodore. (2018). The nirs brain analyzir toolbox. Algorithms 11(5), 73.
- Speckman and Sun (2003) Speckman, Paul L and Sun, Dongchu. (2003). Fully bayesian spline smoothing and intrinsic autoregressive priors. Biometrika 90(2), 289–302.
- Spiegelhalter and others (2002) Spiegelhalter, David J, Best, Nicola G, Carlin, Bradley P and Van Der Linde, Angelika. (2002). Bayesian measures of model complexity and fit. Journal of the royal statistical society: Series b (statistical methodology) 64(4), 583–639.
- Sun and others (2007) Sun, Zhuoxin, Rosen, Ori and Sampson, Allan R. (2007). Multivariate bernoulli mixture models with application to postmortem tissue studies in schizophrenia. Biometrics 63(3), 901–909.
- Tronick and others (1978) Tronick, Edward, Als, Heidelise, Adamson, Lauren, Wise, Susan and Brazelton, T Berry. (1978). The infant’s response to entrapment between contradictory messages in face-to-face interaction. Journal of the American Academy of Child psychiatry 17(1), 1–13.
- Wahba (1978) Wahba, Grace. (1978). Improper priors, spline smoothing and the problem of guarding against model errors in regression. Journal of the Royal Statistical Society: Series B (Methodological) 40(3), 364–372.
- Wahba (1980) Wahba, Grace. (1980). Automatic smoothing of the log periodogram. Journal of the American Statistical Association 75(369), 122–132.
- Wand and others (2011) Wand, Matthew P, Ormerod, John T, Padoan, Simone A and Frühwirth, Rudolf. (2011). Mean field variational bayes for elaborate distributions. Bayesian Analysis 6(4), 847–900.
- Wang and others (2007) Wang, Xiaozhe, Wirth, Anthony and Wang, Liang. (2007). Structure-based statistical features and multivariate time series clustering. In: Seventh IEEE international conference on data mining (ICDM 2007). IEEE. pp. 351–360.
- Wang (2011) Wang, Yuedong. (2011). Smoothing splines: methods and applications. CRC press.
- Wood and others (2002) Wood, Sally A, Jiang, Wenxin and Tanner, Martin. (2002). Bayesian mixture of splines for spatially adaptive nonparametric regression. Biometrika 89(3), 513–528.
- Wood (2006) Wood, Simon N. (2006). Generalized additive models: an introduction with R. chapman and hall/CRC.
| n | N | Method | ||||
|---|---|---|---|---|---|---|
| 50 | 150 | Proposed | 0.89 | 0.52 | 0.29 | 0.32 |
| TRAJ | 1.57 | 0.87 | 0.36 | 0.34 | ||
| 70 | 150 | Proposed | 0.86 | 0.50 | 0.29 | 0.31 |
| TRAJ | 1.55 | 0.86 | 0.36 | 0.34 | ||
| 50 | 250 | Proposed | 0.77 | 0.40 | 0.22 | 0.23 |
| TRAJ | 0.96 | 0.50 | 0.23 | 0.24 | ||
| 70 | 250 | Proposed | 0.77 | 0.41 | 0.22 | 0.23 |
| TRAJ | 0.97 | 0.51 | 0.24 | 0.24 |
| n | N | Method | Comparison | ||||
|---|---|---|---|---|---|---|---|
| 50 | 150 | Proposed | C1 vs C4 | 0.81 | 0.53 | 0.30 | 0.39 |
| C2 vs C4 | 1.11 | 0.46 | 0.42 | 0.36 | |||
| C3 vs C4 | 0.89 | 0.42 | 0.28 | 0.34 | |||
| TRAJ | C1 vs C4 | 1.20 | 0.74 | 0.35 | 0.41 | ||
| C2 vs C4 | 3.81 | 2.27 | 1.33 | 0.49 | |||
| C3 vs C4 | 2.07 | 1.33 | 0.76 | 0.32 |
10 Supplemental material
Appendix A: Details of the sampling scheme
As described in Section 5 of the paper, Gibbs sampling is used to facilitate Bayesian inference. We denote by the parameters for the th component and the th entry, and the parameters in this vector are drawn from the corresponding conditional posterior distributions. Let be the current Gibbs sampling iteration; detailed Gibbs sampling steps for drawing the parameters at the th iteration are given below.
- 1.
Sampling the basis function coefficients
For each component and time series entry , based on the augmented likelihood in Section 3.3 and the priors on described in Section 4.1, the conditional posterior distribution of is:
where , , is the current number of subjects in the th component, is the prior covariance matrix for . Hence, for each component and entry , we draw from .
- 2.
Sampling the error variances
Gelman (2006) proposed using the half- distribution as the prior on scale parameters. We follow Wand and others (2011) and express the half- prior of Section 4.3 as a scale mixture of inverse Gamma distributions as follows
Therefore, the conditional posterior distribution of the latent variable is
which is . Denoting by the error vector of time series for component , we have , where . The conditional distribution of the error variance is
which is . The sampling scheme proceeds by first sampling and then .
- 3.
Sampling the smoothing parameters
The smoothing parameters are drawn by analogy to the error variances. We first draw . The conditional posterior distribution of the smoothing parameters is
which is . The sampling scheme proceeds by first sampling and then .
- 4.
Sampling the logistic parameters
Let be the aggregation of the logistic parameters and all random intercepts for the th component. Based on the logits of Section 3.2 and the corresponding priors described in Section 4.4, the conditional posterior distribution of is
where is a matrix with representing all covariates (including intercepts) for subject . To sample from the posterior distribution of , we adopt the Póyla-Gamma data augmentation strategy of Polson and others (2013) by introducing a latent variable coming from the Pólya-Gamma distribution. Thus, the conditional posterior distributions of the logistic parameters are
where and , is the Pólya-gamma distribution with and , is the prior covariance matrix of Section 4.4 and . By assuming the conjugate prior on , the posterior distribution of the Pólya-gamma latent variable is
Thus, the conditional distributions of the logistic parameters (including the random intercepts) are
where , , , , and , with . Thus, is drawn by first sampling and then .
- 5.
Sampling the variances of the random intercepts
By analogy with sampling the error variances and sthe moothing parameters, we first draw . The conditional posterior distributions of the variances of the random intercepts are
which is . The sampling scheme proceeds by first sampling and then .
- 6.
Computing the mixing weights
After drawing the , the mixing weights for each component, given the design matrix , are computed by
- 7.
Sampling the latent indicators
After sampling all parameters and computing the mixing weights, the final Gibbs step is to allocate subjects to different components by drawing the latent indicators . As in Section 3.3, the conditional posterior of these indicators is
and the indicators are drawn from the multinomial distribution.
Appendix B: Additional simulation results
Appendix B adds more simulation results in addition to simulation results in the paper itself. To further demonstrate the performance of the proposed method, we conduct simulation studies under two scenarios: two-component mixture of trivariate time series and four-component mixture of bivariate time series. The model formula is displayed in Section 6.1 of the paper. We investigate the performance of our proposed method in terms of estimated trajectories and logistic parameters.
Mean(SD) of the ARSE, A-bias and V-bias for each component of the two-component trivariate model are given in Table 3. To demonstrate the performance of the proposed method in various settings, we look at combinations of the number of multivariate time series () and the length of each time series (), and compare our proposed method to two existing methods: gbmt package in R (Magrini, 2022) and TRAJ procedure in SAS (Nagin and others, 2018). The case of and in Table 3 corresponds to Figure 3 in the main paper. The performance of the logistic parameters (RMSEs) with different values of and are given in Table 1 of the paper.
The Mean(SD) of the ARSE, A-bias and V-bias for each component of the four-component mixture of bivariate time series of length are given in Table 4, which corresponds to Figure 4 in the main paper. RMSEs of the logistic parameters for this setting are listed in Table 2 of the paper. Tables 5 - 10 present performance measures of the estimated trajectories and logistic parameters for combinations of different lengths of time series and numbers of time series , under the scenario of the four-component bivariate model.
As expected, our proposed method outperforms the two existing methods in terms of the estimated trajectories for each component under different settings (different values of and , for both the two-component trivariate and the four-component bivariate scenarios). The proposed method is able to achieve smaller ARSE and V-bias, while all three methods are able to obtain estimated trajectories with a very small bias. Notably, for the four-component bivariate scenario, TRAJ gives larger values of mean ARSE, A-bias and V-bias, which result from imprecise estimates of several replicates due to convergence issues. In terms of the logistic parameters, our proposed method outperforms TRAJ in almost all comparisons, especially for the intercept and the slope of the first covariate . Our proposed method yields shrinkage estimates for the logistic parameters due to using a Bayesian method, while the multinomial logistic regression used in TRAJ gives inflated parameter estimates in case of perfect separations and unbalanced designs.
| n | N | Method | ARSE C1 | A-bias C1 | V-bias C1 | ARSE C2 | A-bias C2 | V-bias C2 | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 50 | 150 | Proposed |
|
|
|
|
|
| ||||||||||||
| gbmt |
|
|
|
|
|
| ||||||||||||||
| TRAJ |
|
|
|
|
|
| ||||||||||||||
| 70 | 150 | Proposed |
|
|
|
|
|
| ||||||||||||
| gbmt |
|
|
|
|
|
| ||||||||||||||
| TRAJ |
|
|
|
|
|
| ||||||||||||||
| 50 | 250 | Proposed |
|
|
|
|
|
| ||||||||||||
| gbmt |
|
|
|
|
|
| ||||||||||||||
| TRAJ |
|
|
|
|
|
| ||||||||||||||
| 70 | 250 | Proposed |
|
|
|
|
|
| ||||||||||||
| gbmt |
|
|
|
|
|
| ||||||||||||||
| TRAJ |
|
|
|
|
|
|
| n | N | Method | ARSE C1 | A-bias C1 | V-bias C1 | ARSE C2 | A-bias C2 | V-bias C2 | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 50 | 150 | Proposed |
|
|
|
|
|
| ||||||||||||
| gbmt |
|
|
|
|
|
| ||||||||||||||
| TRAJ |
|
|
|
|
|
| ||||||||||||||
| n | N | Method | ARSE C3 | A-bias C3 | V-bias C3 | ARSE C4 | A-bias C4 | V-bias C4 | ||||||||||||
| 50 | 150 | Proposed |
|
|
|
|
|
| ||||||||||||
| gbmt |
|
|
|
|
|
| ||||||||||||||
| TRAJ |
|
|
|
|
|
|
| n | N | Method | ARSE C1 | A-bias C1 | V-bias C1 | ARSE C2 | A-bias C2 | V-bias C2 | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 70 | 150 | Proposed |
|
|
|
|
|
| ||||||||||||
| gbmt |
|
|
|
|
|
| ||||||||||||||
| TRAJ |
|
|
|
|
|
| ||||||||||||||
| n | N | Method | ARSE C3 | A-bias C3 | V-bias C3 | ARSE C4 | A-bias C4 | V-bias C4 | ||||||||||||
| 70 | 150 | Proposed |
|
|
|
|
|
| ||||||||||||
| gbmt |
|
|
|
|
|
| ||||||||||||||
| TRAJ |
|
|
|
|
|
|
| n | N | Method | Comparison | ||||
|---|---|---|---|---|---|---|---|
| 70 | 150 | Proposed | C1 vs C4 | 0.81 | 0.51 | 0.29 | 0.41 |
| C2 vs C4 | 1.42 | 0.73 | 0.58 | 0.36 | |||
| C3 vs C4 | 1.05 | 0.58 | 0.37 | 0.31 | |||
| TRAJ | C1 vs C4 | 1.13 | 0.66 | 0.31 | 0.45 | ||
| C2 vs C4 | 3.12 | 1.66 | 0.99 | 0.55 | |||
| C3 vs C4 | 1.15 | 0.74 | 0.48 | 0.35 |
| n | N | Method | ARSE C1 | A-bias C1 | V-bias C1 | ARSE C2 | A-bias C2 | V-bias C2 | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 50 | 250 | Proposed |
|
|
|
|
|
| ||||||||||||
| gbmt |
|
|
|
|
|
| ||||||||||||||
| TRAJ |
|
|
|
|
|
| ||||||||||||||
| n | N | Method | ARSE C3 | A-bias C3 | V-bias C3 | ARSE C4 | A-bias C4 | V-bias C4 | ||||||||||||
| 50 | 250 | Proposed |
|
|
|
|
|
| ||||||||||||
| gbmt |
|
|
|
|
|
| ||||||||||||||
| TRAJ |
|
|
|
|
|
|
| n | N | Method | Comparison | ||||
|---|---|---|---|---|---|---|---|
| 50 | 250 | Proposed | C1 vs C4 | 0.63 | 0.41 | 0.26 | 0.29 |
| C2 vs C4 | 1.00 | 0.46 | 0.40 | 0.27 | |||
| C3 vs C4 | 0.63 | 0.33 | 0.23 | 0.24 | |||
| TRAJ | C1 vs C4 | 0.91 | 0.56 | 0.30 | 0.28 | ||
| C2 vs C4 | 1.40 | 0.86 | 0.61 | 0.35 | |||
| C3 vs C4 | 2.24 | 1.40 | 0.85 | 0.27 |
| n | N | Method | ARSE C1 | A-bias C1 | V-bias C1 | ARSE C2 | A-bias C2 | V-bias C2 | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 70 | 250 | Proposed |
|
|
|
|
|
| ||||||||||||
| gbmt |
|
|
|
|
|
| ||||||||||||||
| TRAJ |
|
|
|
|
|
| ||||||||||||||
| n | N | Method | ARSE C3 | A-bias C3 | V-bias C3 | ARSE C4 | A-bias C4 | V-bias C4 | ||||||||||||
| 70 | 250 | Proposed |
|
|
|
|
|
| ||||||||||||
| gbmt |
|
|
|
|
|
| ||||||||||||||
| TRAJ |
|
|
|
|
|
|
| n | N | Method | Comparison | ||||
|---|---|---|---|---|---|---|---|
| 70 | 250 | Proposed | C1 vs C4 | 0.64 | 0.40 | 0.26 | 0.28 |
| C2 vs C4 | 0.92 | 0.42 | 0.41 | 0.28 | |||
| C3 vs C4 | 0.63 | 0.31 | 0.23 | 0.23 | |||
| TRAJ | C1 vs C4 | 0.82 | 0.50 | 0.27 | 0.28 | ||
| C2 vs C4 | 1.47 | 0.86 | 0.61 | 0.36 | |||
| C3 vs C4 | 1.60 | 0.96 | 0.57 | 0.25 |
Appendix C: Additional real-data results
Appendix C describes more real-data results in addition to those in Section 7 of the main paper. Our motivating study is described in Section 2 of the paper. Figure 7 shows the estimated trajectories of the three-component model for another set of four channels (S1D3, S3D2, S5D4, and S7D4). Based on the selection criterion DIC introduced in Section 5.2 of the main paper, the three-component model was selected as the best model. We named the second component as the mixture response component because it involves both increased and decreased brain activity or hemoglobin level for the still-face period for different channels. In addition, Figure 8 displays the logistic coefficient estimates and 95% credible intervals corresponding to each covariate. The last component (third component) is always used as the reference. We reach the same conclusion with positive estimates of IBQ-NE scores and negative estimates of IBQ-EC scores for both components (component 1 vs. 3, component 2 vs. 3).
In addition to the four-channel analyses, we also present results from all channels (twelve channels). Figures 9, 10, 11 present the estimated trajectories of the first, second and third component for the three-component model with all twelve channels, respectively. The three-component model was selected as the best model for the twelve-channel analysis based on the adjusted DIC. We named the three components no response, mixture response, and response component, respectively. Figure 12 displays the logistic coefficient estimates and 95 % credible intervals corresponding to each covariate.