arXiv is now an independent nonprofit! Learn more
License: CC Zero
arXiv:2301.01373v1 [stat.ME] 03 Jan 2023

Covariate-Guided Bayesian Mixture of Spline Experts for the Analysis of Multivariate Time Series

Haoyi Fu Affiliation: Department of Biostatistics Affiliation: University of Pittsburgh Affiliation: Pittsburgh, PA, USA Email: haf48@pitt.edu    Lu Tang Affiliation: Department of Biostatistics Affiliation: University of Pittsburgh Affiliation: Pittsburgh, PA, USA    Ori Rosen Affiliation: Department of Mathematical Sciences Affiliation: University of Texas at El Paso Affiliation: El Paso, TX, USA    Alison E. Hipwell Affiliation: Department of Psychiatry Affiliation: University of Pittsburgh Affiliation: Pittsburgh, PA, USA    Theodore J. Huppert Affiliation: Department of Electrical and Computer Engineering Affiliation: University of Pittsburgh Affiliation: Pittsburgh, PA, USA    Robert T. Krafty Affiliation: Department of Biostatistics and Bioinformatics Affiliation: Emory University Affiliation: Atlanta, GA, USA
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 \cdot Brain-imaging \cdot Functional near-infrared spectroscopy \cdot Model-based clustering \cdot Multivariate time series \cdot Smoothing splines \cdot 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 KK-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 120120 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 i=1,,Ni=1,\ldots,N, let 𝒚i=(𝒚i1,,𝒚ik,,𝒚iK)\boldsymbol{y}_{i}=(\boldsymbol{y}_{i1}^{\prime},\ldots,\boldsymbol{y}_{ik}^{\prime},\ldots,\boldsymbol{y}_{iK}^{\prime})^{\prime} be the nKnK-vector corresponding to the KK-dimensional time series for k=1,,Kk=1,\ldots,K, where 𝒚ik=[yik(t1),,yik(tj),,yik(tn)]\boldsymbol{y}_{ik}=\big[y_{ik}(t_{1}),\ldots,y_{ik}(t_{j}),\ldots,y_{ik}(t_{n})\big]^{\prime} contains the trajectory of measurements on the kkth entry of the time series evaluated over a grid of nn time points for j=1,,nj=1,\ldots,n, and ϵi=(ϵi1,,ϵiK)\boldsymbol{\epsilon}_{i}=(\boldsymbol{\epsilon}_{i1}^{\prime},\ldots,\boldsymbol{\epsilon}_{iK}^{\prime})^{\prime} is the nKnK-vector of errors. Following the model representation of Krafty and others (2017), the tensor-product model for the KK-dimensional multivariate time series, conditional on component gg, g=1,,Gg=1,\ldots,G, can be written as:

{𝒚izig=1}=(𝑰K𝑿)𝜶g+(𝑰K𝑾)𝜷g+ϵi,\{\boldsymbol{y}_{i}\mid z_{ig}=1\}=(\boldsymbol{I}_{K}\otimes\boldsymbol{X})\boldsymbol{\alpha}_{g}+(\boldsymbol{I}_{K}\otimes\boldsymbol{W})\boldsymbol{\beta}_{g}+\boldsymbol{\epsilon}_{i}, (1)

where {zig}g=1G\{z_{ig}\}_{g=1}^{G} are latent indicators as described in Section 3.3, 𝜶g=(𝜶g1,,𝜶gK)\boldsymbol{\alpha}_{g}=(\boldsymbol{\alpha}_{g1}^{\prime},\ldots,\boldsymbol{\alpha}_{gK}^{\prime})^{\prime} is a 2K2K-vector of intercepts and slopes, 𝜷g=(𝜷g1,,𝜷gK)\boldsymbol{\beta}_{g}=(\boldsymbol{\beta}_{g1}^{\prime},\ldots,\boldsymbol{\beta}_{gK}^{\prime})^{\prime} is a mKmK-vector of basis function coefficients as described in Section 4.1, 𝑰K\boldsymbol{I}_{K} is a K×KK\times K identity matrix and \otimes denotes a tensor product. The matrix 𝑿\boldsymbol{X} is given by 𝑿=(111t1t2tn)\boldsymbol{X}=\begin{pmatrix}1&1&\ldots&1\\ t_{1}&t_{2}&\ldots&t_{n}\end{pmatrix}^{\prime} and the mm columns of the matrix 𝑾\boldsymbol{W} are smoothing splines basis functions as described in Section 4.1. We assume the error vector ϵi\boldsymbol{\epsilon}_{i} follows a MVN(𝟎,𝚿g𝑼)\mbox{MVN}(\boldsymbol{0},\boldsymbol{\Psi}_{g}\otimes\boldsymbol{U}) distribution, where 𝑼=𝑰n\boldsymbol{U}=\boldsymbol{I}_{n} is the n×nn\times n identity matrix, and 𝚿g=diag(𝝈g2)\boldsymbol{\Psi}_{g}=\mbox{diag}(\boldsymbol{\sigma}_{g}^{2}) is a K×KK\times K diagonal matrix with the error variances 𝝈g2=(σg12,,σgK2)\boldsymbol{\sigma}_{g}^{2}=(\sigma_{g1}^{2},\ldots,\sigma_{gK}^{2})^{\prime}. We assume each subject has a common grid of time points across all KK entries, such that 𝑿\boldsymbol{X} and 𝑾\boldsymbol{W} 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 𝑬(𝒚ik,𝒚ih)=𝟎n×n\boldsymbol{E}(\boldsymbol{y}_{ik},\boldsymbol{y}_{ih})=\boldsymbol{0}_{n\times n} for khk\neq h.

To simplify notation, we let 𝑺=[𝑿𝑾]\boldsymbol{S}=[\boldsymbol{X}\ \boldsymbol{W}] and 𝜽g=(𝜶g1,𝜷g1,,𝜶gK,𝜷gK)\boldsymbol{\theta}_{g}=(\boldsymbol{\alpha}_{g1}^{\prime},\boldsymbol{\beta}_{g1}^{\prime},\ldots,\boldsymbol{\alpha}_{gK}^{\prime},\boldsymbol{\beta}_{gK}^{\prime})^{\prime}. Equation (1) can then be rewritten as:

