Spectral Decompositions of Multiple Time Series: A Bayesian Non-parametric Approach

We consider spectral decompositions of multiple time series that arise in studies where the interest lies in assessing the influence of two or more factors. We write the spectral density of each time series as a sum of the spectral densities associated to the different levels of the factors. We then use Whittle’s approximation to the likelihood function and follow a Bayesian non-parametric approach to obtain posterior inference on the spectral densities based on Bernstein–Dirichlet prior distributions. The prior is strategically important as it carries identifiability conditions for the models and allows us to quantify our degree of confidence in such conditions. A Markov chain Monte Carlo (MCMC) algorithm for posterior inference within this class of frequency-domain models is presented. We illustrate the approach by analyzing simulated and real data via spectral one-way and two-way models. In particular, we present an analysis of functional magnetic resonance imaging (fMRI) brain responses measured in individuals who participated in a designed experiment to study pain perception in humans.


Introduction
Time series data from several subjects that can be classified into groups according to a set of features are oftentimes recorded in clinical and non-clinical studies. For instance, a set of brain signals recorded from several individuals may be grouped by the type of stimulus each individual received in a given experimental setting. In such cases, one of the main goals of the time series analysis is to determine if there are differences in the spectral characteristics of the signals across the groups.
More specifically, suppose that a collection of time series {y i 1 ,i 2 ,h (t)} are recorded during a particular experimental setting in which i 1 indexes the level of some factor, say A, i 2 indexes the level of some other factor, say B, and h indexes the time series within given levels of the A and B factors, where i 1 = 1 : N 1 , i 2 = 1 : N 2 , h = 1 : H i 1 ,i 2 , and t = 1 : T . Such data may arise in designed experiments where factor A is a given treatment or experimental conditione.g., the type of stimulus in a neuroscience experiment or the disease level-, factor B is another treatment or experimental condition, and h indexes the individuals who were assigned to levels i 1 and i 2 of the A and B factors, respectively. We are interested in fitting models that allow us to characterize the spectral features of the time series in terms of effects associated to the levels of the factors and, possibly also, in terms of effects associated with the interaction of such factors.
Requests for reprints should be sent to Christian Macaro, SAS Institute, Cary, NC, USA. E-mail: christianmacaro@gmail.com 106 PSYCHOMETRIKA Assume for instance that each time series can be decomposed as where the unobserved processes β (1) i 1 (t) and β (2) i 2 (t) are assumed to be uncorrelated, i.e., Cov(β (1) i 1 (t), β (2) i 2 (t)) = 0 for all i 1 , i 2 and all t = 1 : T . Furthermore, for a given k with k = 1, 2 assume that Cov(β (k) i (t), β (k) j (t)) = 0 when i = j for all t. The ε i 1 ,i 2 ,h (t)s are idiosyncratic-i.e., individual specific-error series assumed to be independent of the other unobserved processes and also mutually independent. This implies that the spectral density of y i 1 ,i 2 ,h (t), which is the Fourier transform of the theoretical autocovariance function of the y i 1 ,i 2 ,h (t) process and is denoted as f * y i 1 ,i 2 ,h (λ), can be written as where f * ,(1) i 1 (λ) and f * , (2) i 2 (λ) are the spectral densities of the unobserved processes associated with levels i 1 and i 2 of factors A and B, respectively; and f * ε i 1 ,i 2 ,h (λ) is the spectral density of the idiosyncratic error component associated to individual h within such levels.
There is a relatively rich literature on Bayesian approaches for estimation of functions that can be used in the context of analyzing multiple signals. DiMatteo, Genovese, and Kass (2001) describe a Bayesian method for fitting curves to data drawn from a distribution in the exponential family. This approach assumes that the curves can be well approximated by splines with an unknown number of knots and unknown knot locations that are then inferred via reversible jump Markov chain Monte Carlo. The method is used to analyze individual (not multiple) time series data obtained from functional magnetic resonance imaging (fMRI) experiments. In such context the method of DiMatteo et al. (2001) is a time-domain approach that assumes that a given time series y(t) can be modeled as y(t) = f (t) + (t), with f (t) = k+2 j =1 θ j b j (t), where b j (t) is the j th function of a cubic B-spline. In contrast, our proposed frequency-domain method aims to infer the spectral characteristics of multiple, not just a single, time series. A possible way of analyzing multiple times series in the spectral domain would consist on extending the method of DiMatteo et al. (2001) for fitting curves to the periodogram ordinates of the multiple time series recorded at various levels of the factors. Such extension would involve developing and implementing models that can handle multiple series given that the approach of DiMatteo et al. (2001) can only be directly applied to a single data set, e.g., the periodogram ordinates of an individual time series. Furthermore, the method of DiMatteo et al. (2001) applies to independent data (y 1 , x 1 ), . . . , (y n , x n ) that satisfy a model of the form y i |x 1 , . . . , x n ∼ p(y i |f (x i ), σ ). However, the periodogram ordinates are only asymptotically independent. Therefore, it would not be advisable to directly apply the free-knots splines method in order to estimate spectral densities. On the other hand, the method proposed here is based on the approaches of Choudhuri, Ghosal, and Roy (2004) and Macaro (2010), which provide consistent Bayesian estimates even if the periodogram ordinates are only asymptotically independent (see Choudhuri et al., 2004, pp. 1056-1057, and Macaro, 2010. Regarding factorial temporal data, several authors have considered various time-domain and frequency-domain approaches. Some key references include, among others, Shumway (1970), Brillinger (1973, 1980), and Stoffer (1999. Shumway and Stoffer (2006) also summarize and illustrate several aspects of some of such approaches. As mentioned above, we follow Choudhuri et al. (2004) and Macaro (2010) to obtain Bayesian non-parametric posterior inference of the spectral representation of multiple time series, including the particular case of factorial spectral decompositions, by using Bernstein-Dirichlet prior distributions (Petrone, 1999a(Petrone, , 1999b on the spectral densities in (2). More specifically, Choudhuri et al. (2004) described a Bayesian approach to estimating the spectral density of a single stationary time series by imposing a nonparametric prior on such density through Bernstein polynomials. Then, Macaro (2010) proposed a mixture generalization of such approach in which each component in the spectral decomposition is identified using informative prior distributions. We extend the methods and algorithms of Macaro (2010) to provide a Bayesian non-parametric spectral analysis of multiple time series recorded during designed experiments that may involve several factors, various levels within each factor and several individuals. Bernstein-Dirichlet prior distributions have been successfully applied to analyze other types of data that arise in psychometric applications. For example, Karabatsos and Walker (2009) use a bivariate Bernstein-Dirichlet prior in the context of modeling test equating. Alternative Bayesian approaches to spectral density estimation of a single time series, including stationary and long-range dependence time series, as well as nonstationary time series with slowly varying dynamics or piecewise stationary time series, can be found in Carter and Kohn (1997), Gangopadhyay, Mallick, andDenison (1998), Liseo, Marinucci, andPetrella (2001), and Rosen, Stoffer, and Wood (2009), among others. A Bayesian approach for estimating the spectral density of multivariate stationary time series is presented in Rosen and Stoffer (2007).
The article is organized as follows. The details of the modeling approach, including some examples, are provided in Section 2. Section 3 summarizes the Markov chain Monte Carlo algorithm 1 for posterior inference. In Section 4 we present the results of several simulation studies and discuss aspects of identification through the prior distributions. In Section 5 we analyze multiple time series of fMRI brain responses measured in individuals who participated in an experiment designed to study pain perception in humans. Finally, Section 6 presents the conclusions.

General Model Formulation
Let {y i 1 ,...,i D ,h (t)} be a set of time series for i d = 1 : N d , h = 1 : H i 1 ,...,i D and t = 1 : T . Assume that each time series y i 1 ,...,i D ,h (t) can be decomposed as a sum of D unobservable components plus an idiosyncratic error term. That is, where β (j ) i j (t) and β (k) i k (t) are assumed to be independent for all j = k and all t, and the ε i 1 ,...,i D ,h (t) are assumed to be independent of the β (d) i j (t) processes for all d and also mutually independent. Furthermore, it is assumed that for a given d, β (d) i j (t) and β (d) i k (t) are independent for all i j = i k and all t, and that ε i 1 ,...,i D ,h (t 0 ) and ε i 1 ,...,i D ,h (t 1 ) are independent for all t 0 = t 1 . This implies that the spectral density of y i 1 ,...,i D ,h (t), denoted as f * y i 1 ,...,i D ,h (λ), can be written as ...,i D ,h (λ) are, respectively, the spectral densities of the unobserved factors and the idiosyncratic error components. The spectral density is the Fourier transform of the theoretical autocovariance function. Under some regularity conditions it is a real and continuous function over λ ∈ (−π, π]. A further assumption requires the spectral densities to be bounded and bounded away from zero, ruling out long memory and band limited processes.

Baseline Plus Single Factor Model
In this example we consider a one-way model represented as a baseline process plus one factor with two levels. Specifically, let d = 1 : 2, i 1 = 1, i 2 = 1 : 2, h = 1 : 2, and assume the following structure on y 1,i 2 ,h (t): One factor, two levels: β 1,2 = −0.9, 1) i 2 = 1, Therefore, the baseline process β (1) 1 (t) is an autoregressive process of order one, or AR(1), with coefficient 0.9, while the factor has two levels, the first level corresponds to an autoregressive process of order two, or AR(2), with two reciprocal characteristic roots each with modulus 0.949 and frequency 2.006 (period 3.132), and the second level is an AR(2) with two reciprocal characteristic roots each with modulus 0.894 and frequency 2.566 (period 2.449). The spectral representation is with f * ,(1) 1 Therefore, the decomposition in (8) is such that f * ,(1) 1 (λ) captures constant and persistent effects, while the f (λ) spectra capture quasiperiodic dynamics that shift across the levels, as shown in Figure 1.

Interaction Effects
Oftentimes studies are characterized by the presence of one or more interaction terms. For example, a two-way time-domain model with interactions can be written as where γ (1,2) i 1 ,i 2 (t) are time series processes that represent possible interaction effects between factors 1 and 2 at the i 1 and i 2 levels. In general, if we have D factors, we can extend the model 110 PSYCHOMETRIKA in (3) to allow for second order interactions as follows: The Bayesian non-parametric approach described in Section 3 is illustrated with one-way and two-way models with no interactions in Sections 4 and 5. However, the methodology can be applied to models that include interaction effects by adding such terms in Whittle's likelihood approximation and by directly modeling the spectra of the interaction processes using the Bernstein-Dirichlet priors discussed in Section 2.4. Note that higher order interaction processes (e.g., third or higher order) can be added to (13) and modeled similarly.
As it will be shown in Section 4 with simulated data, when the number of factors increases, more restrictions need to be added to guarantee the identifiability of the different processes in the spectral decomposition. Therefore, instead of adding interaction effects and directly modeling the spectral densities of such processes, we propose simple post-processing calculations that can be used to explore if such interaction processes are present. We summarize such calculations in the case of a two-way model. Assume that y i 1 ,i 2 ,h (t) is represented as the two-way model process in (12). Such model can be written as If we were to analyze this scenario without implicitly considering the interaction terms, such terms would appear in the idiosyncratic factors ε i 1 ,i 2 ,h (t). Therefore, we could obtain estimates of the spectral densities of the interaction terms as follows:

Evaluate the corresponding individual residual. For each λ and each
3. Evaluate the interaction term across all the individuals within the same group. For each λ and each (i 1 , i 2 ) compute an estimate of the spectrum of the interaction process γ (1,2) By inspecting the posterior distribution of f * γ i 1 ,i 2 (λ) for each combination of (i 1 , i 2 ), it can be determined if one or more interaction terms should be included in the analysis.

Spectral Representation
Following a similar approach to that in Macaro (2010), we use a discrete version of Whittle's approximation of the likelihood function (Whittle, 1957(Whittle, , 1962 to estimate the factors. That is, the likelihood is approximated as where I y i 1 ,...,i D ,h (λ j ) are the periodogram ordinates evaluated at the Fourier frequencies, These summarize the information obtained from the data, while the f * ,d β i d (λ)s are spectral ordinates to be estimated.
We now combine Whittle's approximation to the likelihood in (14) with prior distributions on each f * ,d β i d (λ) to obtain posterior inference in the spectral domain. As discussed in Macaro (2010), prior elicitation is difficult since it involves the approximation of continuous spectral densities over the set of Fourier frequencies. Choudhuri et al. (2004) propose the use of Bernstein-Dirichlet prior distributions (Petrone, 1999a(Petrone, , 1999b, while Macaro (2010) presents a mixture generalization of their work. Specifically, the spectrum of an observable time series is modeled as a weighted sum of several unobserved spectral densities in Macaro (2010). The resulting procedure is indeed more flexible, although the real novelty of the approach is the possibility of studying unobserved components from a non-parametric viewpoint. Here we extend Macaro (2010) to consider factorial designs with multiple time series. In other words, the models and methods described in this section lead to a non-parametric spectral representation of the unobserved components underlying multiple time series recorded in factorial experimental settings. Below we describe the prior structure and how posterior inference can be achieved under such prior structure. We also discuss some issues related to prior choice and summarize the steps of a Markov chain Monte Carlo (MCMC) algorithm for posterior inference.

The Bernstein-Dirichlet Prior Distribution
The Bernstein polynomial prior developed by Petrone (1999aPetrone ( , 1999b was used as a nonparametric prior to estimate densities on the [0, 1] interval, and was then used by Choudhuri et al. (2004) for Bayesian estimation of spectral densities. This non-parametric prior hinges on the uniform convergence of being the probability function associated to q(λ). In particular, the Bernstein-Dirichlet prior induces the weights w 1 , . . . , w K of the mixture through a Dirichlet process, i.e., with where θ 1 , . . . , θ K are the shape parameters, M > 0 is the concentration parameter, and K determines how flexible is the prior, with larger values of K leading to more flexible distributions. We now represent each of the spectral densities, f * ,(d) (4), through a Bernstein kernel. In order to implement Bernstein-Dirichlet priors in the spectral domain, such densities must be normalized to the interval [0, 1]. Therefore, we can define a pseudo-spectral density function, q y i 1 ,...,i D ,h (λ), and a normalization parameter, τ y i 1 ,...,i D ,h , such that Then, the normalization parameters for the spectral representation of the unobserved factors β (d) i d (t) and the idiosyncratic errors ε i 1 ,...,i D ,h (t) can be derived as follows: and τ ε i 1 ,...,i D ,h are proportional to the variances of the factors, inverse-gamma distributions can be used as priors. That is, The pseudo-spectral densities q (d) β i d (λ) and q ε i 1 ,...,i D ,h (λ) will be discretized over the set of Fourier frequencies and estimated using Bernstein-Dirichlet priors.
Note that infinitely many choices of β (d) i d and ε i 1 ,...,i D (t) would lead to the same y i 1 ,...,i D ,h (t). The same is true in the spectral domain. Therefore, identifiability conditions need to be imposed. One way of doing so is by adding ANOVA-type restrictions (see Section 4.2). Alternatively, following Macaro (2010), identifiability can be achieved through proper specification of informative Bernstein-Dirichlet prior as follows. For each q (d) β i d (λ) we have the representation in (15) and (16) (Choudhuri et al., 2004), which is equivalent to saying that the prior for v i d ,d k d ,l for l = 1 : L is flat (see Section 3 for a detailed description of such parameters). Theoretically, we could also set a prior on K d i d as proposed by Choudhuri et al. (2004), however, we fix these parameters in order to improve the speed and the stability of the MCMC algorithm (see Section 3 for further discussion). This will be illustrated in the analyses of simulated and real data sets in Sections 4 and 5. One of the main reasons for choosing this approach is that in many practical scenarios we have information about the unobserved components in the decomposition of the series that we may want to incorporate into the model through the prior distribution. For instance, electroencephalographic signals typically display activity in four main frequency bands (see, e.g., Prado, 2010), which induces a natural way of decomposing each signal into four unobserved components, one per frequency band.
Finally, it is important to notice the difference between K d i d and M d i d . The parameter K d i d is similar to the bandwidth parameter used when smoothing the periodogram: a smaller value of K d i d leads to a higher degree of smoothing. On the other hand, M d i d indicates the degree of trust that we have in our prior distribution.

Posterior Inference
The posterior associated with the likelihood function (14) and with the priors described above is not available in closed form. Nevertheless, samples from this distribution can be obtained with a Metropolis-Hastings Markov chain Monte Carlo (MCMC) algorithm. The original construction of the Dirichlet process is not suitable for MCMC schemes. Sethuraman (1994) proposed an alternative construction which has been implemented by Gelfand and Kottas (2002) for a more flexible algorithm. Our sampling procedure is a generalization of the algorithm in Macaro (2010) which, in turn, is an adaptation of the work of Choudhuri et al. (2004) with and with where the truncation level of the Dirichlet process is L = max(20, T 1/3 ) (Choudhuri et al., 2004).

Prior Choice
The prior probabilities can be chosen by performing the following steps: 1. Choose the number and types of factors and idiosyncratic components. This will depend on the data structure and the particular decomposition of interest (e.g., one-way vs. twoway factor structures). For example, in the data analysis presented in Section 5, for each time series we use a model with two factors, where each factor has two levels, and one idiosyncratic component which tries to capture the individual-specific features that are not described by any of the two factors. 2. Determine the a priori spectral properties that characterize each factor and transform this information into kernel parameters θ i  Macaro, 2010). 5. Determine the prior distributions for the normalization parameters. These parameters are proportional to the variances, therefore inverse gammas seem to be appropriate:

MCMC Algorithm
The posterior distribution associated with the likelihood function (14) and with the prior distributions described above is not available in closed form. The following Metropolis-Hastings MCMC algorithm can be used to obtain samples from the posterior distribution.  1(a)ii. iii. Update τ for the spectral density f * ε i 1 ,...,i D ,h (λ) as described in 1(a)iii.

For each factor indexed by
The above algorithm was implemented in R (R Development Core Team, 2007) using the MCMC package written by Martin and Quinn (2005). 2 The algorithm is run for I iterations with I as large as needed to obtain MCMC convergence. This algorithm is an extension of the MCMC scheme of Macaro (2010) that allows us to consider factorial time series data. From the computational point of view this is rather complex; and, so, the computation time required to do the analysis increases with the number of factors, the number of levels within each factor, and the number of time series within each combination of factors. The proposed candidate values in Steps 1(a)i-ii and 2(a)i-ii are sampled from uniform distributions and those in Steps 1(a)iii and 2(a)iii are sampled from inverse-Gamma distributions whose moments are functions of the old parameter values (see Macaro, 2010 for further details). In addition, the proposed values are accepted or rejected according to Metropolis-Hastings schemes.

Baseline Plus Single Factor Model
A data set with a total of four time series of length T = 500 was simulated from the oneway model described in Section 2.2.1. The priors are chosen to be Beta kernels. Specifically, we chose a low frequency band-pass kernel for the baseline, q β (1) Beta(1, 20), and an approximately periodic kernel for the two levels of the remaining factor q β (2) 1 (λ) ∼ Beta(50, 20) and q β (2) 2 (λ) ∼ Beta(50, 20). Finally, q ε i 1 ,i 2 ,h (λ) ∼ Beta(1, 1) implies a white-noise assumption for the error term. The parameters controlling the flexibility of the representation are set to K 1 i 1 = 40, K 2 i 2 = 40 and K 3 i 1 ,i 2 ,h = 1. This prior choice empowers the belief that the main factors must not capture white-noise effects; and, so, their spectra are not expected to be flat a priori. In addition, the parameters which control for the variances of the Dirichlet distributions are set to M d i d = 1 and M · = 1. 116 PSYCHOMETRIKA Figure 3 shows the prior and posterior distributions (gray and black areas, respectively), as well as estimators based on the smoothed periodograms for the spectral densities of the observed time series and the unobserved processes β (1)

(t), and β
(2) 2 (t). Note that, in spite of the fact that the priors on the spectral densities of β (2) 1 (t) and β (2) 2 (t) had modes away from the correct periods, the estimated posterior spectral densities adequately capture the frequencies around 2.0 and 2.6.

Two-Way Models
We analyze time series data simulated from the two-way model described in Section 2.2.2 with d = 2, i 1 = 1 : 2, i 2 = 1 : 2, h = 1 : 2, and T = 500. We consider two alternative ways of selecting the prior distributions in this example. First we assume that the spectral density of the first level of the first factor, β (1) 1 (t), as well as the spectral density of the ε ·,·,· (t) processes are constant over all the frequencies. This is consistent with the assumption that these processes are white-noise processes. In addition, we assume weak and flat priors on the spectral densities of the remaining time series processes. Specifically, we have q β (1) Beta(1.3, 1.3). Notice that we purposely chose these kernels to be nearly flat to contrast the boundary bias (see Zhang & Karunamuni, 2010) which seems to affect weak and flat priors. The parameters controlling the flexibility of the representation are set again to K 1 i 1 = 40, K 2 i 2 = 40 and K 3 i 1 ,i 2 ,h = 1. The parameters that control the variances of the Dirichlet distributions are set to M d i d = 1 and M · = 1. By fixing the spectral densities of one of the levels of one of the factors and the spectral densities of the error term processes, identification of the remaining components is achieved, as shown in Figures 4 and 5.
The second scenario does not fix the spectra of any of the factor processes. It is assumed that the error processes have white-noise spectra a priori, and slightly more informative priors on the factor processes are considered. In particular we assume band-pass filter types of priors that emphasize smaller frequencies for β The graphs in Figures 6 and 7 show that the implementation of a model with these band-pass filter priors produces results similar to those obtained under the white-noise assumption on β (1) 1 (t) considered above and adequately captures the data structure.
The structure above implies that the spectra of the series y 1,1,h (t) and y 1,2,h (t) will have a peak at the frequency ω 1 = 0.698, in addition to the peak at zero related to the AR(1) components; while those of the series y 2,1,h (t) and y 2,2,h (t) will have an additional peak at the frequency ω 2 = 2.094. We proceed to analyze these data with the Bayesian spectral non-parametric approach described in the previous sections. In particular, we assume the following underlying structure on the observed data: Furthermore, we assume that, a priori, the spectra of β (1) i 1 (t) for i 1 = 1 : 2 have a single peak around the frequency ω 1 = 0.698, the spectra of β (2) i 2 (t) for i 2 = 1 : 2 have only a peak at zero, and the spectra of ε i 1 ,i 2 ,h (t) are flat. Figures 8 and 9 show the prior structure (gray areas). Note that this prior is closely describing the structure underlying the processes y 1,1,h (t) and y 1,2,h (t), but it misspecifies the structure of the processes underlying y 2,1,h (t) and y 2,2,h (t), completely missing the second peak at ω 2 = 2.094.
Note that the error components, assumed to have flat spectra a priori under a white-noise structure, capture, a posteriori, whatever is left unexplained by the factor structure. Therefore, if an informative prior used on the spectra of a given factor misses certain frequency components present in the data, such components will be captured by the posterior distributions of the spectra of the idiosyncratic components, if relatively noninformative priors were given to these components. This is confirmed by the results shown in Figures 8 and 9. The prior distribution for β (1) 2 (t) does not include one of the frequency components in the true α (1) 2 (t) and the posterior distribution of β (1) 2 (t) does not capture the peak at ω 2 = 2.094. Note, however, that this peak clearly appears in the estimated spectra of the six idiosyncratic error terms ε 2,1,h (t) and ε 2,2,h (t) for h = 1 : 3, indicating that such structure is missing from the factorial decomposition of the process.
The analysis above that assumes informative priors on some of the unobserved components is performed in order to illustrate a couple of features about the spectral decomposition. First, the use of informative priors allow us to choose a particular decomposition of the series where some of the components may have a specific scientifically interpretable meaning a priori. For example, in this simulation study, we use a strong informative prior on the spectrum of β (1) 2 (t) that identifies this time series process as one with activity in a particular frequency band. Alternatively, we could have used a more standard time-domain two-way representation of the data by assuming that the spectrum of one of the levels of one of the two factors, say the spectrum of β (1) 1 (t), is flat (consistent with a white-noise prior assumption on this process). Such representation would also imply strong assumptions on the components that would not lead to the true unobserved representation in (24), (25), and (26), but that would allow us to adequately capture the structure of the spectra of the observed time series a posteriori. Researchers can therefore explore several spectral decompositions of the data by making different assumptions on the unobserved components, as long as such assumptions guarantee identifiability. The second model feature that we want to emphasize is that, regardless of the identifiability conditions used on the spectral characterization of the factors β (d) i d (t), the model will be able to adequately describe the structure of the data a posteriori if the priors on the spectra of ε i 1 ,i 2 ,h (t) are assumed to be flat and diffuse. As seen in the simulation study above, none of the priors on the spectra of β 125 and ε i 1 ,i 2 ,h (t) had peaks on frequencies above 1.5, however, the estimated posterior spectra of ε 2,1,h (t), ε 2,2,h (t), and, therefore, the estimated posterior spectra of y 2,1,h (t) and y 2,2,h (t), show a peak at the ω 2 = 2.094 frequency that does not appear in any of the spectra of the y i 1 ,i 2 ,h (t) series.

Functional Magnetic Resonance Imaging Data
We consider the analysis of a data set from an experiment of Antognini, Buonocore, Disbrow, and Carstens (1998) in which functional magnetic resonance imaging (fMRI) was used to examine pain perception in humans. The data, previously analyzed in Stoffer (1999) and Shumway and Stoffer (2006), consist of consecutive measures of blood oxygenation level dependent (BOLD) signal intensities at nine locations in brain. The signals were measured in 26 awake and mildly anesthetized individuals who were presented with three types of periodic stimuli: brushing, heat, and shock. The stimuli were applied alternately for 32 seconds, with a sampling rate of one point every two seconds, and then stopped for 32 seconds.
Data were recorded by several sensors located on different parts of the brain, namely, Cortex 1, 2, 3 and 4, Caudate, Thalamus 1 and 2, and Cerebellum 1 and 2. Here we analyze only those related to the region Cortex 1. The 26 patients were divided into six groups depending on the type of stimulus they received (Brush, Heat, or Shock) and on whether they were awake or mildly anesthetized. Specifically, we have the following: (1) data from three patients in Low sedation state who were stimulated with a Brush; (2) data from five patients in Low sedation state stimulated by Heat; (3) data from four patients in Low sedation state stimulated by a Shock; (4) data from five Awake patients recorded while they were stimulated with a Brush; (5) data from four Awake patients stimulated by Heat; and finally, (6) data from five Awake patients stimulated by a Shock. Given this structure, a two-way model with one factor associated to the level of consciousness (Low and Awake) and another factor associated to the stimulus type (Brush, Heat, and Shock) was chosen to describe these data. Therefore, we consider a two-way model of the form where β (1) i 1 (t) for i 1 = 1 : 2 model the effects related to the consciousness level, β i 2 (t) for i 2 = 1 : 3 model the effects of the type of stimulus, and each ε i 1 ,i 2 ,h (t) is the idiosyncratic component modeling those effects specific to each patient that are not captured by the factor structure. Since the number of patients varies within each combination of consciousness level and stimulus type, we have y 1,1,h (t) (Low and Brush) for h = 1 : 3; y 1,2,h (t) (Low and Heat) for h = 1 : 5; y 1,3,h (t) (Low and Shock) for h = 1 : 4; y 2,1,h (t) (Awake and Brush) for h = 1 : 5; y 2,2,h (t), (Awake and Heat) for h = 1 : 4; and y 2,3,h (t) (Awake and Shock) for h = 1 : 5.
From the graphs we can see that the posterior distributions of the spectral density for the process β (1) 1 (t) related to Low sedation level and that for the process β data, corresponds to the 64-second period band (or 1/64 cycles per second). The posterior spectral density of β (1) 1 (t) (Low) shows more uncertainty in this frequency band than the posterior spectral density of β (1) 2 (t) (Awake). In addition, the spectral density of β (1) 1 (t) (Low) shows additional activity in higher frequency bands. Similarly, comparing the posterior estimates of the spectral densities of the processes β (2) 1 (t), β (2) 2 (t) and β (2) 3 (t) associated, respectively, with the Brush, Heat and Shock stimuli, we see that the density for Brush shows a marked peaked around the 0.19-0.22 (again, the 64-second period band) that increases the power at this frequency in the estimated spectra of the subjects who received this type stimulus. For the other two types of stimuli, rather small peaks appear at higher frequencies. In summary, the posterior results based on the Bayesian non-parametric analysis for the data collected at the Cortex 1 location indicate that there is a significant difference in the power spectra at the 1/64 frequency band for patients that received the Brush stimulus.

Conclusions
This work presents a Bayesian non-parametric framework for the analysis of multiple time series that are collected in factorial experimental designs. This approach is based on representing the prior distributions on the spectral densities with Bernstein-Dirichlet priors. It is an important extension of the univariate methods of Macaro (2010) in that it allows us to combine data and prior distributions on the unobserved spectral components in the decomposition of multiple time series. In particular, users can explore various decompositions of the observed time series processes and, consequently, various spectral decompositions, which can provide useful representations of the data.
Because of the possibility of extracting unobserved factors from a set of time series, this work is related to the well known literature on dynamic factor models (Geweke, 1977;Sargent & Sims, 1977;Forni, Hallin, Lippi, & Reichlin, 2000;Stock & Watson, 2002, and many others). In our work we emphasize how the priors can be used to guarantee the identifiability of the different model components at the spectral level. Forni et al. (2000) and Stock and Watson (2002), on the other hand, derived their identification conditions from the properties of the principal component analysis.
We illustrate the main features and the performance of the Bayesian non-parametric approach in the analyses of simulated data and in functional magnetic resonance (fMRI) brain responses measured in awake and mildly anesthetized individuals who were presented with three types of stimuli. The posterior distributions on the specific spectral decomposition of the data that we chose-i.e., a decomposition in which each observed signal was represented as a sum of two unobserved components, one related to the level of consciousness and one to the stimulus, plus an idiosyncratic term-reveals differences in the power spectra at certain frequency bands for patients who received a particular stimulus. The spectral domain approaches presented here can be used to study data from a broad range of applications in which multiple time series are collected in the context of a designed experiment.
Open Access This article is distributed under the terms of the Creative Commons Attribution License which permits any use, distribution, and reproduction in any medium, provided the original author(s) and the source are credited.