{𝒚izig=1}=(𝑰K𝑺)𝜽g+ϵi.\{\boldsymbol{y}_{i}\mid z_{ig}=1\}=(\boldsymbol{I}_{K}\otimes\boldsymbol{S})\boldsymbol{\theta}_{g}+\boldsymbol{\epsilon}_{i}. (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

πig(𝑽i)=exp(𝑽i𝜹g+ζig)h=1Gexp(𝑽i𝜹h+ζih),\pi_{ig}(\boldsymbol{V}_{i})=\frac{\exp(\boldsymbol{V}_{i}^{\prime}\boldsymbol{\delta}_{g}+\zeta_{ig})}{\sum_{h=1}^{G}\exp(\boldsymbol{V}_{i}^{\prime}\boldsymbol{\delta}_{h}+\zeta_{ih})}, (3)

where 𝑽i=(1,Vi1,,ViP)\boldsymbol{V}_{i}=(1,V_{i1},\cdots,V_{iP})^{\prime} is a vector of length (P+1)(P+1) containing values of PP covariates for subject ii, and 𝜹g=(δg0,δg1,,δgP)\boldsymbol{\delta}_{g}=(\delta_{g0},\delta_{g1},\cdots,\delta_{gP})^{\prime} is the corresponding coefficient vector. For identifiability, we set 𝜹G=𝟎\boldsymbol{\delta}_{G}=\boldsymbol{0}. Equation (3) differs slightly from the weights in the traditional mixture of experts model in that it includes a random term ζig\zeta_{ig} 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 kkth entry of the multivariate time series, 𝒚ik\boldsymbol{y}_{ik}, comes from a mixture model with GG components, i.e.,

𝒚ikg=1Gπigfgk(𝒚ik𝝁gk,σgk2𝑰n),\boldsymbol{y}_{ik}\sim\sum_{g=1}^{G}\pi_{ig}f_{gk}(\boldsymbol{y}_{ik}\mid\boldsymbol{\mu}_{gk},\sigma_{gk}^{2}\boldsymbol{I}_{n}), (4)

where fgk(𝒚ik𝝁gk,σgk2𝑰n)f_{gk}(\boldsymbol{y}_{ik}\mid\boldsymbol{\mu}_{gk},\sigma_{gk}^{2}\boldsymbol{I}_{n}) is the probability density function of the multivariate normal distribution with mean vector 𝝁gk=𝑿𝜶gk+𝑾𝜷gk\boldsymbol{\mu}_{gk}=\boldsymbol{X}\boldsymbol{\alpha}_{gk}+\boldsymbol{W}\boldsymbol{\beta}_{gk} and covariance matrix σgk2𝑰n\sigma_{gk}^{2}\boldsymbol{I}_{n} for the ggth component and the kkth entry. The πig\pi_{ig} 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 zig=1z_{ig}=1 if the iith multivariate time series belongs to the ggth component and zig=0z_{ig}=0, otherwise. Let 𝒚=(𝒚1,,𝒚N)\boldsymbol{y}=(\boldsymbol{y}_{1},\ldots,\boldsymbol{y}_{N})^{\prime} be all observed multivariate time series and 𝚯gk\boldsymbol{\Theta}_{gk} be the aggregation of all parameters for component gg and entry kk. The parameter vector for all components and all entries is then denoted by 𝚯=(𝚯11,,𝚯GK)\boldsymbol{\Theta}=(\boldsymbol{\Theta}_{11}^{\prime},\ldots,\boldsymbol{\Theta}_{GK}^{\prime})^{\prime}. The augmented likelihood of all NN multivariate time series is given by

L(𝚯𝒚,Z)=i=1Ng=1G[πigk=1Kfgk(𝒚ik𝚯gk)]zig,L(\boldsymbol{\Theta}\mid\boldsymbol{y},Z)=\prod_{i=1}^{N}\prod_{g=1}^{G}\Big[\pi_{ig}\prod_{k=1}^{K}f_{gk}(\boldsymbol{y}_{ik}\mid\boldsymbol{\Theta}_{gk})\Big]^{z_{ig}}, (5)

where fgk(𝒚ik𝚯gk)f_{gk}(\boldsymbol{y}_{ik}\mid\boldsymbol{\Theta}_{gk}) is the probability density function as appeared in the (4). From Bayes’ rule, the distribution of the latent indicators zigz_{ig} is given by

p(zig=1𝒚,𝑺,𝚯,πig)=πigk=1Kfgk(𝒚ik𝚯gk)h=1Gπihk=1Kfhk(𝒚ik𝚯hk).p(z_{ig}=1\mid\boldsymbol{y},\boldsymbol{S},\boldsymbol{\Theta},\pi_{ig})=\frac{\pi_{ig}\prod_{k=1}^{K}f_{gk}(\boldsymbol{y}_{ik}\mid\boldsymbol{\Theta}_{gk})}{\sum_{h=1}^{G}\pi_{ih}\prod_{k=1}^{K}f_{hk}(\boldsymbol{y}_{ik}\mid\boldsymbol{\Theta}_{hk})}. (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 E(𝒚ikzig=1)=𝑿𝜶gk+𝑾𝜷gkE(\boldsymbol{y}_{ik}\mid z_{ig}=1)=\boldsymbol{X}\boldsymbol{\alpha}_{gk}+\boldsymbol{W}\boldsymbol{\beta}_{gk}. We place a smoothing spline prior on 𝜷gk\boldsymbol{\beta}_{gk} and let 𝓗gk=𝑾𝜷gk\boldsymbol{\mathcal{H}}_{gk}=\boldsymbol{W}\boldsymbol{\beta}_{gk}, where 𝓗gk=[gk(t1),,gk(tn)]\boldsymbol{\mathcal{H}}_{gk}=\big[\mathcal{H}_{gk}(t_{1}),\ldots,\mathcal{H}_{gk}(t_{n})\big]^{\prime} is a zero-mean Gaussian process with variance covariance matrix τgk2𝚽\tau^{2}_{gk}\boldsymbol{\Phi} (Wahba, 1980; Wood and others, 2002), such that cov[gk(tr),gk(th)]=τgk2ϕrh\text{cov}\big[\mathcal{H}_{gk}(t_{r}),\mathcal{H}_{gk}(t_{h})\big]=\tau_{gk}^{2}\phi_{rh}, τgk2\tau_{gk}^{2} is a smoothing parameter for component gg and entry kk, and the (r,h)(r,h)th element of 𝚽\boldsymbol{\Phi} is given by ϕrh=12tr2(thtr3)\phi_{rh}=\frac{1}{2}t_{r}^{2}(t_{h}-\frac{t_{r}}{3}) for trtht_{r}\leq t_{h}. The matrix 𝚽\boldsymbol{\Phi} is common to all subjects since all entries of the multivariate time series are observed at common time points.

As seen above, the matrix 𝚽\boldsymbol{\Phi} is n×nn\times n, and to avoid the computational burden for large nn, a low-rank approximation is often adopted. To facilitate this approximation, we obtain basis functions via the spectral decomposition of 𝚽\boldsymbol{\Phi}, 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 𝑾\boldsymbol{W} consists of mm basis functions evaluated at times t1,,tnt_{1},\ldots,t_{n}, and 𝜷gk\boldsymbol{\beta}_{gk} is an mm-dimensional vector of basis function coefficients. These basis functions are obtained by applying the spectral decomposition to 𝚽\boldsymbol{\Phi} such that 𝚽=𝑸𝚪𝑸T\boldsymbol{\Phi}=\boldsymbol{Q}\boldsymbol{\Gamma}\boldsymbol{Q}^{T}, where 𝑸\boldsymbol{Q} is the matrix of eigenvectors of 𝚽\boldsymbol{\Phi}, and 𝚪\boldsymbol{\Gamma} is a diagonal matrix containing the eigenvalues of 𝚽\boldsymbol{\Phi}. We then let the design matrix 𝑾=𝑸𝚪1/2\boldsymbol{W}=\boldsymbol{Q}\boldsymbol{\Gamma}^{1/2} and place a normal prior N(0,τgk2𝑰n)N(0,\tau^{2}_{gk}\boldsymbol{I}_{n}) on 𝜷gk\boldsymbol{\beta}_{gk}, which leads to 𝓗gk\boldsymbol{\mathcal{H}}_{gk} or 𝑾𝜷gkN(𝟎,τgk2𝚽)\boldsymbol{W}\boldsymbol{\beta}_{gk}\sim N(\boldsymbol{0},\tau^{2}_{gk}\boldsymbol{\Phi}) as mentioned above.

By using the low-rank approximation, the number of columns of 𝑾\boldsymbol{W} is reduced from nn to mm (m<nm<n), 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 𝚪\boldsymbol{\Gamma} decay rapidly as mm increases. Thus, we can achieve a good approximation by selecting a relatively small number mm of basis functions. The number of basis functions mm is set to 1010 in simulation studies as described in Section 6, which has been shown (Krafty and others 2011) to explain more than 98%98\% of the total variability.

The prior on 𝜽g\boldsymbol{\theta}_{g} is thus 𝜽gN(𝟎,𝑫g)\boldsymbol{\theta}_{g}\sim N(\boldsymbol{0},\boldsymbol{D}_{g}), where 𝑫g=\boldsymbol{D}_{g}= diag(σα12𝟏2,τg12𝟏m,,σαK2𝟏2,τgK2𝟏m)(\sigma_{\alpha 1}^{2}\boldsymbol{1}_{2},\ \tau_{g1}^{2}\boldsymbol{1}_{m},\ \ldots\ ,\sigma_{\alpha K}^{2}\boldsymbol{1}_{2},\ \tau_{gK}^{2}\boldsymbol{1}_{m}) is the covariance matrix of 𝜽g\boldsymbol{\theta}_{g}. The vector (σα12,,σαK2)(\sigma_{\alpha 1}^{2},\ldots,\sigma_{\alpha K}^{2})^{\prime} contains fixed prior variances for the regression coefficients 𝜶gk\boldsymbol{\alpha}_{gk}, common to all components and entries. In particular, we fix the common prior variance σα2=100\sigma_{\alpha}^{2}=100. The vector 𝝉g2=(τg12,,τgK2)\boldsymbol{\tau}_{g}^{2}=(\tau_{g1}^{2},\ldots,\tau_{gK}^{2})^{\prime} contains the smoothing parameters for the ggth mixture component and 𝟏m\boldsymbol{1}_{m} is an mm-vector of ones. We assume independence between the regression coefficients 𝜶gk\boldsymbol{\alpha}_{gk} and the basis function coefficients 𝜷gk\boldsymbol{\beta}_{gk}.

4.2 Priors on the smoothing parameters

We assume the smoothing parameters 𝝉g2=(τg12,,τgK2)\boldsymbol{\tau}_{g}^{2}=(\tau_{g1}^{2},\ldots,\tau_{gK}^{2})^{\prime} vary across components gg and entries kk. 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-tt prior on the standard deviation can reflect lack of information on a scale parameter. The half-tt 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-tt distribution such that τgktντ+(0,Aτ)\tau_{gk}\sim t_{\nu_{\tau}}^{+}(0,A_{\tau}), where ντ\nu_{\tau} is a degrees of freedom parameter, and AτA_{\tau} is a scale parameter. We set ντ=3\nu_{\tau}=3 and Aτ=10A_{\tau}=10 for all components and entries.

4.3 Priors on the error variances

We assume σgki.i.dtνσ+(0,Aσ)\sigma_{gk}\stackrel{{\scriptstyle\text{i.i.d}}}{{\sim}}t_{\nu_{\sigma}}^{+}(0,A_{\sigma}) and set νσ=3\nu_{\sigma}=3 and Aσ=10A_{\sigma}=10 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 𝜹g=(𝜹gT,𝜻gT)T\boldsymbol{\delta}_{g}^{*}=(\boldsymbol{\delta}_{g}^{T},\boldsymbol{\zeta}_{g}^{T})^{T}, where 𝜻g=(ζ1g,,ζNg)T\boldsymbol{\zeta}_{g}=(\zeta_{1g},\cdots,\zeta_{Ng})^{T}, g=1,,Gg=1,\ldots,G. We let 𝑽i=(𝑽i,𝒆i)\boldsymbol{V}_{i}^{*}=(\boldsymbol{V}_{i}^{\prime},\boldsymbol{e}_{i}^{\prime})^{\prime} where 𝒆i\boldsymbol{e}_{i} is a vector of all zeros except for a single 11 in the iith position, and 𝑽\boldsymbol{V}^{*} is a matrix consisting of the rows 𝑽iT\boldsymbol{V}_{i}^{*T}, i=1,,Ni=1,\ldots,N. Gaussian priors are placed on the logistic parameters, i.e., 𝜹gN(𝟎,𝑩g)\boldsymbol{\delta}_{g}^{*}\sim N(\boldsymbol{0},\boldsymbol{B}_{g}), where 𝑩g=diag(σδg2𝟏P+1,κζg2𝟏N)\boldsymbol{B}_{g}=\rm{diag}(\sigma_{\delta g}^{2}\boldsymbol{1}_{P+1},\ \kappa^{2}_{\zeta g}\boldsymbol{1}_{N}), and the priors on the random intercepts satisfy 𝜻gN(𝟎,κζg2𝑰N)\boldsymbol{\zeta}_{g}\sim N(\boldsymbol{0},\kappa^{2}_{\zeta g}\boldsymbol{I}_{N}). As for the hyperparameters, we assume σδg2=10\sigma_{\delta g}^{2}=10 for all components and covariates, and κζgtνκ+(0,Aκ)\kappa_{\zeta g}\sim t_{\nu_{\kappa}}^{+}(0,A_{\kappa}), where νκ=3\nu_{\kappa}=3 and Aκ=10A_{\kappa}=10 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 \ell denote the current Gibbs sampling iteration, parameter values at the (+1)(\ell+1)th iteration are drawn according to the following steps.

  1. 1.

    Draw 𝜽gk(+1)\boldsymbol{\theta}_{gk}^{(\ell+1)} from (𝜽gk(+1)𝒚,𝑺,τgk2(),σgk2())N(𝒖gk,σgk2𝚲gk)(\boldsymbol{\theta}_{gk}^{(\ell+1)}\mid\boldsymbol{y},\boldsymbol{S},\tau_{gk}^{2(\ell)},\sigma_{gk}^{2(\ell)})\sim N(\boldsymbol{u}_{gk},\sigma_{gk}^{2}\boldsymbol{\Lambda}_{gk}), where 𝒖gk\boldsymbol{u}_{gk} and 𝚲gk\boldsymbol{\Lambda}_{gk} are mean vectors and covariance matrices.

  2. 2.

    Draw σgk2(+1)\sigma_{gk}^{2(\ell+1)} from (σgk2(+1)ϵigk(+1),aσgk(+1))IG((nNg()+νσ)/2,i=1Nzigϵigkϵigk/2+νσ/aσgk)(\sigma_{gk}^{2(\ell+1)}\mid\boldsymbol{\epsilon}_{igk}^{(\ell+1)},a_{\sigma_{gk}}^{(\ell+1)})\sim IG\Big((nN_{g}^{(\ell)}+\nu_{\sigma})/2,\sum_{i=1}^{N}z_{ig}\boldsymbol{\epsilon}_{igk}^{\prime}\boldsymbol{\epsilon}_{igk}/2+\nu_{\sigma}/a_{\sigma_{gk}}\Big), where Ng()N_{g}^{(\ell)} is the current number of subjects in the ggth component, ϵigk\boldsymbol{\epsilon}_{igk} is the error vector for the ggth component, the iith subject and the kkth entry, and aσgka_{\sigma_{gk}} is a latent variable in the IGIG scale mixture underlying the half-tt distribution.

  3. 3.

    Draw τgk2(+1)\tau_{gk}^{2(\ell+1)} from (τgk2(+1)𝜷gk(+1),aτgk(+1))IG((ντ+m)/2,𝜷gk𝜷gk/2+ντ/aτgk)(\tau_{gk}^{2(\ell+1)}\mid\boldsymbol{\beta}_{gk}^{(\ell+1)},a_{\tau_{gk}}^{(\ell+1)})\sim IG\Big((\nu_{\tau}+m)/2,\boldsymbol{\beta}_{gk}^{\prime}\boldsymbol{\beta}_{gk}/2+\nu_{\tau}/a_{\tau_{gk}}\Big), where aτgka_{\tau_{gk}} is a latent variable as in 2.

  4. 4.

    Draw 𝜹g(+1)\boldsymbol{\delta}_{g}^{*(\ell+1)} from (𝜹g(+1)𝑽,zig(),ωig(+1),κζg2())N(𝑴g,𝚺g)(\boldsymbol{\delta}_{g}^{*(\ell+1)}\mid\boldsymbol{V^{*}},z_{ig}^{(\ell)},\omega_{ig}^{(\ell+1)},\kappa^{2(\ell)}_{\zeta g})\sim N(\boldsymbol{M}_{g},\boldsymbol{\Sigma}_{g}), where ωig(+1)\omega_{ig}^{(\ell+1)} is a Pólya-Gamma latent variable in the augmentation described in Section 4.4.

  5. 5.

    Draw κζg2(+1)\kappa^{2(\ell+1)}_{\zeta g} from (κζg2(+1)𝜻g(+1),aκg(+1))IG(νκ/2,𝜻g𝜻g/2+(νκ+N)/aκg)(\kappa^{2(\ell+1)}_{\zeta g}\mid\boldsymbol{\zeta}_{g}^{(\ell+1)},a_{\kappa_{g}}^{(\ell+1)})\sim IG\Big(\nu_{\kappa}/2,\boldsymbol{\zeta}_{g}^{\prime}\boldsymbol{\zeta}_{g}/2+(\nu_{\kappa}+N)/a_{\kappa_{g}}\Big), where aκga_{\kappa_{g}} is a latent variable as in 2 and 3.

  6. 6.

    The mixing weights πig(+1)\pi_{ig}^{(\ell+1)} are obtained by computing p(πig(+1)𝑽,𝜹g(+1),zig())p(\pi_{ig}^{(\ell+1)}\mid\boldsymbol{V}^{*},\boldsymbol{\delta}_{g}^{*(\ell+1)},z_{ig}^{(\ell)}) from Equation (3).

  7. 7.

    Draw zig(+1)p(zig(+1)=1𝒚,𝑺,𝜽gk(+1),σgk2(+1),πig(+1))z_{ig}^{(\ell+1)}\sim p(z_{ig}^{(\ell+1)}=1\mid\boldsymbol{y},\boldsymbol{S},\boldsymbol{\theta}_{gk}^{(\ell+1)},\sigma_{gk}^{2(\ell+1)},\pi_{ig}^{(\ell+1)}) 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 (G=2G=2) of trivariate time series (K=3K=3) and four-component mixture (G=4G=4) of bivariate time series (OPENK=2)K=2). We simulate 100100 replicates in each simulation setting with N=150N=150 time series of length n=50n=50. A total of 20,00020,000 Gibbs sampling iterations are run with a burn-in of 4,0004,000. 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 ggth component of the proposed mixture model is given by

{𝒚(tj)zig=1}=𝜶0g+𝜶1gtj+q=1mwq(tj)𝜷gq+ϵgtj,j=1,,n,g=1,,G,\{\boldsymbol{y}(t_{j})\mid z_{ig}=1\}=\boldsymbol{\alpha}_{0g}+\boldsymbol{\alpha}_{1g}t_{j}+\sum_{q=1}^{m}w_{q}(t_{j})\boldsymbol{\beta}_{gq}+\boldsymbol{\epsilon}_{gt_{j}},\quad j=1,\ldots,n,\;\;g=1,\ldots,G, (7)

where 𝒚(tj)\boldsymbol{y}(t_{j}) is the trivariate time series evaluated at time tjt_{j}, 𝜶01=(1,3,2)\boldsymbol{\alpha}_{01}=(1,-3,-2)^{\prime}, 𝜶02=(5,4,3)\boldsymbol{\alpha}_{02}=(5,4,3)^{\prime} and 𝜶11=(2,2,0.5)\boldsymbol{\alpha}_{11}=(-2,2,0.5)^{\prime}, 𝜶12=(1,1,0.5)\boldsymbol{\alpha}_{12}=(1,-1,-0.5)^{\prime} are independent intercepts and slopes for each component, respectively. The vector 𝜷gq\boldsymbol{\beta}_{gq} consists of the qqth spline coefficients of all variates for component gg, and wq(tj)w_{q}(t_{j}) is the qqth spline basis function evaluated at time tjt_{j}. The ϵgtj\boldsymbol{\epsilon}_{gt_{j}} are independent zero-mean error terms, distributed as ϵgtjMVN(𝟎,diag(σg12,σg22,σg32))\boldsymbol{\epsilon}_{gt_{j}}\sim\text{MVN}\Big(\boldsymbol{0},{\rm diag}(\sigma_{g1}^{2},\sigma_{g2}^{2},\sigma_{g3}^{2})\Big), where σ12=(σ112,σ122,σ132)=(3,5,4.5)\sigma_{1}^{2}=(\sigma_{11}^{2},\sigma_{12}^{2},\sigma_{13}^{2})^{\prime}=(3,5,4.5)^{\prime} and σ22=(σ212,σ222,σ232)=(4,3.5,4)\sigma_{2}^{2}=(\sigma_{21}^{2},\sigma_{22}^{2},\sigma_{23}^{2})^{\prime}=(4,3.5,4)^{\prime}. The smoothing parameters are set to τ12=(τ112,τ122,τ132)=(3.5,5,8.5)\tau_{1}^{2}=(\tau_{11}^{2},\tau_{12}^{2},\tau_{13}^{2})^{\prime}=(3.5,5,8.5)^{\prime} and τ22=(τ212,τ222,τ232)=(6,2.5,1.5)\tau_{2}^{2}=(\tau_{21}^{2},\tau_{22}^{2},\tau_{23}^{2})^{\prime}=(6,2.5,1.5)^{\prime}.

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 gg

ARSEg=1nKj=1nk=1K[μgk(tj)μ^gk(tj)]2,\text{ARSE}_{g}=\sqrt{\frac{1}{nK}\sum_{j=1}^{n}\sum_{k=1}^{K}\Big[\mu_{gk}(t_{j})-\hat{\mu}_{gk}(t_{j})\Big]^{2}},

where μgk(tj)\mu_{gk}(t_{j}) is the expectation of yk(tj)y_{k}(t_{j}) according to the ggth component, and yk(tj)y_{k}(t_{j}) is the kkth entry of the time series evaluated at time tjt_{j}. The μ^gk(tj)\hat{\mu}_{gk}(t_{j}) are the estimated posterior means of μgk(tj)\mu_{gk}(t_{j}) for k=1,,Kk=1,\ldots,K and j=1,,nj=1,\ldots,n.

To handle a potential label switching across mixture components, we compute ARSEg\text{ARSE}_{g} as the minimum value across all components, by using the estimate of the ggth component and the truth of each group, g=1,,Gg=1,\ldots,G. 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 gg, where

A-biasg=1nKj=1nk=1K[μ^gk(tj)μgk(tj)],\text{A-bias}_{g}=\frac{1}{nK}\sum_{j=1}^{n}\sum_{k=1}^{K}\Big[\hat{\mu}_{gk}(t_{j})-\mu_{gk}(t_{j})\Big],

and V-biasg\text{V-bias}_{g} 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 N=150,250N=150,250 and n=50,70n=50,70. Our proposed method yields smaller RMSEs of the logistic parameters in all cases, especially for the intercept δ0\delta_{0} and the first covariate δ1\delta_{1}. 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 ggth component is given in Equation (7), where the values of the intercepts and slopes are 𝜶01=(1,2)\boldsymbol{\alpha}_{01}=(1,-2)^{\prime}, 𝜶02=(5,3)\boldsymbol{\alpha}_{02}=(5,3)^{\prime}, 𝜶03=(3,5.5)\boldsymbol{\alpha}_{03}=(-3,5.5)^{\prime}, 𝜶04=(4,1)\boldsymbol{\alpha}_{04}=(4,-1)^{\prime}, 𝜶11=(3,0)\boldsymbol{\alpha}_{11}=(-3,0)^{\prime}, 𝜶12=(2,3.5)\boldsymbol{\alpha}_{12}=(2,-3.5)^{\prime}, 𝜶13=(2.5,2)\boldsymbol{\alpha}_{13}=(2.5,2)^{\prime} and 𝜶14=(3,1.5)\boldsymbol{\alpha}_{14}=(-3,1.5)^{\prime}. By analogy to the two-component trivariate model, the errors ϵgtj\boldsymbol{\epsilon}_{gt_{j}} are independent zero-mean bivariate Gaussian random variables, distributed as ϵgtjMVN(𝟎,diag(σg12,σg22))\boldsymbol{\epsilon}_{gt_{j}}\sim\text{MVN}\Big(\boldsymbol{0},{\rm diag}(\sigma_{g1}^{2},\sigma_{g2}^{2})\Big), where σ12=(σ112,σ122)=(6,9)\sigma_{1}^{2}=(\sigma_{11}^{2},\sigma_{12}^{2})^{\prime}=(6,9)^{\prime}, σ22=(σ212,σ222)=(8,7.5)\sigma_{2}^{2}=(\sigma_{21}^{2},\sigma_{22}^{2})^{\prime}=(8,7.5)^{\prime}, σ32=(σ312,σ322)=(10,6.5)\sigma_{3}^{2}=(\sigma_{31}^{2},\sigma_{32}^{2})^{\prime}=(10,6.5)^{\prime} and σ42=(σ412,σ422)=(7,8.5)\sigma_{4}^{2}=(\sigma_{41}^{2},\sigma_{42}^{2})^{\prime}=(7,8.5)^{\prime}.

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 δ0\delta_{0} and δ1\delta_{1}. More simulation results based on different values of NN and nn 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 m=20m=20 and run a total of 30,00030,000 Gibbs iterations with a burn-in period of 6,0006,000. 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.
Refer to caption
Figure 1: fNIRS probe configuration. (a) Positioning of 8 sources, 4 detectors and 12 channels. A channel is connected by one source and one detector (blue line). (b) Brodmann areas covered by fNIRS probe.
Refer to caption
Figure 2: An example of processed fNIRS time series from two selected subjects and four selected channels. The measurements are the relative concentration of oxy-hemoglobin.
Refer to caption
Figure 3: Boxplots of the averaged root square error (ARSE), the averaged bias (A-bias) and the variance of bias (V-bias) of estimated trajectories for each component from 100100 replicates of 150150 two-component trivariate time series of length 5050. The proposed method was compared to R package gbmt and TRAJ procedure in SAS. The diamond markers denote the mean statistics of each method and component.
Refer to caption
Figure 4: Boxplots of the averaged root square error (ARSE), the averaged bias (A-bias) and the variance of bias (V-bias) of estimated trajectories for each component from 100100 replicates of 150150 four-component bivariate time series of length 5050. The proposed method was compared to R package gbmt and TRAJ procedure in SAS. The diamond markers denote the mean statistics of each method and component. All boxplots are zoomed in for better visualization.
Refer to caption
Figure 5: Estimated trajectories of the two-component model with four selected channels. I: Interact S: Still-face R: Recovery. Red curves are posterior mean and two green dashed curves are 95% pointwise credible intervals.
Refer to caption
Figure 6: Logistic coefficient estimates and 95% credible intervals for each covariate of the two-component model.
Table 1: Root mean square errors (RMSEs) of each logistic parameter for the two-component trivariate model from 100100 replicates of NN two-component trivariate time series of length nn. RMSEs of the proposed method were compared to TRAJ procedure in SAS. Parameters δ0\delta_{0}, δ1\delta_{1}, δ2\delta_{2} and δ3\delta_{3} are intercept, first, second and third logistic parameters, respectively. The true values of logistic parameters are 5,3.5,1,0.15,-3.5,1,0.1, respectively
n   N Method δ0\delta_{0} δ1\delta_{1} δ2\delta_{2} δ3\delta_{3}
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
Table 2: Root mean square errors (RMSEs) of each logistic parameter for the four-component bivariate model from 100100 replicates of 150150 four-component bivariate time series of length 5050. RMSEs of the proposed method were compared to TRAJ procedure in SAS. Parameters δ0\delta_{0}, δ1\delta_{1}, δ2\delta_{2} and δ3\delta_{3} are intercept, first, second and third logistic parameters, respectively. The fourth component was used as the reference component. The true values of logistic parameters are 5,3.5,1,0.15,-3.5,1,0.1 (first component), 4,2.5,2,0.2-4,2.5,-2,-0.2 (second component), 3,2,0.8,0.23,-2,0.8,0.2 (third component). C1, C2, C3 and C4 denote first, second, third and fourth component, respectively.
n   N Method Comparison δ0\delta_{0} δ1\delta_{1} δ2\delta_{2} δ3\delta_{3}
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 𝚯gk=(𝜽gk,τgk2,σgk2,𝜹g,κζg2)\boldsymbol{\Theta}_{gk}=(\boldsymbol{\theta}_{gk}^{\prime},\tau_{gk}^{2},\sigma_{gk}^{2},\boldsymbol{\delta}_{g}^{*\prime},\kappa^{2}_{\zeta g})^{\prime} the parameters for the ggth component and the kkth entry, and the parameters in this vector are drawn from the corresponding conditional posterior distributions. Let \ell be the current Gibbs sampling iteration; detailed Gibbs sampling steps for drawing the parameters at the (+1)(\ell+1)th iteration are given below.

  1. 1.

    Sampling the basis function coefficients

    For each component gg and time series entry kk, based on the augmented likelihood in Section 3.3 and the priors on 𝜽gk=(𝜶gk,𝜷gk)\boldsymbol{\theta}_{gk}=(\boldsymbol{\alpha}_{gk}^{\prime},\boldsymbol{\beta}_{gk}^{\prime})^{\prime} described in Section 4.1, the conditional posterior distribution of (𝜽gk(+1)𝒚,𝑺,τgk2(),σgk2())(\boldsymbol{\theta}_{gk}^{(\ell+1)}\mid\boldsymbol{y},\boldsymbol{S},\tau_{gk}^{2(\ell)},\sigma_{gk}^{2(\ell)}) is:

    p(𝜽gk(+1)𝒚,𝑺,\displaystyle p(\boldsymbol{\theta}_{gk}^{(\ell+1)}\mid\boldsymbol{y},\boldsymbol{S}, OPENτgk2(),σgk2())p(𝒚𝑺,𝜽gk(+1),σgk2())p(𝜽gk(+1)τgk2())\displaystyle\tau_{gk}^{2(\ell)},\sigma_{gk}^{2(\ell)})\propto p(\boldsymbol{y}\mid\boldsymbol{S},\boldsymbol{\theta}_{gk}^{(\ell+1)},\sigma_{gk}^{2(\ell)})\cdot p(\boldsymbol{\theta}_{gk}^{(\ell+1)}\mid\tau_{gk}^{2(\ell)})
    i=1N{(σgk2)n/2exp[12σgk2(𝒚ik𝑺𝜽gk)(𝒚ik𝑺𝜽gk)]}zig\displaystyle\propto\prod_{i=1}^{N}\Big\{(\sigma_{gk}^{2})^{-n/2}\exp\big[-\frac{1}{2\sigma_{gk}^{2}}(\boldsymbol{y}_{ik}-\boldsymbol{S}\boldsymbol{\theta}_{gk})^{\prime}(\boldsymbol{y}_{ik}-\boldsymbol{S}\boldsymbol{\theta}_{gk})\big]\Big\}^{z_{ig}}
    ×|𝑫gk|1/2exp(12𝜽gk𝑫gk1𝜽gk)\displaystyle\times|\boldsymbol{D}_{gk}|^{-1/2}\exp\Big(-\frac{1}{2}\boldsymbol{\theta}_{gk}\boldsymbol{D}_{gk}^{-1}\boldsymbol{\theta}_{gk}\Big)
    exp{12σgk2[i=1Nzig(𝒚ik𝑺𝜽gk)(𝒚ik𝑺𝜽gk)+𝜽gkσgk2𝑫gk1𝜽gk]}\displaystyle\propto\exp\Big\{-\frac{1}{2\sigma_{gk}^{2}}\big[\sum_{i=1}^{N}z_{ig}(\boldsymbol{y}_{ik}-\boldsymbol{S}\boldsymbol{\theta}_{gk})^{\prime}(\boldsymbol{y}_{ik}-\boldsymbol{S}\boldsymbol{\theta}_{gk})+\boldsymbol{\theta}_{gk}^{\prime}\sigma_{gk}^{2}\boldsymbol{D}_{gk}^{-1}\boldsymbol{\theta}_{gk}\big]\Big\}
    exp[12σgk2(𝜽gk𝒖gk)(𝚲gk)1(𝜽gk𝒖gk)]\displaystyle\propto\exp\Big[-\frac{1}{2\sigma_{gk}^{2}}(\boldsymbol{\theta}_{gk}-\boldsymbol{u}_{gk})^{\prime}(\boldsymbol{\Lambda}_{gk})^{-1}(\boldsymbol{\theta}_{gk}-\boldsymbol{u}_{gk})\Big]
    N(𝒖gk,σgk2𝚲gk),\displaystyle\sim N(\boldsymbol{u}_{gk},\sigma_{gk}^{2}\boldsymbol{\Lambda}_{gk}),

    where 𝚲gk=(Ng()𝑺𝑺+σgk2𝑫gk1)1\boldsymbol{\Lambda}_{gk}=(N_{g}^{(\ell)}\boldsymbol{S}^{\prime}\boldsymbol{S}+\sigma_{gk}^{2}\boldsymbol{D}_{gk}^{-1})^{-1}, 𝒖gk=𝚲gki=1Nzig𝑺𝒚ik\boldsymbol{u}_{gk}=\boldsymbol{\Lambda}_{gk}\sum_{i=1}^{N}z_{ig}\boldsymbol{S}^{\prime}\boldsymbol{y}_{ik}, Ng()N_{g}^{(\ell)} is the current number of subjects in the ggth component, 𝑫gk=diag(σα2𝟏2,τgk2𝟏m)\boldsymbol{D}_{gk}={\rm diag}(\sigma_{\alpha}^{2}\boldsymbol{1}_{2},\tau_{gk}^{2}\boldsymbol{1}_{m}) is the prior covariance matrix for 𝜽gk\boldsymbol{\theta}_{gk}. Hence, for each component gg and entry kk, we draw 𝜽gk(+1)\boldsymbol{\theta}_{gk}^{(\ell+1)} from (𝜽gk(+1)𝒚,𝑺,τgk2(),σgk2())N(𝒖gk,σgk2𝚲gk)(\boldsymbol{\theta}_{gk}^{(\ell+1)}\mid\boldsymbol{y},\boldsymbol{S},\tau_{gk}^{2(\ell)},\sigma_{gk}^{2(\ell)})\sim N(\boldsymbol{u}_{gk},\sigma_{gk}^{2}\boldsymbol{\Lambda}_{gk}).

  2. 2.

    Sampling the error variances

    Gelman (2006) proposed using the half-tt distribution as the prior on scale parameters. We follow Wand and others (2011) and express the half-tt prior of Section 4.3 as a scale mixture of inverse Gamma distributions as follows

    (σgk2aσgk)IG(νσ2,νσaσgk),aσgkIG(12,1Aσ2).(\sigma_{gk}^{2}\mid a_{\sigma_{gk}})\sim IG\Big(\frac{\nu_{\sigma}}{2},\frac{\nu_{\sigma}}{a_{\sigma_{gk}}}\Big),a_{\sigma_{gk}}\sim IG\Big(\frac{1}{2},\frac{1}{A_{\sigma}^{2}}\Big).

    Therefore, the conditional posterior distribution of the latent variable aσgka_{\sigma_{gk}} is

    p(aσgk(+1)σgk2())exp[1aσgk(νσσgk2+1Aσ2)]×(aσgk)(12+1+νσ2),p(a_{\sigma_{gk}}^{(\ell+1)}\mid\sigma_{gk}^{2(\ell)})\propto\exp\Big[-\frac{1}{a_{\sigma_{gk}}}\Big(\frac{\nu_{\sigma}}{\sigma_{gk}^{2}}+\frac{1}{A_{\sigma}^{2}}\Big)\Big]\times(a_{\sigma_{gk}})^{-(\frac{1}{2}+1+\frac{\nu_{\sigma}}{2})},

    which is IG(νσ+12,νσσgk2+1Aσ2)IG\Big(\frac{\nu_{\sigma}+1}{2},\frac{\nu_{\sigma}}{\sigma_{gk}^{2}}+\frac{1}{A_{\sigma}^{2}}\Big). Denoting by ϵigk\boldsymbol{\epsilon}_{igk} the error vector of time series 𝒚ik\boldsymbol{y}_{ik} for component gg, we have ϵigk=𝒚ik𝑺𝜽gk\boldsymbol{\epsilon}_{igk}=\boldsymbol{y}_{ik}-\boldsymbol{S}\boldsymbol{\theta}_{gk}, where ϵigkN(𝟎,σgk2𝑰n)\boldsymbol{\epsilon}_{igk}\sim N(\boldsymbol{0},\sigma_{gk}^{2}\boldsymbol{I}_{n}). The conditional distribution of the error variance is

    p(σgk2(+1)CLOSE\displaystyle p(\sigma_{gk}^{2(\ell+1)} ϵigk(+1),aσgk(+1))p(ϵigk(+1)σgk2(+1))p(aσgk(+1)σgk2(+1))p(σgk2(+1))\displaystyle\mid\boldsymbol{\epsilon}_{igk}^{(\ell+1)},a_{\sigma_{gk}}^{(\ell+1)})\propto p(\boldsymbol{\epsilon}_{igk}^{(\ell+1)}\mid\sigma_{gk}^{2(\ell+1)})\cdot p(a_{\sigma_{gk}}^{(\ell+1)}\mid\sigma_{gk}^{2(\ell+1)})\cdot p(\sigma_{gk}^{2(\ell+1)})
    i=1N[(σgk2)n2exp(12σgk2ϵigkϵigk)]zig×(σgk2)(νσ2+1)exp(νσσgk2aσgk)\displaystyle\propto\prod_{i=1}^{N}\Big[(\sigma_{gk}^{2})^{-\frac{n}{2}}\exp\Big(-\frac{1}{2\sigma_{gk}^{2}}\boldsymbol{\epsilon}_{igk}^{\prime}\boldsymbol{\epsilon}_{igk}\Big)\Big]^{z_{ig}}\times(\sigma_{gk}^{2})^{-(\frac{\nu_{\sigma}}{2}+1)}\exp\Big(-\frac{\nu_{\sigma}}{\sigma_{gk}^{2}a_{\sigma_{gk}}}\Big)
    (σgk2)(n2Ng()+νσ2+1)exp[1σgk2(i=1Nzigϵigkϵigk2+νσaσgk)],\displaystyle\propto(\sigma_{gk}^{2})^{-(\frac{n}{2}N_{g}^{(\ell)}+\frac{\nu_{\sigma}}{2}+1)}\exp\Big[-\frac{1}{\sigma_{gk}^{2}}\Big(\frac{\sum_{i=1}^{N}z_{ig}\boldsymbol{\epsilon}_{igk}^{\prime}\boldsymbol{\epsilon}_{igk}}{2}+\frac{\nu_{\sigma}}{a_{\sigma_{gk}}}\Big)\Big],

    which is IG(nNg()+νσ2,i=1Nzigϵigkϵigk2+νσaσgk)IG\Big(\frac{nN_{g}^{(\ell)}+\nu_{\sigma}}{2},\frac{\sum_{i=1}^{N}z_{ig}\boldsymbol{\epsilon}_{igk}^{\prime}\boldsymbol{\epsilon}_{igk}}{2}+\frac{\nu_{\sigma}}{a_{\sigma_{gk}}}\Big). The sampling scheme proceeds by first sampling (aσgk(+1)σgk2())(a_{\sigma_{gk}}^{(\ell+1)}\mid\sigma_{gk}^{2(\ell)}) and then (σgk2(+1)ϵigk(+1),aσgk(+1))(\sigma_{gk}^{2(\ell+1)}\mid\boldsymbol{\epsilon}_{igk}^{(\ell+1)},a_{\sigma_{gk}}^{(\ell+1)}).

  3. 3.

    Sampling the smoothing parameters

    The smoothing parameters τgk2\tau_{gk}^{2} are drawn by analogy to the error variances. We first draw (aτgk(+1)τgk2())IG(ντ+12,νττgk2+1Aτ2)(a_{\tau_{gk}}^{(\ell+1)}\mid\tau_{gk}^{2(\ell)})\sim IG\Big(\frac{\nu_{\tau}+1}{2},\frac{\nu_{\tau}}{\tau_{gk}^{2}}+\frac{1}{A_{\tau}^{2}}\Big). The conditional posterior distribution of the smoothing parameters is

    p(τgk2(+1)𝜷gk(+1),aτgk(+1))\displaystyle p(\tau_{gk}^{2(\ell+1)}\mid\boldsymbol{\beta}_{gk}^{(\ell+1)},a_{\tau_{gk}}^{(\ell+1)}) p(𝜷gk(+1)τgk2(+1))p(aτgk(+1)τgk2(+1))p(τgk2(+1))\displaystyle\propto p(\boldsymbol{\beta}_{gk}^{(\ell+1)}\mid\tau_{gk}^{2(\ell+1)})\cdot p(a_{\tau_{gk}}^{(\ell+1)}\mid\tau_{gk}^{2(\ell+1)})\cdot p(\tau_{gk}^{2(\ell+1)})
    (τgk2)m+ντ2exp[1τgk2(ντaτgk+𝜷gk𝜷gk2)],\displaystyle\propto(\tau_{gk}^{2})^{-\frac{m+\nu_{\tau}}{2}}\exp{\Big[-\frac{1}{\tau_{gk}^{2}}\Big(\frac{\nu_{\tau}}{a_{\tau_{gk}}}+\frac{\boldsymbol{\beta}_{gk}^{\prime}\boldsymbol{\beta}_{gk}}{2}\Big)\Big]},

    which is IG(ντ+m2,𝜷gk𝜷gk2+ντaτgk)IG\Big(\frac{\nu_{\tau}+m}{2},\frac{\boldsymbol{\beta}_{gk}^{\prime}\boldsymbol{\beta}_{gk}}{2}+\frac{\nu_{\tau}}{a_{\tau_{gk}}}\Big). The sampling scheme proceeds by first sampling (aτgk(+1)τgk2())(a_{\tau_{gk}}^{(\ell+1)}\mid\tau_{gk}^{2(\ell)}) and then (τgk2(+1)𝜷gk(+1),aτgk(+1))(\tau_{gk}^{2(\ell+1)}\mid\boldsymbol{\beta}_{gk}^{(\ell+1)},a_{\tau_{gk}}^{(\ell+1)}).

  4. 4.

    Sampling the logistic parameters

    Let 𝜹g=(𝜹gT,𝜻gT)T\boldsymbol{\delta}_{g}^{*}=(\boldsymbol{\delta}_{g}^{T},\boldsymbol{\zeta}_{g}^{T})^{T} be the aggregation of the logistic parameters and all random intercepts for the ggth component. Based on the logits of Section 3.2 and the corresponding priors described in Section 4.4, the conditional posterior distribution of (𝜹g(+1)𝑽,zig(),κζg2())(\boldsymbol{\delta}_{g}^{*(\ell+1)}\mid\boldsymbol{V}^{*},z_{ig}^{(\ell)},\kappa^{2(\ell)}_{\zeta g}) is

    p(𝜹g(+1)𝑽,zig(),κζg2())\displaystyle p(\boldsymbol{\delta}_{g}^{*(\ell+1)}\mid\boldsymbol{V}^{*},z_{ig}^{(\ell)},\kappa^{2(\ell)}_{\zeta g}) p(zig()=1𝑽,𝜹g(+1))p(𝜹g(+1)κζg2())\displaystyle\propto p(z_{ig}^{(\ell)}=1\mid\boldsymbol{V}^{*},\boldsymbol{\delta}_{g}^{*(\ell+1)})\cdot p(\boldsymbol{\delta}_{g}^{*(\ell+1)}\mid\kappa^{2(\ell)}_{\zeta g})
    =i=1N[exp(𝑽i𝜹g)h=1Gexp(𝑽i𝜹h)]zigp(𝜹g(+1)κζg2()),\displaystyle=\prod_{i=1}^{N}\Big[\frac{\exp(\boldsymbol{V}_{i}^{*\prime}\boldsymbol{\delta}_{g}^{*})}{\sum_{h=1}^{G}\exp(\boldsymbol{V}_{i}^{*\prime}\boldsymbol{\delta}_{h}^{*})}\Big]^{z_{ig}}p(\boldsymbol{\delta}_{g}^{*(\ell+1)}\mid\kappa^{2(\ell)}_{\zeta g}),

    where 𝑽=(𝑽1,,𝑽N)\boldsymbol{V}^{*}=(\boldsymbol{V}_{1}^{*},\ldots,\boldsymbol{V}_{N}^{*})^{\prime} is a N×(P+1)N\times(P+1) matrix with 𝑽i\boldsymbol{V}_{i}^{*} representing all covariates (including intercepts) for subject ii. To sample from the posterior distribution of p(𝜹g(+1)𝑽,zig(),κζg2())p(\boldsymbol{\delta}_{g}^{*(\ell+1)}\mid\boldsymbol{V}^{*},z_{ig}^{(\ell)},\kappa^{2(\ell)}_{\zeta g}), we adopt the Póyla-Gamma data augmentation strategy of Polson and others (2013) by introducing a latent variable ωig\omega_{ig} coming from the Pólya-Gamma distribution. Thus, the conditional posterior distributions of the logistic parameters are

    p(𝜹g(+1)𝑽,zig(),ωig(+1),κζg2())\displaystyle p(\boldsymbol{\delta}_{g}^{*(\ell+1)}\mid\boldsymbol{V}^{*},z_{ig}^{(\ell)},\omega_{ig}^{(\ell+1)},\kappa^{2(\ell)}_{\zeta g}) p(zig()=1𝑽,ωig(+1),𝜹g(+1))p(ωig(+1)𝑽,𝜹g())\displaystyle\propto p(z_{ig}^{(\ell)}=1\mid\boldsymbol{V}^{*},\omega_{ig}^{(\ell+1)},\boldsymbol{\delta}_{g}^{*(\ell+1)})\cdot p(\omega_{ig}^{(\ell+1)}\mid\boldsymbol{V}^{*},\boldsymbol{\delta}_{g}^{*(\ell)})
    p(𝜹g(+1)κζg2())\displaystyle\cdot p(\boldsymbol{\delta}_{g}^{*(\ell+1)}\mid\kappa^{2(\ell)}_{\zeta g})
    exp(ωigηig22)p(ωig1,0)|𝑩g|P/2exp(12𝜹g𝑩g1𝜹g),\displaystyle\propto\exp\Big(-\frac{\omega_{ig}\eta_{ig}^{2}}{2}\Big)\cdot p(\omega_{ig}\mid 1,0)|\boldsymbol{B}_{g}|^{-P/2}\exp\Big(-\frac{1}{2}\boldsymbol{\delta}_{g}^{*\prime}\boldsymbol{B}_{g}^{-1}\boldsymbol{\delta}_{g}^{*}\Big),

    where ηig=𝑽i𝜹gCig\eta_{ig}=\boldsymbol{V}_{i}^{*\prime}\boldsymbol{\delta}_{g}^{*}-C_{ig} and Cig=loghjexp(𝑽i𝜹h)C_{ig}=\log\sum_{h\neq j}\exp(\boldsymbol{V}_{i}^{*\prime}\boldsymbol{\delta}_{h}^{*}), p(ωig1,0)p(\omega_{ig}\mid 1,0) is the Pólya-gamma distribution PG(b,c)PG(b,c) with b=1b=1 and c=0c=0, 𝑩g\boldsymbol{B}_{g} is the prior covariance matrix of Section 4.4 and 𝑩g=diag(σδg2𝟏P+1,κζg2𝟏N)\boldsymbol{B}_{g}={\rm diag}(\sigma_{\delta g}^{2}\boldsymbol{1}_{P+1},\kappa^{2}_{\zeta g}\boldsymbol{1}_{N}). By assuming the conjugate prior N(𝟎,𝑩g)N(\boldsymbol{0},\boldsymbol{B}_{g}) on 𝜹g\boldsymbol{\delta}_{g}^{*}, the posterior distribution of the Pólya-gamma latent variable is

    (ωig(+1)𝑽,𝜹g())PG(1,ηig).(\omega_{ig}^{(\ell+1)}\mid\boldsymbol{V}^{*},\boldsymbol{\delta}_{g}^{*(\ell)})\sim PG(1,\eta_{ig}).

    Thus, the conditional distributions of the logistic parameters (including the random intercepts) are

    (𝜹g(+1)𝑽,zig(),ωig(+1),κζg2())N(𝑴g,𝚺g),(\boldsymbol{\delta}_{g}^{*(\ell+1)}\mid\boldsymbol{V}^{*},z_{ig}^{(\ell)},\omega_{ig}^{(\ell+1)},\kappa^{2(\ell)}_{\zeta g})\sim N(\boldsymbol{M}_{g},\boldsymbol{\Sigma}_{g}),

    where 𝚺g=(𝑽𝛀g𝑽+𝑩g1)1\boldsymbol{\Sigma}_{g}=(\boldsymbol{V}^{*\prime}\boldsymbol{\Omega}_{g}\boldsymbol{V}^{*}+\boldsymbol{B}_{g}^{-1})^{-1}, 𝑴g=𝚺g[𝑽(𝛀g𝑪g+𝝃g)]\boldsymbol{M}_{g}=\boldsymbol{\Sigma}_{g}\big[\boldsymbol{V}^{*\prime}(\boldsymbol{\Omega}_{g}\boldsymbol{C}_{g}+\boldsymbol{\xi}_{g})\big], 𝛀g=diag(ω1g,,ωNg)\boldsymbol{\Omega}_{g}={\rm diag}(\omega_{1g},\cdots,\omega_{Ng}), 𝑪g=(C1g,,CNg)\boldsymbol{C}_{g}=(C_{1g},\cdots,C_{Ng})^{\prime}, and 𝝃g=(ξ1g,,ξNg)\boldsymbol{\xi}_{g}=(\xi_{1g},\cdots,\xi_{Ng})^{\prime}, with ξig=zig12\xi_{ig}=z_{ig}-\frac{1}{2}. Thus, 𝜹g(+1)\boldsymbol{\delta}_{g}^{*(\ell+1)} is drawn by first sampling (ωig(+1)𝑽,𝜹g())(\omega_{ig}^{(\ell+1)}\mid\boldsymbol{V}^{*},\boldsymbol{\delta}_{g}^{*(\ell)}) and then (𝜹g(+1)𝑽,zig(),ωig(+1),κζg2())(\boldsymbol{\delta}_{g}^{*(\ell+1)}\mid\boldsymbol{V}^{*},z_{ig}^{(\ell)},\omega_{ig}^{(\ell+1)},\kappa^{2(\ell)}_{\zeta g}).

  5. 5.

    Sampling the variances of the random intercepts

    By analogy with sampling the error variances and sthe moothing parameters, we first draw (aκg(+1)κζg2())IG(νκ+12,νκκζg2+1Aκ2)(a_{\kappa_{g}}^{(\ell+1)}\mid\kappa^{2(\ell)}_{\zeta g})\sim IG\Big(\frac{\nu_{\kappa}+1}{2},\frac{\nu_{\kappa}}{\kappa^{2}_{\zeta g}}+\frac{1}{A_{\kappa}^{2}}\Big). The conditional posterior distributions of the variances of the random intercepts are

    p(κζg2(+1)𝜻g(+1),aκg(+1))\displaystyle p(\kappa^{2(\ell+1)}_{\zeta g}\mid\boldsymbol{\zeta}_{g}^{(\ell+1)},a_{\kappa_{g}}^{(\ell+1)}) p(𝜻g(+1)κζg2(+1))p(aκg(+1)κζg2(+1))p(κζg2(+1))\displaystyle\propto p(\boldsymbol{\zeta}_{g}^{(\ell+1)}\mid\kappa^{2(\ell+1)}_{\zeta g})\cdot p(a_{\kappa_{g}}^{(\ell+1)}\mid\kappa^{2(\ell+1)}_{\zeta g})\cdot p(\kappa^{2(\ell+1)}_{\zeta g})
    (κζg2)N+νκ2+1exp[1κζg2(νκaκg+𝜻gT𝜻g2)],\displaystyle\propto(\kappa^{2}_{\zeta g})^{-\frac{N+\nu_{\kappa}}{2}+1}\exp{\Big[-\frac{1}{\kappa^{2}_{\zeta g}}\Big(\frac{\nu_{\kappa}}{a_{\kappa_{g}}}+\frac{\boldsymbol{\zeta}_{g}^{T}\boldsymbol{\zeta}_{g}}{2}\Big)\Big]},

    which is IG(νκ+N2,𝜻gT𝜻g2+νκaκg)IG\Big(\frac{\nu_{\kappa}+N}{2},\frac{\boldsymbol{\zeta}_{g}^{T}\boldsymbol{\zeta}_{g}}{2}+\frac{\nu_{\kappa}}{a_{\kappa_{g}}}\Big). The sampling scheme proceeds by first sampling (aκg(+1)κζg2())(a_{\kappa_{g}}^{(\ell+1)}\mid\kappa^{2(\ell)}_{\zeta g}) and then (κζg2(+1)𝜻g(+1),aκg(+1))(\kappa^{2(\ell+1)}_{\zeta g}\mid\boldsymbol{\zeta}_{g}^{(\ell+1)},a_{\kappa_{g}}^{(\ell+1)}).

  6. 6.

    Computing the mixing weights

    After drawing the 𝜹g\boldsymbol{\delta}_{g}^{*}, the mixing weights πig(+1)\pi_{ig}^{(\ell+1)} for each component, given the design matrix ViV_{i}^{*}, are computed by

    p(πig(+1)Vi,𝜹g(+1))=exp(𝑽iT𝜹g)h=1Gexp(𝑽iT𝜹h).p(\pi_{ig}^{(\ell+1)}\mid V_{i}^{*},\boldsymbol{\delta}_{g}^{*(\ell+1)})=\frac{\exp(\boldsymbol{V}_{i}^{*T}\boldsymbol{\delta}_{g}^{*})}{\sum_{h=1}^{G}\exp(\boldsymbol{V}_{i}^{*T}\boldsymbol{\delta}_{h}^{*})}.
  7. 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 zigz_{ig}. As in Section 3.3, the conditional posterior of these indicators is

    p(zig(+1)=1𝒚,𝑺,𝚯(+1),πig(+1))=πigk=1Kfgk(𝒚ik𝚯gk)h=1Gπihk=1Kfhk(𝒚ik𝚯hk),p(z_{ig}^{(\ell+1)}=1\mid\boldsymbol{y},\boldsymbol{S},\boldsymbol{\Theta}^{(\ell+1)},\pi_{ig}^{(\ell+1)})=\frac{\pi_{ig}\prod_{k=1}^{K}f_{gk}(\boldsymbol{y}_{ik}\mid\boldsymbol{\Theta}_{gk})}{\sum_{h=1}^{G}\pi_{ih}\prod_{k=1}^{K}f_{hk}(\boldsymbol{y}_{ik}\mid\boldsymbol{\Theta}_{hk})},

    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 (N=150,250N=150,250) and the length of each time series (n=50,70n=50,70), 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 n=50n=50 and N=150N=150 in Table 3 corresponds to Figure 3 in the main paper. The performance of the logistic parameters (RMSEs) with different values of nn and NN are given in Table 1 of the paper.

The Mean(SD) of the ARSE, A-bias and V-bias for each component of the N=150N=150 four-component mixture of bivariate time series of length n=50n=50 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 nn and numbers of time series NN, 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 nn and NN, 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 δ0\delta_{0} and the slope of the first covariate δ1\delta_{1}. 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.

Table 3: Mean (standard deviation) of the averaged root square error (ARSE), the averaged bias (A-bias) and the variance of bias (V-bias) of estimated trajectories for each component from 100100 replicates of NN two-component trivariate time series of length nn. The proposed method was compared to R package gbmt and TRAJ procedure in SAS. C1 and C2 denote first and second components. Means were calculated by averaging over estimates of 100100 replicates. Standard deviations are Monte Carlo standard deviations from estimates of 100100 replicates. Each value was reported ×102\times 10^{2}.
n N Method ARSE C1 A-bias C1 V-bias C1 ARSE C2 A-bias C2 V-bias C2
50 150 Proposed
8.35
(1.26)
0.03
(1.83)
0.68
(0.22)
7.65
(1.38)
0.10
(1.76)
0.58
(0.22)
gbmt
10.67
(1.91)
0.03
(1.83)
1.15
(0.42)
9.08
(1.72)
0.10
(1.76)
0.83
(0.33)
TRAJ
11.06
(1.48)
0.03
(1.83)
1.22
(0.33)
10.59
(1.52)
0.10
(1.76)
1.12
(0.34)
70 150 Proposed
7.16
(1.04)
0.24
(1.38)
0.51
(0.16)
6.53
(1.07)
-0.11
(1.42)
0.42
(0.14)
gbmt
9.91
(1.96)
0.24
(1.38)
1.01
(0.40)
8.19
(1.65)
-0.11
(1.42)
0.68
(0.29)
TRAJ
9.34
(1.10)
0.24
(1.38)
0.87
(0.22)
8.95
(1.13)
-0.11
(1.42)
0.80
(0.20)
50 250 Proposed
6.81
(1.02)
0.07
(1.33)
0.46
(0.14)
6.22
(0.94)
0.02
(1.31)
0.38
(0.12)
gbmt
9.79
(1.91)
0.07
(1.33)
0.98
(0.40)
8.00
(1.53)
0.02
(1.31)
0.65
(0.26)
TRAJ
8.70
(1.18)
0.07
(1.33)
0.76
(0.21)
8.20
(1.03)
0.02
(1.31)
0.67
(0.17)
70 250 Proposed
5.65
(0.84)
0.08
(1.00)
0.32
(0.10)
5.27
(0.82)
-0.06
(1.42)
0.27
(0.09)
gbmt
9.15
(1.96)
0.08
(1.00)
0.87
(0.38)
7.43
(1.60)
-0.06
(1.42)
0.56
(0.26)
TRAJ
7.18
(0.94)
0.08
(1.00)
0.52
(0.14)
6.80
(0.77)
-0.06
(1.42)
0.45
(0.10)
Table 4: Mean (standard deviation) of the averaged root square error (ARSE), the averaged bias (A-bias) and the variance of bias (V-bias) of estimated trajectories for each component from 100100 replicates of 150150 four-component bivariate time series of length 5050. The proposed method was compared to R package gbmt and TRAJ procedure in SAS. C1, C2, C3 and C4 denote first, second, third and fourth component, respectively. Means were calculated by averaging over estimates of 100100 replicates. Standard deviations are Monte Carlo standard deviations from estimates of 100100 replicates. Each value was reported ×102\times 10^{2}.
n N Method ARSE C1 A-bias C1 V-bias C1 ARSE C2 A-bias C2 V-bias C2
50 150 Proposed
4.38
(1.04)
0.38
(1.59)
0.18
(0.08)
3.76
(0.87)
-0.01
(1.37)
0.13
(0.06)
gbmt
4.75
(1.04)
0.38
(1.59)
0.21
(0.09)
4.79
(1.17)
0.01
(1.65)
0.22
(0.11)
TRAJ
13.87
(15.59)
0.62
(9.91)
3.39
(9.24)
12.41
(13.42)
0.08
(9.74)
2.41
(5.37)
n N Method ARSE C3 A-bias C3 V-bias C3 ARSE C4 A-bias C4 V-bias C4
50 150 Proposed
4.69
(1.14)
-0.11
(1.83)
0.20
(0.12)
3.88
(1.15)
-0.09
(1.56)
0.14
(0.08)
gbmt
5.08
(1.12)
-0.12
(1.83)
0.24
(0.12)
4.70
(1.32)
-0.09
(1.78)
0.21
(0.12)
TRAJ
14.55
(14.82)
-1.58
(10.31)
3.24
(7.35)
14.36
(17.01)
0.12
(9.92)
3.99
(10.70)
Table 5: Mean (standard deviation) of the averaged root square error (ARSE), the averaged bias (A-bias) and the variance of bias (V-bias) of estimated trajectories for each component from 100100 replicates of 150150 four-component bivariate time series of length 7070. The proposed method was compared to R package gbmt and TRAJ procedure in SAS. C1, C2, C3 and C4 denote first, second, third and fourth component, respectively. Means were calculated by averaging over estimates of 100100 replicates. Standard deviations are Monte Carlo standard deviations from estimates of 100100 replicates. Each value was reported ×102\times 10^{2}.
n N Method ARSE C1 A-bias C1 V-bias C1 ARSE C2 A-bias C2 V-bias C2
70 150 Proposed
3.82
(0.95)
0.44
(1.30)
0.14
(0.07)
3.22
(0.85)
-0.07
(0.95)
0.10
(0.06)
gbmt
4.05
(0.97)
0.44
(1.30)
0.16
(0.08)
4.11
(1.12)
-0.08
(1.15)
0.17
(0.10)
TRAJ
13.51
(17.04)
-0.30
(9.34)
3.86
(10.73)
10.00
(10.11)
-0.25
(6.21)
1.64
(4.02)
n N Method ARSE C3 A-bias C3 V-bias C3 ARSE C4 A-bias C4 V-bias C4
70 150 Proposed
4.12
(0.90)
-0.29
(1.69)
0.15
(0.06)
3.52
(0.85)
0.24
(1.22)
0.12
(0.06)
gbmt
4.38
(1.01)
-0.29
(1.69)
0.17
(0.07)
4.13
(0.99)
0.27
(1.40)
0.16
(0.09)
TRAJ
13.03
(17.04)
0.30
(10.49)
3.86
(10.73)
11.77
(13.78)
0.39
(8.49)
2.57
(6.45)
Table 6: Root mean square errors (RMSEs) of each logistic parameter for the four-component bivariate model from 100100 replicates of 150150 four-component bivariate time series of length 7070. RMSEs of the proposed method were compared to TRAJ procedure in SAS. Parameters δ0\delta_{0}, δ1\delta_{1}, δ2\delta_{2} and δ3\delta_{3} are intercept, first, second and third logistic parameters, respectively. The fourth component was used as the reference component. The true values of logistic parameters are 5,3.5,1,0.15,-3.5,1,0.1 (first component), 4,2.5,2,0.2-4,2.5,-2,-0.2 (second component), 3,2,0.8,0.23,-2,0.8,0.2 (third component). C1, C2, C3 and C4 denote first, second, third and fourth component, respectively.
n   N Method Comparison δ0\delta_{0} δ1\delta_{1} δ2\delta_{2} δ3\delta_{3}
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
Table 7: Mean (standard deviation) of the averaged root square error (ARSE), the averaged bias (A-bias) and the variance of bias (V-bias) of estimated trajectories for each component from 100100 replicates of 250250 four-component bivariate time series of length 5050. The proposed method was compared to R package gbmt and TRAJ procedure in SAS. C1, C2, C3 and C4 denote first, second, third and fourth component, respectively. Means were calculated by averaging over estimates of 100100 replicates. Standard deviations are Monte Carlo standard deviations from estimates of 100100 replicates. Each value was reported ×102\times 10^{2}.
n N Method ARSE C1 A-bias C1 V-bias C1 ARSE C2 A-bias C2 V-bias C2
50 250 Proposed
3.42
(0.78)
0.18
(1.19)
0.11
(0.05)
2.86
(0.61)
-0.14
(0.98)
0.08
(0.04)
gbmt
3.57
(0.85)
0.18
(1.19)
0.12
(0.06)
3.68
(0.79)
-0.15
(1.20)
0.13
(0.06)
TRAJ
11.66
(15.03)
0.53
(10.63)
2.50
(6.30)
8.90
(9.38)
1.47
(7.81)
1.05
(2.16)
n N Method ARSE C3 A-bias C3 V-bias C3 ARSE C4 A-bias C4 V-bias C4
50 250 Proposed
3.93
(0.92)
-0.06
(1.48)
0.14
(0.07)
3.28
(0.76)
-0.10
(1.19)
0.10
(0.05)
gbmt
4.16
(0.95)
-0.06
(1.49)
0.16
(0.07)
3.83
(0.83)
-0.13
(1.36)
0.14
(0.06)
TRAJ
10.80
(9.92)
0.49
(5.78)
1.83
(3.70)
10.17
(12.54)
-0.17
(8.83)
1.84
(5.20)
Table 8: Root mean square errors (RMSEs) of each logistic parameter for the four-component bivariate model from 100100 replicates of 250250 four-component bivariate time series of length 5050. RMSEs of the proposed method were compared to TRAJ procedure in SAS. Parameters δ0\delta_{0}, δ1\delta_{1}, δ2\delta_{2} and δ3\delta_{3} are intercept, first, second and third logistic parameters, respectively. The fourth component was used as the reference component. The true values of logistic parameters are 5,3.5,1,0.15,-3.5,1,0.1 (first component), 4,2.5,2,0.2-4,2.5,-2,-0.2 (second component), 3,2,0.8,0.23,-2,0.8,0.2 (third component). C1, C2, C3 and C4 denote first, second, third and fourth component, respectively.
n   N Method Comparison δ0\delta_{0} δ1\delta_{1} δ2\delta_{2} δ3\delta_{3}
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
Table 9: Mean (standard deviation) of the averaged root square error (ARSE), the averaged bias (A-bias) and the variance of bias (V-bias) of estimated trajectories for each component from 100100 replicates of 250250 four-component bivariate time series of length 7070. The proposed method was compared to R package gbmt and TRAJ procedure in SAS. C1, C2, C3 and C4 denote first, second, third and fourth component, respectively. Means were calculated by averaging over estimates of 100100 replicates. Standard deviations are Monte Carlo standard deviations from estimates of 100100 replicates. Each value was reported ×102\times 10^{2}.
n N Method ARSE C1 A-bias C1 V-bias C1 ARSE C2 A-bias C2 V-bias C2
70 250 Proposed
2.94
(0.60)
-0.04
(1.06)
0.08
(0.04)
2.61
(0.57)
-0.01
(0.87)
0.06
(0.03)
gbmt
3.10
(0.63)
-0.04
(1.06)
0.09
(0.04)
3.18
(0.70)
0.01
(1.05)
0.10
(0.05)
TRAJ
13.52
(17.70)
-1.58
(11.09)
3.71
(8.80)
11.51
(14.85)
-0.19
(9.98)
2.54
(7.10)
n N Method ARSE C3 A-bias C3 V-bias C3 ARSE C4 A-bias C4 V-bias C4
70 250 Proposed
3.30
(0.76)
-0.02
(1.21)
0.10
(0.05)
2.85
(0.73)
-0.07
(0.97)
0.08
(0.04)
gbmt
3.51
(0.79)
-0.01
(1.21)
0.12
(0.06)
3.26
(0.80)
-0.09
(1.06)
0.10
(0.05)
TRAJ
13.07
(15.21)
1.48
(10.52)
2.90
(7.11)
10.68
(12.93)
0.65
(8.11)
2.16
(5.66)
Table 10: Root mean square errors (RMSEs) of each logistic parameter for the four-component bivariate model from 100100 replicates of 250250 four-component bivariate time series of length 7070. RMSEs of the proposed method were compared to TRAJ procedure in SAS. Parameters δ0\delta_{0}, δ1\delta_{1}, δ2\delta_{2} and δ3\delta_{3} are intercept, first, second and third logistic parameters, respectively. The fourth component was used as the reference component. The true values of logistic parameters are 5,3.5,1,0.15,-3.5,1,0.1 (first component), 4,2.5,2,0.2-4,2.5,-2,-0.2 (second component), 3,2,0.8,0.23,-2,0.8,0.2 (third component). C1, C2, C3 and C4 denote first, second, third and fourth component, respectively.
n   N Method Comparison δ0\delta_{0} δ1\delta_{1} δ2\delta_{2} δ3\delta_{3}
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.

Refer to caption
Figure 7: Estimated trajectories of the three-component model with four selected channels. I: Interact S: Still-face R: Recovery. Red curves are posterior means and the two green dashed curves are 95% pointwise credible intervals.
Refer to caption
Figure 8: Logistic coefficient estimates and 95% credible intervals corresponding to each covariate of the three-component model.
Refer to caption
Figure 9: Estimated trajectories of the first component for the three-component model with all twelve channels. I: Interact S: Still-face R: Recovery. Red curves are posterior mean and two green dashed curves are 95% pointwise credible intervals.
Refer to caption
Figure 10: Estimated trajectories of the second component for the three-component model with all twelve channels. I: Interact S: Still-face R: Recovery. Red curves are posterior mean and two green dashed curves are 95% pointwise credible intervals.
Refer to caption
Figure 11: Estimated trajectories of the third component for the three-component model with all twelve channels. I: Interact S: Still-face R: Recovery. Red curves are posterior mean and two green dashed curves are 95% pointwise credible intervals.
Refer to caption
Figure 12: Logistic coefficient estimates and 95% credible intervals for each covariate of the three-component model for all twelve channels.