Extracted main text — title through conclusion, appendix excluded. This is what our citation measures are computed over, published so the extraction can be checked by eye.
181,625 characters · 23 sections · 57 citation commands
Bayesian Dynamic Factor Models for High-Dimensional Matrix-Valued Time Series
\thispagestyle{empty}
\onehalfspacing
Matrix-valued time series models have recently gained significant attention for their ability to capture complex interactions across row- and column-dimensions. In macroeconomics and finance, such data structures are common. A prominent example is macroeconomic indicators collected across multiple countries. A standard approach is to stack the matrix into a long vector and to apply standard multivariate methods, but this often overlooks important within-row and within-column dependencies. Research on statistical methods for matrix-valued time series is still evolving, and matrix factor models are becoming popular due to their ability to reduce dimensions, particularly in high-dimensional settings. wang2019factor introduce a factor model for such matrix-valued time series. Subsequent work has extended this framework in various directions: chen2020constrained incorporated linear constraints to include prior knowledge, liu2019helping developed a threshold version, and chen2023time allowed for time-varying loadings.
We extend this literature by proposing a class of Bayesian matrix dynamic factor models (MDFMs) with several useful features for empirical macro-finance studies. First, we model factor dynamics using an autoregressive (AR) process, which enables persistent comovement and recursive forecasting.\footnote{See sargent1977business, stock2012dynamic, bai2015identification, and poncela2021factor.} Second, we build an approximate factor framework that allows for both temporal and cross-sectional correlations in the idiosyncratic components.\footnote{Approximate factor models date back to chamberlain1983arbitrage. Unlike exact factor models that assume a diagonal covariance matrix for the idiosyncratic components, approximate factor models allow weak serial or cross-sectional correlations.} On the time dimension, we incorporate common stochastic volatility, fat-tailed errors, and COVID-19 outliers, reflecting key empirical features observed in recent macroeconomic data lenza2022estimate, carriero2024capturing. On the cross-sectional dimension, we use a Kronecker structure for the idiosyncratic covariance matrix to capture cross-row and cross-column correlations in the idiosyncratic components. When combined with a natural conjugate prior, this structure significantly improves computational efficiency.
An important challenge in practice is model comparison when multiple models are available. In particular, a key issue is determining the optimal dimensions of the factor matrices. Researchers may also wish to compare standard dynamic factor models using vectorized panels (VDFMs) with matrix dynamic factor models (MDFMs), or evaluate the performance of exact versus approximate factor models.\footnote{For convenience, we refer to the vector version as VDFM, where “v" stands for “vector", in contrast to “m" for “matrix". } In this paper, we address these questions by adopting an importance-sampling marginal likelihood estimator of chan2015marginal, which uses a cross-entropy method to construct an efficient proposal density. This method offers two key advantages. First, it relies on independent draws from the importance-sampling density rather than correlated Markov Chain Monte Carlo (MCMC) samples. Second, it is computationally efficient and straightforward to implement. Specifically, this method identifies the “optimal" parameters within a given parametric density family by minimizing the Kullback-Leibler divergence to the posterior distribution. chan2015marginal have shown that these “optimal" parameters correspond to the maximum likelihood estimators if we treat the posterior samples as observed data of the parameters. Since the importance-sampling density is designed to closely approximate the posterior distribution, the resulting marginal likelihood estimator is highly efficient and exhibits low variance.
Our paper builds on recent works by yu2024dynamic and qin2025bayesian, who propose matrix dynamic factor models with matrix autoregressive factor evolution. While their work focuses on modeling factor dynamics under the matrix factor framework, our approach complements this line of research by incorporating additional features crucial for macro-financial applications, including time-varying volatility, outlier adjustments, and cross-sectional correlations in the idiosyncratic components. We further adopt a fully Bayesian framework with identification restrictions to uniquely identify loadings and factors for economic interpretation, and we conduct extensive model comparison exercises to determine the factor matrix dimension, model structure (VDFM vs. MDFM), and the nature of idiosyncratic correlations (exact vs. approximate factor models).
Through a series of Monte Carlo experiments, we demonstrate that the proposed estimator works well in practice. In particular, we show that our factor estimates are close to their true values. In addition, our results suggest that the larger the sample size is, the more accurate factor estimates are. Moreover, we find that the marginal likelihood estimator can correctly identify the true model.
We illustrate the usefulness of the proposed MDFMs using two datasets. The first dataset includes 10 quarterly macroeconomic indicators for 19 countries, covering 115 quarters from 1995.Q1 to 2023.Q3. The second dataset is a 10 $\times$ 10 Fama-French monthly panel spanning from January 1990 to June 2024 (414 observations). Several key findings emerge from our analysis. First, models with stochastic volatility yield higher marginal likelihoods for both datasets, indicating clear benefits from incorporating time-varying volatility. The international macroeconomic panel favors an MDFM with a $1\times 2$ factor matrix and cross-sectional correlations in the idiosyncratic components, while the Fama-French panel favors a VDFM with five factors. Second, the estimated factor loadings reveal clear patterns that can be used to group both rows (countries or sizes) or columns (indicators or book equity to market equity ratios). Finally, we observe high volatility in both applications during major global events, including the Great Recession, the COVID-19 pandemic, and the Russia--Ukraine war.
The rest of this paper is organized as follows. In Section (ref) we specify the proposed dynamic matrix factor model, with detailed discussion of motivation, identification, priors, Bayesian estimation and a useful extension. Section (ref) introduces an importance-sampling marginal likelihood estimator for the purpose of determining the dimension of factor matrix. Monte Carlo studies are presented in Section (ref) to demonstrate the accuracy of the factor estimates as well as the performance of the marginal likelihood estimator. In Section (ref), we illustrate the usefulness of our model employing two empirical applications. Lastly, Section (ref) concludes. \setcounter{section}{1}
Building on the framework established by wang2019factor, we introduce a dynamic factor model for matrix-valued time series. We follow the spirit of the approximate dynamic factor model proposed by chamberlain1983arbitrage and allow cross-row and cross-column correlations. We then incorporate time-varying volatility and outlier adjustments, discuss identification restrictions, and outline the Bayesian priors and estimation process. Lastly, we extend the model to include heteroskedastic time-varying volatility.
Consider observing an $n\times k$ data matrix $\mathbf{Y}_t$ at time $t$. To better illustrate, assume $\mathbf{Y}_t$ is a macroeconomic data matrix drawn from multiple nations at time $t$, where the rows correspond to $n$ countries and the columns correspond to $k$ variables. Consider the following dynamic factor model:
where $\mathbf{A}$ and $\mathbf{B}$ are loading matrices of dimensions $n \times p_1$ and $k \times p_2$, respectively, $\mathbf{F}_t$ is a $p_1\times p_2$ latent factor matrix. $\boldsymbol \Sigma_r$ and $\boldsymbol \Sigma_c$ are row- and column-wise covariance matrices with dimensions $n\times n$ and $k\times k$, respectively. The $p_1p_2\times p_1p_2$ covariance matrix $\boldsymbol \Lambda$ is a diagonal matrix: $\boldsymbol \Lambda = \text{diag}(\lambda^2_{1,1},\ldots,\lambda^2_{p_1p_2,p_1p_2})$. The autoregressive coefficient matrices $\mathbf{H}_{\boldsymbol \rho_1},\ldots,\mathbf{H}_{\boldsymbol \rho_q}$ capture the persistence of the factors as well as their correlation.
The bilinear form $\mathbf{A}\mathbf{F}_t\mathbf{B}$ is crucial for capturing the cross-country and cross-variable dependencies. For example, the $i$-th row of $\mathbf{Y}_t$ is
where $\mathbf{Y}_{i,.,t}$ denotes the $i$-th row of the data matrix, $\mathbf{A}_{i,.}$ represents the $i$-th row of the loading matrix $\mathbf{A}$, and $\mathbf{E}_{i,.,t}$ is the $i$-th row of the matrix $\mathbf{E}_t$. It is evident that the $i$-th row of the data matrix is a linear combination of the rows of $\mathbf{F}_t\mathbf{B}'$, weighted by the $i$-th row of $\mathbf{A}$. Similarly, the $j$-th column of the data matrix is a linear combination of the columns of $\mathbf{A}\mathbf{F}_t$, weighted by the $j$-th column of $\mathbf{B}'$. Thus, $\mathbf{A}$ reflects how countries load on latent factors, while $\mathbf{B}$ reflects how indicators respond to them. The rows and columns of $\mathbf{F}_t$ can be interpreted as common factors influencing countries and indicators, respectively.
Based on the matrix factor model by wang2019factor, our model introduces two key features: dynamic factors and cross-sectional correlations with time-varying volatility in the idiosyncratic components.
Incorporating factor dynamics is crucial, as economic indicators often exhibit persistent deviations from trend following shocks. For instance, GDP growth may remain subdued long after a recession. The autoregressive process in (ref) can effectively capture such persistence and potentially improve modeling and forecasting performance.
The other key feature of model (ref)--(ref) is the Kronecker-structured covariance of the vectorized error, $\text{vec}(\mathbf{E}_t)$, which introduces both flexibility and interpretability. This structure allows for cross-sectional correlation in the idiosyncratic components, making the model an approximate factor model rather than an exact one. Approximate factor models, introduced by chamberlain1983arbitrage, have been widely applied in macroeconomics forni2001generalized, stock2005implications.
The Kronecker structure also separates row-wise and column-wise covariances. In particular, for any row, the conditional covariance is $\text{Cov}(\mathbf{Y}_{i,.,t}'\:\vert\:\mathbf{A},\mathbf{F}_t,\mathbf{B}) = \omega_t\sigma^2_{r,i,i}\boldsymbol \Sigma_c$, for $i = 1,\ldots,n$. Similarly, for any column, the conditional covariance is $\text{Cov}(\mathbf{Y}_{.,j,t}\:\vert\:\mathbf{A},\mathbf{F}_t,\mathbf{B}) = \omega_t\sigma^2_{c,j,j}\boldsymbol \Sigma_r$, $j = 1,\ldots,k$. $\boldsymbol \Sigma_r$ and $\boldsymbol \Sigma_c$ can then be interpreted as the row-wise and column-wise covariances that are not explained by the common components.
Computationally, this structure enables efficient sampling: with conjugate priors, the conditional posteriors of $(\mathbf{A}, \boldsymbol \Sigma_r)$ and $(\mathbf{B}, \boldsymbol \Sigma_c)$ follow normal-inverse-Wishart distributions, allowing for joint updates rather than element-wise sampling for the loading matrices $\mathbf{A}$ and $\mathbf{B}$ (see Section (ref)). Finally, the model flexibly accommodates time-varying volatility and outliers via the latent scale $\omega_t$. For homoskedasticity, one can simply set $\omega_t = 1$ for all $t$.
It is useful to allow for time-varying volatility in modeling macroeconomic data in empirical macroeconomics or finance.\footnote{See, for example, the discussions on the importance of incorporating time-varying volatility in vector autoregressions (VARs) by cross2016forecasting, chan2018bayesian, and chan2023comparing, and in factor models by aguilar2000bayesian, chib2006analysis, kastner2017efficient, and li2022leverage.} The conditionally Gaussian framework in (ref) can accommodate a variety of stochastic volatility processes. We extend our model by accommodating three popular specifications in the literature: the common stochastic volatility model of carriero2016common, the explicit outlier component of stock2016core, and the $t$-distributed innovations of jacquier2004bayesian.
Specification 1. Common stochastic volatility\\ An important example is the common stochastic volatility model introduced in carriero2015bayesian. In particular, let $\omega_t = \text{e}^{h_t}$, and assume that the log-volatility $h_t$ follows a stationary AR(1) process with 0 mean:
for $t = 2,...,T$, where it is assumed $\lvert\phi\rvert<1$ and the initial state $h_1$ is assumed to have a Gaussian prior: $h_1\sim\mathcal{N}(0,\sigma^2_h/(1-\phi^2))$.
Specification 2. The explicit outlier component\\ Another widely-adopted specification after the COVID-19 pandemic is the explicit outlier component proposed in stock2016core. In specific, the outlier indicators enter the model in a scale factor, denoted $\omega_t = o_t^2$. $o_t$ follows a mixture distribution that distinguishes between regular observations $o_t = 1$ and outliers with $o_t \geqslant 2$. The probability that outliers occur is $p_{\mathbf{o}}$, which is assumed to have a beta prior.
Specification 3. Fat-tailed innovations\\ This specification characterizes the infrequent occurrences of outliers by incorporating a latent variable $\omega_t = q_t^2$, where $q^2_t$ follows an inverse-gamma distribution: $q_t^2\sim\mathcal{IG}(l/2,l/2)$. Then the marginal distribution of the vectorized error has a multivariate $t$ distribution with zero mean, scale matrix $\boldsymbol \Sigma_c\otimes\boldsymbol \Sigma_r$, and degree of freedom $l$. $t$-distributions have fatter tails than normal distribution, and thus may provide better fit for data with infrequent occurrences of outliers.
A natural benchmark to model (ref)-(ref) is a typical VDFM defined as follows:
where $\mathbf{M}$ is a $nk\times p$ loading matrix, while $\mathbf{f}_t$ is a $p\times 1$ vector of factors. $p$ is the number of factors and we assume $p = p_1 \times p_2$ for better comparison to the MDFM. The matrix $\mathbf{H}_{\rho}$ is a $k$-dimensional diagonal matrix consisting of autoregressive coefficients for the evolution process of these factors.
The MDFM can be viewed as a restricted version of the VDFM in (ref), where the factor loadings possess a Kronecker product structure. Specifically, model (ref) can be written as:
This structure formulation significantly reduces the dimensionality of the parameter space. In particular, model (ref) requires estimating only $np_1 + kp_2$ loading parameters, compared to $nk \times p_1p_2$ parameters in the unrestricted DFM in (ref).
However, if the Kronecker structure imposed by (ref) is not supported by the data, the VDFM may provide a better fit. he2024matrix propose a family of randomized specification tests to formally test for the presence of this matrix structure. In this paper, we adopt a Bayesian model comparison approach by estimating the marginal likelihoods of competing models, as detailed in Section (ref).
MDFMs defined in (ref)-(ref) cannot be identified without further restrictions. For this reason, research in this field focuses on estimating the column space of the factor loadings, as which is uniquely identifiable. This approach proves beneficial when the objective is to group countries (rows) or variables (columns) based on the pattern of the column space of the loading matrices and to make forecasts using the estimates of common components. However, this strategy may pose challenges for the interpretation of the factors.
In the literature of DFMs, a commonly imposed set of restrictions is that the factor loading matrix is a lower triangular matrix with ones on the diagonal, accompanied by the assumption that the idiosyncratic error $\text{vec}(\mathbf{E}_t)$ is independent of the latent factors $\text{vec}(\mathbf{F}_t)$. We follow that spirit and propose a set of sufficient identification assumptions for MDFMs. The proofs are provided in the Supplemental Appendix Section (ref).
Note that a variation is that we restrict the diagonal elements of both $\mathbf{A}$ and $\mathbf{B}$ to be ones, while allowing $\text{Cov}(\mathbf{u}_t)$ to be a positive diagonal matrix rather than an identity matrix, as specified in Assumption (ref)--(ref).
Another identification issue in (ref)--(ref) is that with the structure in the covariance matrix for the vectorized error, the covariances $\boldsymbol \Sigma_r$ and $\boldsymbol \Sigma_c$ can only be identified up to scale. That is, there exist a constant $m\in\mathbb{R}\setminus \{0\}$, such that $\boldsymbol \Sigma_c\otimes\boldsymbol \Sigma_r = \widetilde{\boldsymbol \Sigma}_c\otimes\widetilde{\boldsymbol \Sigma}_r$, where $\widetilde{\boldsymbol \Sigma}_c = m\boldsymbol \Sigma_c$ and $\widetilde{\boldsymbol \Sigma}_r = m^{-1}\boldsymbol \Sigma_r$. To fix the scale, we normalize the $(1,1)$ element of $\boldsymbol \Sigma_c$ to be 1.
An important implication of the lower triangular structure of the factor loading matrices, as specified in Assumption (ref) and (ref), is that the order of rows and columns in data matrix $\mathbf{Y}_t$ “define" the rows and columns of the factor matrix. In specific, the first row of the data matrix is the first row of the factor matrix plus the idiosyncratic error, and so forth. The same logic applies to the columns. The hierarchical structure adopted here thereby provides an additional layer of interpretability by linking factors to specific rows and columns of the data matrix. As a result, the ordering of the data plays a pivotal role in interpreting both the factor matrix and the loading matrices.
While our model (ref)--(ref) offers a parsimonious and interpretable framework for modeling matrix-valued time series, it is important to acknowledge its limitations. One key assumption (Assumption (ref)) is that the elements of the factor matrix are i.i.d. In practice, this assumption may not hold. One way to extend the model is to allow for such dependencies via a vector or matrix autoregressive process for $\mathbf{F}_t$. Considering that incorporating these additional features alongside time-varying volatility and cross-sectional dependence in the idiosyncratic components would increase model complexity and pose further identification challenges, we opt for a framework that strikes a balance between flexibility and complexity, and we leave such generalizations to future research.
We use natural conjugate priors for the transpose of factor loadings: $\mathbf{A}'$ and $\mathbf{B}'$. In addition, we use inverse-Wishart priors for $\boldsymbol \Sigma_r$ and $\boldsymbol \Sigma_c$:
In practice, we can adopt diagonal matrices for hyperparameter matrices $\mathbf{S}_r$ and $\mathbf{S}_c$, based on the belief that there is no cross-sectional correlation in idiosyncratic components.
The autoregressive coefficient, i.e., the diagonal elements of $\mathbf{H}_{\boldsymbol \rho}$, is assumed to have a truncated normal prior on the interval $(-1,1)$:
where $\mbox{$1 {\bf 1}$}({{}\cdot{}})$ denotes the indicator function.
The prior variance $\lambda_{j,k}^2$ is assumed to have a inverse-gamma prior: $\mathcal{IG}(\nu_{\lambda_{j,k}},S_{\lambda_{j,k}})$. We also treat the first $q$ values of $\mathbf{F}_t$ as unknown, and use the following prior
\sloppy Posterior draws can be obtained by sequentially sampling from: (1) $p(\mathbf{A}',\boldsymbol \Sigma_r\:\vert\:\mathbf{Y},\mathbf{B},\mathbf{F},\boldsymbol \Sigma_c)$; (2) $p(\mathbf{B}',\boldsymbol \Sigma_c\:\vert\:\mathbf{Y},\mathbf{A},\mathbf{F},\boldsymbol \Sigma_r)$; (3) $p(\text{vec}(\mathbf{F}_t)\:\vert\:\mathbf{Y}_t,\mathbf{A},\mathbf{B},\boldsymbol \Sigma_r, \boldsymbol \Sigma_c,\boldsymbol \omega^2,\boldsymbol \rho)$, $t = 1,\ldots,T$; (4) $p(\lambda_{j,k}^2\:\vert\:\mathbf{f}_{j,k},\rho_{j,k})$, $j=1,\ldots,p_1, k=1,\ldots,p_2$; (5) $p(\boldsymbol \rho_{j,k,l}\:\vert\:\mathbf{f}_{j,k},\lambda^2_{j,k})$, $j=1,\ldots,p_1, k=1,\ldots,p_2, l = 1,\ldots,q$; (6) $p(\omega_t\:\vert\:\mathbf{A},\mathbf{F}_t,\mathbf{B},\boldsymbol \Sigma_c,\boldsymbol \Sigma_r)$, $t = 1,\ldots,T$.
With the natural conjugate prior, we can fully exploit the structure of the data matrix and the Kronecker form of the idiosyncratic components to directly sample the loading matrices, rather than sampling their free elements iteratively, thereby improving computational efficiency. To sample these loadings with identification restrictions outlined in Section (ref), we adopt the approach proposed by cong2017fast. To sample the covariance matrix $\boldsymbol \Sigma_c$ with the first element fixed at 1, we use the algorithm proposed by nobile2000comment. Sampling the latent factors and parameters such as $\boldsymbol \lambda$, $\boldsymbol \rho$, as well as stochastic volatility and outliers, is relatively straightforward and is discussed in detail in Supplemental Appendix Section (ref). In the following, we focus on the implementation of Step 1--2, which involves sampling $(\mathbf{A}',\boldsymbol \Sigma_r\:\vert\:{{}\cdot{}})$ and $(\mathbf{B}', \boldsymbol \Sigma_c \:\vert\:{{}\cdot{}})$ under parameter restrictions.
Step 1. Sampling from $(\mathbf{A}',\boldsymbol \Sigma_r\:\vert\:\mathbf{Y},\mathbf{B},\mathbf{F},\boldsymbol \Sigma_c)$\\ We sample $(\mathbf{A}',\boldsymbol \Sigma_r)$ conditional on the latent factors and other parameters from a normal-inverse-Wishart distribution:
where
We can sample the normal-inverse-Wishart distribution in (ref) in two steps. First, we sample from the inverse Wishart distribution for $\boldsymbol \Sigma_r$ marginally. Then given $\boldsymbol \Sigma_r$, we can sample from the normal distribution of $(\mathbf{A}'\:\vert\:{{}\cdot{}})$.
With the constraints on the structure of $\mathbf{A}'$ for identification, we cannot directly sample from the above normal distribution. Here we outline the sampling scheme for $\mathbf{A}'$ with the constraints. To that end, we first represent the restrictions as a system of linear restrictions. For example, for $\mathbf{A}'$, we represent the restrictions that $\mathbf{A}$ is a lower triangular matrix with ones on the diagonal using $\mathbf{M}_{\mathbf{A}'}\text{vec}(\mathbf{A}')=\mathbf{a}_0$. Assuming $n>p_1$, $\mathbf{M}_{\mathbf{A}'}$ is a $p_1(p_1+1)/2\times np_1$ selection matrix, and $\mathbf{a}_0$ is a $p_1(p_1+1)/2\times 1$ vector consisting of ones and zeros. Then we apply Algorithm 2 in cong2017fast or Algorithm 1 in chan2023large to efficiently sample ($\text{vec}(\mathbf{A}')\:\vert\:{{}\cdot{}}) \sim \mathcal{N}(\text{vec}(\widehat{\mathbf{A}}'),\boldsymbol \Sigma_r\otimes\mathbf{K}_{\mathbf{A}'}^{-1})$ such that $\mathbf{M}_{\mathbf{A}'}\text{vec}(\mathbf{A}') = \mathbf{a}_0$. In particular, one can first sample $\text{vec}(\mathbf{A}_u')$ from the unconstrained conditional posterior distribution in Step 1. It is important to note that given the Kronecker structure in the covariance matrix of the posterior, i.e., $(\boldsymbol \Sigma_r\otimes\mathbf{K}_{\mathbf{A}'}^{-1})$, we are able to sample from the matrix normal distribution, and thus facilitate the computation. In particular, we first sample a $p_1\times n$ matrix of independent samples from a standard normal distribution, denoted as $\mathbf{Z}$. Then let
where $\mathbf{C}_{\mathbf{K}_{\mathbf{A}'}}$ and $\mathbf{C}_{\boldsymbol \Sigma_r}$ are the Cholesky decomposition of $\mathbf{K}_{\mathbf{A}'}$ and $\boldsymbol \Sigma_r$. One can show that $(\mathbf{A}'_u\:\vert\:{{}\cdot{}})\sim\mathcal{MN}(\widehat{\mathbf{A}}', \mathbf{K}_{\mathbf{A}'}^{-1}, \boldsymbol \Sigma_r)$, where $\mathcal{MN}$ denotes the matrix normal distribution. Therefore, $(\text{vec}(\mathbf{A}'_u)\:\vert\:{{}\cdot{}})\sim\mathcal{N}(\text{vec}(\widehat{\mathbf{A}}'),\boldsymbol \Sigma_r\otimes\mathbf{K}_{\mathbf{A}'}^{-1})$.
Given the unrestricted $\mathbf{A}'_u$, we return
which can be realized by the following four steps:
It can be shown that $\mathbf{A}'$ follows the distribution $(\mathbf{A}'\:\vert\:{{}\cdot{}}, \mathbf{M}_{\mathbf{A}'}\text{vec}(\mathbf{A}')=\mathbf{a}_0)$.
Step 2. Sampling from $(\mathbf{B}',\boldsymbol \Sigma_c\:\vert\:\mathbf{Y},\mathbf{A},\mathbf{F},\boldsymbol \Sigma_r)$\\ Similar to step 1, $(\mathbf{B}, \boldsymbol \Sigma_c)$ are drawn from a normal-inverse-Wishart distribution:
where
We sample $(\mathbf{B}',\boldsymbol \Sigma_c\:\vert\:{{}\cdot{}})$ in two steps. First, we sample $\boldsymbol \Sigma_c$ marginally from $(\boldsymbol \Sigma_c\:\vert\:{{}\cdot{}})\sim\mathcal{IW}(\widehat{\mathbf{S}}_c, \widehat{\nu}_c)$ with the restriction that $\sigma_{c,1,1} = 1$. We use the algorithm by nobile2000comment for this step, outlined below:
Then we sample from a normal distribution for $\mathbf{B}$:
which can be done using the algorithm described in step 1.
A more flexible way to model time-varying volatility is to incorporate heteroskedastic stochastic volatility processes for each of the variables included, as first proposed by cogley2005drifts in a vector autoregression setting. To that end, we assume the idiosyncratic component has a different covariance matrix as follows:
where $\mathbf{D}_t = \text{diag}(\text{e}^{h_{1,1,t}},\text{e}^{h_{2,1,t}},\ldots,\text{e}^{h_{n,k,t}})$ is a diagonal matrix. The log-volatility follows a stationary AR(1) process with 0 mean similar to (ref).
Compared to the specification in (ref), this extension contains $nk$ stochastic volatility processes, which can accommodate more complex volatility patterns. However, these volatility processes are assumed independent and there will be no cross-sectional correlation for rows and columns in the idiosyncratic components, which can be unrealistic in many practical applications. Moreover, this comes at a cost of more intensive posterior computations since natural conjugate priors cannot be applied to (ref). Ultimately, there is always a trade-off between model complexity and computational burden, and the choice of specification depends on the application and its specific goals.
When multiple models are available, a major challenge for practitioners is the lack of tools for comparing these models. In this section, we employ an importance-sampling estimator of the marginal likelihood to conduct model comparison. In particular, we are interested in determining the optimal dimension of the factor matrix, selecting between the VDFM and the MDFM, and distinguishing between exact factor models and approximate factor models.
A natural Bayesian approach of model comparison involves computing the marginal likelihood for each available model and selecting the model that yields the highest marginal likelihood. Using marginal likelihoods for model comparison has several advantages. First, it accounts for model complexity and avoids overfitting by integrating over the entire parameter space, rather than replying on point estimates. This penalizes over-parameterized models, as more complex models spread probability mass over a larger parameter space, leading to lower marginal likelihoods unless justified by the data. Second, marginal likelihood is a consistent model selection criterion--if the true data-generating process is included in the set of candidate models, the marginal likelihood will asymptotically favor the correct model as more data becomes available. Moreover, Bayes factors, which are based on the ratio of marginal likelihoods between competing models, provide a direct measure of relative evidence in favor of one model over another.
Despite its strong theoretical foundation and automatic penalty for overfitting, marginal likelihood is often criticized for its high computational cost, especially in high-dimensional settings. For this reason, several alternative methods have been proposed. For example, lopes2004bayesian introduced a reversible jump MCMC algorithm for moving between models that allows movement between models with different numbers of factors, while lee2002bayesian developed a path sampling approach to compute the Bayes factor efficiently. Additionally, bhattacharya2011sparse and lee2022robust inferred the number of factors by zeroing out a subset of the loading elements using Bayesian variable selection priors.
In this paper, instead of computing the marginal likelihood directly, we estimate it using an importance-sampling estimator, which significantly reduces computational complexity while maintaining accuracy. Specifically, let $\boldsymbol \theta$ denote the unknown parameters, $g(\boldsymbol \theta)$ be the importance sampling density, and $p(\boldsymbol \theta)$ be the prior distribution. The marginal likelihood is estimated as follows:
where $\boldsymbol \theta_1,...,\boldsymbol \theta_n$ are independent draws from the importance sampling density $g(\boldsymbol \theta)$. It is clear that this estimator is unbiased and consistent, assuming $g$ dominates $p(\mathbf{y}\:\vert\:{{}\cdot{}})p({{}\cdot{}})$.
The efficiency of the estimator depends critically on the choice of $g$. Ideally, if $g$ is close to the posterior distribution, the estimator will have low variance. In this paper, we employ the cross-entropy method proposed by chan2015marginal to find the optimal density within a given parametric family of distributions by minimizing the Kullback-Leibler divergence of the posterior distribution from the importance sampling density. This approach has two major advantages. First, using the importance-sampling density is convenient as it generates independent draws instead of correlated MCMC draws. Second, since the importance density is close to the posterior, the estimator exhibits low variance, requiring only a few thousand samples for accurate estimation. Specifically, chan2015marginal show that, for a given parametric family of densities, the optimal hyperparameters correspond to the maximum likelihood estimators when posterior samples are treated as observed data.
To further facilitate computation and reduce the estimator's variance, we integrate out the factors from the likelihood function. While a closed-form expression for the integrated likelihood is available, directly computing the inverse of the covariance matrix in high-dimensional datasets is computationally prohibitive. Therefore, we employ the Kalman filter to efficiently integrate out the factors. Further details on integrating the factors and the choice of the importance sampling density are provided in Supplemental Appendix Section (ref).
After integrating out the factors, the importance density is denoted as
For the parametric family, we use Gaussian densities for $f(\mathbf{A};\@ifnextchar^{{ \setbox0\hbox{${\mathaccent"0362{\mathbf{A}}}^H$} \setbox2\hbox{${\mathaccent"0362{\kern0pt\mathbf{A}}}^H$} \ifdim\ht0=\ht2 \begingroup \def\mathaccent#\mathbf{A}#0{ \let\mathaccent\save@mathaccent \if22 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if21 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern0 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{A}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if21 \macc@nested@a\relax111{\mathbf{A}} \else \def\gobble@till@marker#\mathbf{A}\endmarker{} \futurelet\gobble@till@marker\mathbf{A}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \else \begingroup \def\mathaccent#\mathbf{A}#0{ \let\mathaccent\save@mathaccent \if12 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if11 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern0 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{A}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if11 \macc@nested@a\relax111{\mathbf{A}} \else \def\gobble@till@marker#\mathbf{A}\endmarker{} \futurelet\gobble@till@marker\mathbf{A}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \fi }}{ \setbox0\hbox{${\mathaccent"0362{\mathbf{A}}}^H$} \setbox2\hbox{${\mathaccent"0362{\kern0pt\mathbf{A}}}^H$} \ifdim\ht0=\ht2 \begingroup \def\mathaccent#\mathbf{A}#1{ \let\mathaccent\save@mathaccent \if22 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if21 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern1 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{A}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if21 \macc@nested@a\relax111{\mathbf{A}} \else \def\gobble@till@marker#\mathbf{A}\endmarker{} \futurelet\gobble@till@marker\mathbf{A}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \else \begingroup \def\mathaccent#\mathbf{A}#1{ \let\mathaccent\save@mathaccent \if12 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if11 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern1 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{A}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if11 \macc@nested@a\relax111{\mathbf{A}} \else \def\gobble@till@marker#\mathbf{A}\endmarker{} \futurelet\gobble@till@marker\mathbf{A}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \fi },\@ifnextchar^{{ \setbox0\hbox{${\mathaccent"0362{\mathbf{D}}}^H$} \setbox2\hbox{${\mathaccent"0362{\kern0pt\mathbf{D}}}^H$} \ifdim\ht0=\ht2 \begingroup \def\mathaccent#\mathbf{D}#0{ \let\mathaccent\save@mathaccent \if22 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if21 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern0 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{D}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if21 \macc@nested@a\relax111{\mathbf{D}} \else \def\gobble@till@marker#\mathbf{D}\endmarker{} \futurelet\gobble@till@marker\mathbf{D}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \else \begingroup \def\mathaccent#\mathbf{D}#0{ \let\mathaccent\save@mathaccent \if12 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if11 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern0 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{D}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if11 \macc@nested@a\relax111{\mathbf{D}} \else \def\gobble@till@marker#\mathbf{D}\endmarker{} \futurelet\gobble@till@marker\mathbf{D}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \fi }}{ \setbox0\hbox{${\mathaccent"0362{\mathbf{D}}}^H$} \setbox2\hbox{${\mathaccent"0362{\kern0pt\mathbf{D}}}^H$} \ifdim\ht0=\ht2 \begingroup \def\mathaccent#\mathbf{D}#1{ \let\mathaccent\save@mathaccent \if22 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if21 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern1 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{D}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if21 \macc@nested@a\relax111{\mathbf{D}} \else \def\gobble@till@marker#\mathbf{D}\endmarker{} \futurelet\gobble@till@marker\mathbf{D}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \else \begingroup \def\mathaccent#\mathbf{D}#1{ \let\mathaccent\save@mathaccent \if12 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if11 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern1 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{D}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if11 \macc@nested@a\relax111{\mathbf{D}} \else \def\gobble@till@marker#\mathbf{D}\endmarker{} \futurelet\gobble@till@marker\mathbf{D}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \fi }_{\mathbf{A}})$, and $f(\mathbf{B};\@ifnextchar^{{ \setbox0\hbox{${\mathaccent"0362{\mathbf{B}}}^H$} \setbox2\hbox{${\mathaccent"0362{\kern0pt\mathbf{B}}}^H$} \ifdim\ht0=\ht2 \begingroup \def\mathaccent#\mathbf{B}#0{ \let\mathaccent\save@mathaccent \if22 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if21 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern0 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{B}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if21 \macc@nested@a\relax111{\mathbf{B}} \else \def\gobble@till@marker#\mathbf{B}\endmarker{} \futurelet\gobble@till@marker\mathbf{B}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \else \begingroup \def\mathaccent#\mathbf{B}#0{ \let\mathaccent\save@mathaccent \if12 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if11 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern0 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{B}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if11 \macc@nested@a\relax111{\mathbf{B}} \else \def\gobble@till@marker#\mathbf{B}\endmarker{} \futurelet\gobble@till@marker\mathbf{B}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \fi }}{ \setbox0\hbox{${\mathaccent"0362{\mathbf{B}}}^H$} \setbox2\hbox{${\mathaccent"0362{\kern0pt\mathbf{B}}}^H$} \ifdim\ht0=\ht2 \begingroup \def\mathaccent#\mathbf{B}#1{ \let\mathaccent\save@mathaccent \if22 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if21 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern1 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{B}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if21 \macc@nested@a\relax111{\mathbf{B}} \else \def\gobble@till@marker#\mathbf{B}\endmarker{} \futurelet\gobble@till@marker\mathbf{B}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \else \begingroup \def\mathaccent#\mathbf{B}#1{ \let\mathaccent\save@mathaccent \if12 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if11 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern1 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{B}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if11 \macc@nested@a\relax111{\mathbf{B}} \else \def\gobble@till@marker#\mathbf{B}\endmarker{} \futurelet\gobble@till@marker\mathbf{B}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \fi },\@ifnextchar^{{ \setbox0\hbox{${\mathaccent"0362{\mathbf{D}}}^H$} \setbox2\hbox{${\mathaccent"0362{\kern0pt\mathbf{D}}}^H$} \ifdim\ht0=\ht2 \begingroup \def\mathaccent#\mathbf{D}#0{ \let\mathaccent\save@mathaccent \if22 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if21 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern0 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{D}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if21 \macc@nested@a\relax111{\mathbf{D}} \else \def\gobble@till@marker#\mathbf{D}\endmarker{} \futurelet\gobble@till@marker\mathbf{D}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \else \begingroup \def\mathaccent#\mathbf{D}#0{ \let\mathaccent\save@mathaccent \if12 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if11 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern0 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{D}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if11 \macc@nested@a\relax111{\mathbf{D}} \else \def\gobble@till@marker#\mathbf{D}\endmarker{} \futurelet\gobble@till@marker\mathbf{D}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \fi }}{ \setbox0\hbox{${\mathaccent"0362{\mathbf{D}}}^H$} \setbox2\hbox{${\mathaccent"0362{\kern0pt\mathbf{D}}}^H$} \ifdim\ht0=\ht2 \begingroup \def\mathaccent#\mathbf{D}#1{ \let\mathaccent\save@mathaccent \if22 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if21 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern1 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{D}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if21 \macc@nested@a\relax111{\mathbf{D}} \else \def\gobble@till@marker#\mathbf{D}\endmarker{} \futurelet\gobble@till@marker\mathbf{D}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \else \begingroup \def\mathaccent#\mathbf{D}#1{ \let\mathaccent\save@mathaccent \if12 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if11 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern1 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{D}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if11 \macc@nested@a\relax111{\mathbf{D}} \else \def\gobble@till@marker#\mathbf{D}\endmarker{} \futurelet\gobble@till@marker\mathbf{D}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \fi }_{\mathbf{B}})$, where $\@ifnextchar^{{ \setbox0\hbox{${\mathaccent"0362{\mathbf{A}}}^H$} \setbox2\hbox{${\mathaccent"0362{\kern0pt\mathbf{A}}}^H$} \ifdim\ht0=\ht2 \begingroup \def\mathaccent#\mathbf{A}#0{ \let\mathaccent\save@mathaccent \if22 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if21 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern0 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{A}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if21 \macc@nested@a\relax111{\mathbf{A}} \else \def\gobble@till@marker#\mathbf{A}\endmarker{} \futurelet\gobble@till@marker\mathbf{A}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \else \begingroup \def\mathaccent#\mathbf{A}#0{ \let\mathaccent\save@mathaccent \if12 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if11 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern0 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{A}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if11 \macc@nested@a\relax111{\mathbf{A}} \else \def\gobble@till@marker#\mathbf{A}\endmarker{} \futurelet\gobble@till@marker\mathbf{A}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \fi }}{ \setbox0\hbox{${\mathaccent"0362{\mathbf{A}}}^H$} \setbox2\hbox{${\mathaccent"0362{\kern0pt\mathbf{A}}}^H$} \ifdim\ht0=\ht2 \begingroup \def\mathaccent#\mathbf{A}#1{ \let\mathaccent\save@mathaccent \if22 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if21 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern1 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{A}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if21 \macc@nested@a\relax111{\mathbf{A}} \else \def\gobble@till@marker#\mathbf{A}\endmarker{} \futurelet\gobble@till@marker\mathbf{A}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \else \begingroup \def\mathaccent#\mathbf{A}#1{ \let\mathaccent\save@mathaccent \if12 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if11 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern1 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{A}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if11 \macc@nested@a\relax111{\mathbf{A}} \else \def\gobble@till@marker#\mathbf{A}\endmarker{} \futurelet\gobble@till@marker\mathbf{A}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \fi }$ and $\@ifnextchar^{{ \setbox0\hbox{${\mathaccent"0362{\mathbf{B}}}^H$} \setbox2\hbox{${\mathaccent"0362{\kern0pt\mathbf{B}}}^H$} \ifdim\ht0=\ht2 \begingroup \def\mathaccent#\mathbf{B}#0{ \let\mathaccent\save@mathaccent \if22 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if21 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern0 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{B}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if21 \macc@nested@a\relax111{\mathbf{B}} \else \def\gobble@till@marker#\mathbf{B}\endmarker{} \futurelet\gobble@till@marker\mathbf{B}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \else \begingroup \def\mathaccent#\mathbf{B}#0{ \let\mathaccent\save@mathaccent \if12 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if11 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern0 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{B}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if11 \macc@nested@a\relax111{\mathbf{B}} \else \def\gobble@till@marker#\mathbf{B}\endmarker{} \futurelet\gobble@till@marker\mathbf{B}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \fi }}{ \setbox0\hbox{${\mathaccent"0362{\mathbf{B}}}^H$} \setbox2\hbox{${\mathaccent"0362{\kern0pt\mathbf{B}}}^H$} \ifdim\ht0=\ht2 \begingroup \def\mathaccent#\mathbf{B}#1{ \let\mathaccent\save@mathaccent \if22 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if21 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern1 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{B}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if21 \macc@nested@a\relax111{\mathbf{B}} \else \def\gobble@till@marker#\mathbf{B}\endmarker{} \futurelet\gobble@till@marker\mathbf{B}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \else \begingroup \def\mathaccent#\mathbf{B}#1{ \let\mathaccent\save@mathaccent \if12 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if11 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern1 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{B}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if11 \macc@nested@a\relax111{\mathbf{B}} \else \def\gobble@till@marker#\mathbf{B}\endmarker{} \futurelet\gobble@till@marker\mathbf{B}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \fi }$ are the means, while $\@ifnextchar^{{ \setbox0\hbox{${\mathaccent"0362{\mathbf{D}}}^H$} \setbox2\hbox{${\mathaccent"0362{\kern0pt\mathbf{D}}}^H$} \ifdim\ht0=\ht2 \begingroup \def\mathaccent#\mathbf{D}#0{ \let\mathaccent\save@mathaccent \if22 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if21 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern0 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{D}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if21 \macc@nested@a\relax111{\mathbf{D}} \else \def\gobble@till@marker#\mathbf{D}\endmarker{} \futurelet\gobble@till@marker\mathbf{D}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \else \begingroup \def\mathaccent#\mathbf{D}#0{ \let\mathaccent\save@mathaccent \if12 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if11 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern0 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{D}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if11 \macc@nested@a\relax111{\mathbf{D}} \else \def\gobble@till@marker#\mathbf{D}\endmarker{} \futurelet\gobble@till@marker\mathbf{D}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \fi }}{ \setbox0\hbox{${\mathaccent"0362{\mathbf{D}}}^H$} \setbox2\hbox{${\mathaccent"0362{\kern0pt\mathbf{D}}}^H$} \ifdim\ht0=\ht2 \begingroup \def\mathaccent#\mathbf{D}#1{ \let\mathaccent\save@mathaccent \if22 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if21 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern1 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{D}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if21 \macc@nested@a\relax111{\mathbf{D}} \else \def\gobble@till@marker#\mathbf{D}\endmarker{} \futurelet\gobble@till@marker\mathbf{D}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \else \begingroup \def\mathaccent#\mathbf{D}#1{ \let\mathaccent\save@mathaccent \if12 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if11 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern1 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{D}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if11 \macc@nested@a\relax111{\mathbf{D}} \else \def\gobble@till@marker#\mathbf{D}\endmarker{} \futurelet\gobble@till@marker\mathbf{D}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \fi }_{\mathbf{A}}$ and $\@ifnextchar^{{ \setbox0\hbox{${\mathaccent"0362{\mathbf{D}}}^H$} \setbox2\hbox{${\mathaccent"0362{\kern0pt\mathbf{D}}}^H$} \ifdim\ht0=\ht2 \begingroup \def\mathaccent#\mathbf{D}#0{ \let\mathaccent\save@mathaccent \if22 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if21 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern0 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{D}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if21 \macc@nested@a\relax111{\mathbf{D}} \else \def\gobble@till@marker#\mathbf{D}\endmarker{} \futurelet\gobble@till@marker\mathbf{D}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \else \begingroup \def\mathaccent#\mathbf{D}#0{ \let\mathaccent\save@mathaccent \if12 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if11 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern0 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{D}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if11 \macc@nested@a\relax111{\mathbf{D}} \else \def\gobble@till@marker#\mathbf{D}\endmarker{} \futurelet\gobble@till@marker\mathbf{D}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \fi }}{ \setbox0\hbox{${\mathaccent"0362{\mathbf{D}}}^H$} \setbox2\hbox{${\mathaccent"0362{\kern0pt\mathbf{D}}}^H$} \ifdim\ht0=\ht2 \begingroup \def\mathaccent#\mathbf{D}#1{ \let\mathaccent\save@mathaccent \if22 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if21 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern1 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{D}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if21 \macc@nested@a\relax111{\mathbf{D}} \else \def\gobble@till@marker#\mathbf{D}\endmarker{} \futurelet\gobble@till@marker\mathbf{D}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \else \begingroup \def\mathaccent#\mathbf{D}#1{ \let\mathaccent\save@mathaccent \if12 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if11 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern1 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{D}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if11 \macc@nested@a\relax111{\mathbf{D}} \else \def\gobble@till@marker#\mathbf{D}\endmarker{} \futurelet\gobble@till@marker\mathbf{D}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \fi }_{\mathbf{B}}$ are the covariance matrices. We use inverse-Wishart densities for $f(\boldsymbol \Sigma_c;\nu_c,\Psi_c)$, and $f(\boldsymbol \Sigma_r;\nu_r,\Psi_r)$, where $\nu_c$ and $\nu_r$ are degrees of freedom, while $\Psi_c$ and $\Psi_r$ are scale matrices. The truncated normal density on the interval $(-1, 1)$ is used for $f(\boldsymbol \rho;\@ifnextchar^{{ \setbox0\hbox{${\mathaccent"0362{\boldsymbol \rho}}^H$} \setbox2\hbox{${\mathaccent"0362{\kern0pt\boldsymbol \rho}}^H$} \ifdim\ht0=\ht2 \begingroup \def\mathaccent#\boldsymbol \rho#0{ \let\mathaccent\save@mathaccent \if22 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if21 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern0 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\boldsymbol \rho} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if21 \macc@nested@a\relax111{\boldsymbol \rho} \else \def\gobble@till@marker#\boldsymbol \rho\endmarker{} \futurelet\gobble@till@marker\boldsymbol \rho\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \else \begingroup \def\mathaccent#\boldsymbol \rho#0{ \let\mathaccent\save@mathaccent \if12 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if11 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern0 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\boldsymbol \rho} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if11 \macc@nested@a\relax111{\boldsymbol \rho} \else \def\gobble@till@marker#\boldsymbol \rho\endmarker{} \futurelet\gobble@till@marker\boldsymbol \rho\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \fi }}{ \setbox0\hbox{${\mathaccent"0362{\boldsymbol \rho}}^H$} \setbox2\hbox{${\mathaccent"0362{\kern0pt\boldsymbol \rho}}^H$} \ifdim\ht0=\ht2 \begingroup \def\mathaccent#\boldsymbol \rho#1{ \let\mathaccent\save@mathaccent \if22 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if21 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern1 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\boldsymbol \rho} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if21 \macc@nested@a\relax111{\boldsymbol \rho} \else \def\gobble@till@marker#\boldsymbol \rho\endmarker{} \futurelet\gobble@till@marker\boldsymbol \rho\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \else \begingroup \def\mathaccent#\boldsymbol \rho#1{ \let\mathaccent\save@mathaccent \if12 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if11 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern1 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\boldsymbol \rho} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if11 \macc@nested@a\relax111{\boldsymbol \rho} \else \def\gobble@till@marker#\boldsymbol \rho\endmarker{} \futurelet\gobble@till@marker\boldsymbol \rho\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \fi },\@ifnextchar^{{ \setbox0\hbox{${\mathaccent"0362{\mathbf{D}}}^H$} \setbox2\hbox{${\mathaccent"0362{\kern0pt\mathbf{D}}}^H$} \ifdim\ht0=\ht2 \begingroup \def\mathaccent#\mathbf{D}#0{ \let\mathaccent\save@mathaccent \if22 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if21 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern0 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{D}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if21 \macc@nested@a\relax111{\mathbf{D}} \else \def\gobble@till@marker#\mathbf{D}\endmarker{} \futurelet\gobble@till@marker\mathbf{D}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \else \begingroup \def\mathaccent#\mathbf{D}#0{ \let\mathaccent\save@mathaccent \if12 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if11 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern0 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{D}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if11 \macc@nested@a\relax111{\mathbf{D}} \else \def\gobble@till@marker#\mathbf{D}\endmarker{} \futurelet\gobble@till@marker\mathbf{D}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \fi }}{ \setbox0\hbox{${\mathaccent"0362{\mathbf{D}}}^H$} \setbox2\hbox{${\mathaccent"0362{\kern0pt\mathbf{D}}}^H$} \ifdim\ht0=\ht2 \begingroup \def\mathaccent#\mathbf{D}#1{ \let\mathaccent\save@mathaccent \if22 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if21 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern1 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{D}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if21 \macc@nested@a\relax111{\mathbf{D}} \else \def\gobble@till@marker#\mathbf{D}\endmarker{} \futurelet\gobble@till@marker\mathbf{D}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \else \begingroup \def\mathaccent#\mathbf{D}#1{ \let\mathaccent\save@mathaccent \if12 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if11 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern1 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{D}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if11 \macc@nested@a\relax111{\mathbf{D}} \else \def\gobble@till@marker#\mathbf{D}\endmarker{} \futurelet\gobble@till@marker\mathbf{D}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \fi }_{\boldsymbol \rho})$, where $\@ifnextchar^{{ \setbox0\hbox{${\mathaccent"0362{\boldsymbol \rho}}^H$} \setbox2\hbox{${\mathaccent"0362{\kern0pt\boldsymbol \rho}}^H$} \ifdim\ht0=\ht2 \begingroup \def\mathaccent#\boldsymbol \rho#0{ \let\mathaccent\save@mathaccent \if22 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if21 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern0 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\boldsymbol \rho} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if21 \macc@nested@a\relax111{\boldsymbol \rho} \else \def\gobble@till@marker#\boldsymbol \rho\endmarker{} \futurelet\gobble@till@marker\boldsymbol \rho\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \else \begingroup \def\mathaccent#\boldsymbol \rho#0{ \let\mathaccent\save@mathaccent \if12 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if11 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern0 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\boldsymbol \rho} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if11 \macc@nested@a\relax111{\boldsymbol \rho} \else \def\gobble@till@marker#\boldsymbol \rho\endmarker{} \futurelet\gobble@till@marker\boldsymbol \rho\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \fi }}{ \setbox0\hbox{${\mathaccent"0362{\boldsymbol \rho}}^H$} \setbox2\hbox{${\mathaccent"0362{\kern0pt\boldsymbol \rho}}^H$} \ifdim\ht0=\ht2 \begingroup \def\mathaccent#\boldsymbol \rho#1{ \let\mathaccent\save@mathaccent \if22 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if21 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern1 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\boldsymbol \rho} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if21 \macc@nested@a\relax111{\boldsymbol \rho} \else \def\gobble@till@marker#\boldsymbol \rho\endmarker{} \futurelet\gobble@till@marker\boldsymbol \rho\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \else \begingroup \def\mathaccent#\boldsymbol \rho#1{ \let\mathaccent\save@mathaccent \if12 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if11 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern1 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\boldsymbol \rho} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if11 \macc@nested@a\relax111{\boldsymbol \rho} \else \def\gobble@till@marker#\boldsymbol \rho\endmarker{} \futurelet\gobble@till@marker\boldsymbol \rho\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \fi }$ and $\@ifnextchar^{{ \setbox0\hbox{${\mathaccent"0362{\mathbf{D}}}^H$} \setbox2\hbox{${\mathaccent"0362{\kern0pt\mathbf{D}}}^H$} \ifdim\ht0=\ht2 \begingroup \def\mathaccent#\mathbf{D}#0{ \let\mathaccent\save@mathaccent \if22 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if21 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern0 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{D}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if21 \macc@nested@a\relax111{\mathbf{D}} \else \def\gobble@till@marker#\mathbf{D}\endmarker{} \futurelet\gobble@till@marker\mathbf{D}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \else \begingroup \def\mathaccent#\mathbf{D}#0{ \let\mathaccent\save@mathaccent \if12 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if11 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern0 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{D}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if11 \macc@nested@a\relax111{\mathbf{D}} \else \def\gobble@till@marker#\mathbf{D}\endmarker{} \futurelet\gobble@till@marker\mathbf{D}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \fi }}{ \setbox0\hbox{${\mathaccent"0362{\mathbf{D}}}^H$} \setbox2\hbox{${\mathaccent"0362{\kern0pt\mathbf{D}}}^H$} \ifdim\ht0=\ht2 \begingroup \def\mathaccent#\mathbf{D}#1{ \let\mathaccent\save@mathaccent \if22 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if21 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern1 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{D}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if21 \macc@nested@a\relax111{\mathbf{D}} \else \def\gobble@till@marker#\mathbf{D}\endmarker{} \futurelet\gobble@till@marker\mathbf{D}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \else \begingroup \def\mathaccent#\mathbf{D}#1{ \let\mathaccent\save@mathaccent \if12 \let\macc@nucleus \fi \setbox\z@\hbox{$\macc@style{\macc@nucleus}_$} \setbox\tw@\hbox{$\macc@style{\macc@nucleus}_$} \dimen@\wd\tw@ \advance\dimen@-\wd\z@ \divide\dimen@ 3 \@tempdima\wd\tw@ \advance\@tempdima-\scriptspace \divide\@tempdima 10 \advance\dimen@-\@tempdima \ifdim\dimen@>\z@ \dimen@0pt\fi \kern0.6\dimexpr\macc@kerna\kern-\dimen@ \if11 \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\macc@nucleus\kern0.4\dimexpr\macc@kerna\kern\dimen@} \advance\[email removed]\dimexpr\macc@kerna \let\final@kern1 \ifdim\dimen@<\z@ \let\final@kern1\fi \if\final@kern1 \kern-\dimen@\fi \else \overline{\kern-0.6\dimexpr\macc@kerna\kern\dimen@\mathbf{D}} \fi } \macc@depth\@ne \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax} \macc@set@skewchar\relax \let\mathaccentV\macc@nested@a \if11 \macc@nested@a\relax111{\mathbf{D}} \else \def\gobble@till@marker#\mathbf{D}\endmarker{} \futurelet\gobble@till@marker\mathbf{D}\endmarker \ifcat\noexpand A\else \def{} \fi \macc@nested@a\relax111{} \fi \endgroup \fi }_{\boldsymbol \rho}$ are the mean and covariance matrix. Moreover, we use inverse-gamma distributions for $f(\boldsymbol \lambda;\nu_{\lambda},S_{\lambda})$.
Recall that we consider three specifications for time-varying volatility, $\boldsymbol \omega$. In the first specification, the log-volatility $\mathbf{h}$ follows an AR(1) process with an autoregressive coefficient $\phi$ and corresponding innovations $\sigma_h^2$. We use a normal distribution for $\mathbf{h}$, a truncated normal on $(-1, 1)$ for $\phi$ and an inverse-gamma distribution for $\sigma_h^2$.
The optimal hyperparameters for the truncated normal and inverse-gamma distributions can be conveniently estimated via maximum likelihood estimation. However, handling $\mathbf{h}$ presents challenges. In specific, if we use a normal importance sampling density of the form $\mathcal{N}(\widehat{\mathbf{h}},\mathbf{K}_{\mathbf{h}}^{-1})$, one can obtain $\widehat{\mathbf{h}}$ and $\mathbf{K}_{\mathbf{h}}^{-1}$ analytically, where $\mathbf{K}_{\mathbf{h}}$ is a $T\times T$ full matrix. This approach has two key drawbacks. First, sampling from a Gaussian density with large full covariance matrix is computationally intensive. Second, in $\mathbf{K}_{\mathbf{h}}$ there are $T(T+1)/2$ parameters to be estimated. This means that a large number of posterior draws is needed to ensure accurate estimation.
To address these problems, we follow chan2023comparing and impose a restricted family of Gaussian density that exploits an AR process for the latent states $\mathbf{h}$, which includes the prior density of $\mathbf{h}$ in (ref) as a special case. This restriction significantly reduces the parameter space from $T+T(T+1)/2$ to $2T+1$. Furthermore, this specification allows for analytical solutions for the autoregressive coefficients in the AR process, making the mean and covariance matrix of the normal importance sampling density straightforward to obtain. We refer the reader to chan2023comparing for further details.
For the outlier components $\mathbf{o}$, we employ a discrete distribution over a predefined grid during estimation.\footnote{Following carriero2024addressing, we use $(1,20)$ as the support (grid) for $\mathbf{o}$.} As a result, the probability of each grid point can be computed using the posterior draws of $\mathbf{o}$. We then use the beta distribution for the the outlier probability $p_{\mathbf{o}}$. For the fat-tailed innovations, we adopt an inverse-gamma distribution for $q_t^2$. Further details on the procedure can be found in Supplemental Appendix Section (ref).
In this section, we first assess the accuracy of the factor estimates by comparing them to their true values across datasets of varying sizes. Then, we evaluate whether the marginal likelihood estimator can accurately identify the true model.
The data are generated according to (ref) and (ref) with $q = 1$. The parameters are drawn as follows: the free parameters in $\mathbf{A}$ and $\mathbf{B}$ are drawn from the uniform distribution, $\mathcal{U}(0,1)$, and $\rho_{j,k}$ is drawn from $\mathcal{U}(0.8,0.9)$ for $j = 1,\ldots,p_1$, $k = 1,\ldots,p_2$. We set $\boldsymbol \Sigma_c$ to $0.3\mathbf{I}_k$, $\boldsymbol \Sigma_r$ to $0.5\mathbf{I}_n$, and $\lambda_{j,k}^2$ to 1 for $j = 1,\ldots,p_1$, $k = 1,\ldots,p_2$. To assess the accuracy of our factor estimates, we consider sample sizes $(n, k)\in\{(10, 10), (20, 15), (30, 20)\}$ and observation lengths $T\in\{200, 500, 1000\}$. The factor matrices are preset to dimensions $(p_1, p_2) = (3,2)$ or $(p_1, p_2) = (5,5)$.
For models with smaller factor matrix ($p_1 = 3$ and $p_2 = 2$), we use a Gibbs sampling chain of 10,000 iterations after 5,000 burn-in draws. For larger factor matrix orders ($p_1 = 5, p_2 = 5$), we extend the sampling chain to 20,000 iterations after 10,000 burn-in draws.\footnote{We found that for $p_1 = 3, p_2 = 2$, convergence is typically achieved within 5,000 burn-in draws, even with initial factor values drawn randomly from a standard normal distribution. However, when the dimension of the factor matrix is large ($p_1 = p_2 = 5$), setting proper initial values is crucial to shorten the Markov chain. Estimates from a VDFM (1,000 posterior draws after 1,000 burn-in draws) work well as initial values. Geweke statistics are computed to ensure the convergence of Markov chains.} We calculate the posterior mean as the point estimate for the factors and compare these to the true factors. Specifically, we project the true factors onto the estimates to obtain adjusted $R^2$ values for each factor series in the factor matrix.
Figure (ref)--(ref) represent the adjusted $R^2$ for $(p_1, p_2) = (3,2)$ and $(p_1, p_2) = (5,5)$, respectively. Each row corresponds to a different sample size.\footnote{For example, the first row represents $(n, k) = (10, 10)$, while the second row represents $(20, 15)$.} Each column represents a different length of observations with the first column corresponding to $T = 200$. Each color block represents the adjusted $R^2$ for a specific element in the factor matrix. For instance, the upper-left block of the first subplot in Figure (ref) corresponds to the adjusted $R^2$ from regressing the true value of $f_{1,1,.}$ on the estimates $\widehat{f}_{1,1,.}$, for $(n,k,T) = (10, 10, 200)$.
The color intensity in these figures reflects the magnitude of the adjusted $R^2$; darker colors indicate higher values. For better visualization, the minimum of the color axis is set to 0.9, as the smallest adjusted $R^2$ we have obtained is 0.91. More details on the adjusted $R^2$s are provided in Supplemental Appendix Section (ref).
Overall, our factor estimates closely match the true values. Moreover, a comparison across columns reveals that larger observation lengths $T$ yield better estimates. A comparison across rows shows that larger sample sizes lead to more accurate estimates. Comparing the two figures, it is evident that smaller factor matrix dimensions result in better estimates. These findings suggest that increasing the number of observations and sample size improves the accuracy of factor estimates. This is in line with the theory in VDFM and static matrix factor model.\footnote{See, e.g., bai2003inferential for inferential theory in vectorized factor model and chen2023statistical for that in static matrix factor model.}
To evaluate the performance of the marginal likelihood estimator in correctly identifying the true dimension of the factor matrix, we estimate log marginal likelihoods for models with a variety of combinations of $(p_1,p_2)$. Specifically, we use four datasets from Section (ref):
For datasets with a true dimension of factor matrix: $(p_1, p_2) = (3,2)$, we estimate models with $p_1$ and $p_2$ ranging from 1 to 5. For datasets with a true dimension of $(5,5)$, we estimate models with $p_1$ and $p_2$ ranging from 3 to 7.
Figures (ref) presents the estimates for log marginal likelihoods for the four datasets. Two key findings are noteworthy. First, in all the four datasets, the estimates correctly identify the true order; that is, the estimates are the largest when $(p_1, p_2)$ are set to their true values. Second, the log marginal likelihood estimates exhibit a consistent pattern. Before the true order is reached, the estimates increase monotonically, reflecting an improving model fit. After reaching the true order, the estimates decrease monotonically, indicating that additional factors do not contribute significantly to the model fit and may introduce overfitting. For example, when true order is $(p_1, p_2) = (3,2)$, the sequence $\log \widehat{p}(\mathbf{y}\:\vert\:p_1 = 1)<\log \widehat{p}(\mathbf{y}\:\vert\:p_1 = 2) < \log \widehat{p}(\mathbf{y}\:\vert\:p_1 = 3)$ and $\log \widehat{p}(\mathbf{y}\:\vert\:p_1 = 3) > \log \widehat{p}(\mathbf{y}\:\vert\:p_1 = 4)>\log \widehat{p}(\mathbf{y}\:\vert\:p_1 = 5)$ is observed. Similarly, $\log \widehat{p}(\mathbf{y}\:\vert\:p_2 = 1)<\log \widehat{p}(\mathbf{y}\:\vert\:p_2 = 2) $ and $\log \widehat{p}(\mathbf{y}\:\vert\:p_2 = 2) > \log \widehat{p}(\mathbf{y}\:\vert\:p_2 = 3)>\log \widehat{p}(\mathbf{y}\:\vert\:p_2 = 4)>\log \widehat{p}(\mathbf{y}\:\vert\:p_2 = 5)$.
In this subsection, we examine the ability of the marginal likelihood estimator to correctly identify the underlying factor structure. Specifically, we generate data from two types of dynamic factor models: a VDFM defined in Equations (ref) and an MDFM. When the true model is VDFM, the free elements in loading matrix $\mathbf{M}$ are randomly drawn from a uniform distribution $\mathcal{U}(-1,1)$, and the error covariance matrices for $\boldsymbol \varepsilon_t$ and $\boldsymbol \nu_t$ are set to identity matrices. The autoregressive coefficients in the factor evolution equation are drawn from a uniform distribution $\mathcal{U}(0.7, 0.95)$. When the true model is MDFM, the free elements in the two loading matrices $\mathbf{A}$ and $\mathbf{B}$ are drawn from the uniform distribution $\mathcal{U}(0,1)$, the row-wise and column-wise covariance matrices $\boldsymbol \Sigma_r$ and $\boldsymbol \Sigma_r$ are $0.5\mathbf{I}_n$ and $0.3\mathbf{I}_n$, respectively. The autoregressive coefficients in the factor evolution equation are drawn from $\mathcal{U}(0.8,0.9)$. The covariance matrices for factor evolution equation are identity matrices.
First, we generate data using the MDFM with factor matrices of sizes $(1 \times 2)$, $(2 \times 1)$, and $(2 \times 2)$, and estimate the marginal likelihood of each (true) model. Then we compare these marginal likelihoods with those of VDFMs specified with $k_f = 1, 2, \ldots, 6$ factors, where $k_f$ denotes the number of factors in the VDFM. Figure (ref) shows the log marginal likelihood estimates under different model specifications. The left, middle, and right panels correspond to MDFMs with $(p_1, p_2) = (1,2)$, $(2,1)$, and $(2,2)$, respectively. The black line shows the log marginal likelihood estimates for the VDFMs, while the red dashed line indicates the marginal likelihood of the true MDFM.
The results clearly show that the marginal likelihood for the true model (MDFM) is higher than for any of the VDFM alternatives. Interestingly, the VDFM achieves its highest marginal likelihood when its number of factors matches the total number of factors in the corresponding MDFM. For instance, the VDFM performs best when $k_f = 2$ for MDFMs with $(p_1, p_2) = (1,2)$ and $(2,1)$, and when $k_f = 4$ for $(p_1, p_2) = (2,2)$.
Next, we generate data from the VDFM with $k_f \in {1, 2, 3}$ and estimate the log marginal likelihood for each true model. We compare these values with those from MDFMs with $(p_1, p_2) \in {(1,1), (1,2), (2,1), (2,2)}$. Figure (ref) presents the log marginal likelihood estimates under different model specifications. The left, middle, and right panels correspond to VDFMs with $k_f = 1$, $2$, and $3$, respectively. The black dashed line indicates the log marginal likelihood of the true VDFM, while the bars represent those of the competing MDFMs. In all three cases, the true model achieves a higher marginal likelihood than the alternatives.
In this subsection, we investigate whether the marginal likelihood estimator can correctly identify the structure of the idiosyncratic components. Specifically, we assess whether the estimator can distinguish an exact matrix factor model (i.e., without stochastic volatility or cross-sectional correlations) from approximate alternatives. To this end, we generate 100 datasets from the following models:
MDFM-exact: A matrix factor model with a diagonal covariance matrix and no stochastic volatility.
MDFM-cross: A matrix factor model with a Kronecker-structured covariance matrix and no stochastic volatility.
MDFM-sv: A matrix factor model with a diagonal covariance matrix and a common stochastic volatility.
The free elements in the two factor loading matrices $\mathbf{A}$ and $\mathbf{B}$ are drawn from a normal distribution $\mathcal{N}(0,0.3^2)$. The row-wise and column-wise covariance matrices are drawn from inverse-Wishart distributions: $\boldsymbol \Sigma_r \sim \mathcal{IW}(n+2, \mathbf{I}_n)$ and $\boldsymbol \Sigma_c \sim \mathcal{IW}(k+2, \mathbf{I}_k)$. The log-volatility follows an AR(1) process with an autoregressive coefficient of 0.97 and innovation variance 0.1. The covariance matrix in the factor evolution equation is $0.1 \mathbf{I}_{p_1p_2}$, and the AR coefficients are drawn from $\mathcal{U}(0.8, 0.9)$.
We generate 100 datasets with dimensions $(n, k, T) = (20, 20, 100)$. The dimension of the factor matrix $(p_1, p_2) = (2,2)$. For each dataset, we estimate the log marginal likelihoods under the MDFM-exact, MDFM-cross and MDFM-sv specifications. Then we subtract the log marginal likelihood of the true model from those of the competing models. A negative value indicates that the marginal likelihood is larger for the true model.
Figure (ref) shows boxplots of the differences in log marginal likelihoods relative to the true model. The left, middle and right panel corresponds to cases where the true model is MDFM-exact, MDFM-cross, and MDFM-sv, respectively. In all cases, the true model achieves the highest marginal likelihood, suggesting that the estimator effectively identifies the correct structure in the idiosyncratic component.
In this section, we demonstrate the usefulness of the Bayesian matrix dynamic factor models with two applications. In the first application, we use a multinational macroeconomic panel, while in the second application, we use the Fama-French $10\times 10$ panel. The optimal factor structure is determined using the proposed marginal likelihood estimator.
We apply the matrix dynamic factor model to the macroeconomic panel constructed from OECD database. The dataset comprises 10 quarterly indicators of 19 countries from 1995.Q1 to 2023.Q3 for 115 quarters. The countries include developed economies from North America, Europe, Asia and Oceania. The indicators include real GDP, price indices, labor unit cost, unemployment, international trade and household consumption. Each time series is adjusted for stationarity through first differencing or logarithmic differencing, and standardized by demeaning and dividing by their standard deviations. Detailed descriptions of the dataset and transformation methods are provided in the Supplemental Appendix Section (ref).
While theoretically one could compute marginal likelihood estimates to assess different orders of countries and variables, this approach is computationally intensive due to the large number of combinations. For this reason, we prioritize the global and regional economic significance of countries and the relationships among variables when ordering the data. Particularly, in terms of countries, we order the US the first, due to its status as the largest economy and its significant influence on the global economy. The UK, Australia, Germany and Japan follow, due to their significant position in the corresponding regional economy. Among the indicators, real GDP is prioritized as it serves as the critical measure of real economic activity, following by Headline CPI, given its importance as a key inflation indicator closely tied to price dynamics. We put labor unit cost the third, since it is crucial for insights into productivity.
We then employ the method for marginal likelihood estimation introduced in Section (ref) to determine the optimal factor structure. Tables (ref)--(ref) report the log marginal likelihood estimates for VDFMs and MDFMs. Comparing the VDFM without stochastic volatility to its counterpart with common stochastic volatility (the left and right panel of Table (ref)), we find that the data strongly favor the inclusion of stochastic volatility. A similar pattern is observed for the MDFMs (in Table (ref)). Additionally, the results indicate that the model with cross-sectional correlation is preferred over the exact one, suggesting that accounting for both cross-sectional correlation and time-varying volatility leads to improved model performance. Notably, the marginal likelihood for the VDFM is maximized with five factors, while the approximate MDFM achieves a better fit with a more parsimonious $1 \times 2$ factor matrix $\mathbf{F}_t$. This suggests that ignoring the matrix structure can lead to overestimation of the number of factors in VDFM. The $1\times 2$ factor matrix implies that the variation is larger across indicators than across countries.
The latent structure of the global macroeconomy can be interpreted through the estimated row and column factor loading matrices. We sort these estimates and compute the posterior probabilities that the differences between neighboring values are greater than 0. We then group countries and indicators by comparing these posterior probabilities against a 0.9 threshold: when the probability exceeds 0.9, it indicates that the neighboring values are significantly different, so they are placed in separate groups.
Figure (ref) displays the bar plot of sorted estimates for $\widehat{\mathbf{A}}$.\footnote{Since the factor matrix has only one row, $\mathbf{A}$ is effectively a $19 \times 1$ vector. However, we retain the notation $\mathbf{A}$ for consistency.}The 19 countries are grouped into four categories: (1) Japan; (2) seven European countries and Korea; (3) six other European countries along with two Oceania countries; and (4) two North American countries. The fact that the two North American countries fall into the same group suggests that geographic proximity influences the grouping, but geography is clearly not the only factor. For example, Japan and Korea are placed in different groups, while Oceania and several European countries are grouped together.
Figure (ref) contains two rows of subplots. The first row presents bar plots of sorted estimates for $\widehat{\mathbf{B}}$, while the second row shows factor estimates and their 90% credible intervals. Notably, the first factor representing the real economic activity clearly capture the 2008 Great Recession and the disruptions caused by the COVID-19 pandemic, though the early 2000s recession is less pronounced. The second factor captures price dynamics, but do not directly affect the real output as measured by real GDP. Figure (ref) compares the four-quarter moving average of the second factor estimates with the moving average of growth rates of Brent crude oil price. The comovement between the two series is evident, particularly during periods of significant events such as the 2002--2003 Iraq war and civil unrest in Venezuela, the 2008--2009 Great Recession and OPEC's production cuts, the 2014--2016 oil price collapse and the 2022 Russian invasion of Ukraine.
Based on the first column of the factor loading matrix ($\mathbf{b}_1$), the ten variables are grouped into four clusters: Group 1 (unemployment), Group 2 (food CPI and core CPI), Group 3 (real GDP, energy CPI, headline CPI, and household consumption), and Group 4 (imports, labor unit cost, and exports). The real activity factor has stronger impacts on international trade and labor unit cost, while also having a positive, albeit less pronounced, impact on consumption, headline CPI, and energy CPI. However, its effects on core CPI and food CPI are not statistically significant. Additionally, it negatively affects unemployment.
The second column of the factor loading matrix ($\mathbf{b}_2$) organizes the variables into a different set of four clusters: Group 1 (core CPI, household consumption, food CPI, and unemployment), Group 2 (imports, labor unit cost, and exports), Group 3 (headline CPI), and Group 4 (energy CPI). The price factor has strong positive impacts on energy prices, with less effect on labor unit cost and international trade. It has statistically insignificant positive effects on core CPI and negative effects on consumption, food CPI, and unemployment.
Figure (ref) presents the estimates for stochastic volatility and their standard deviations. The high volatility around 1997 reflects the turbulence of the Asian financial crisis, particularly in Japan and Korea. Expectedly, increased volatility is also observed during the Great Recession and the COVID-19 pandemic.
Figure (ref)--(ref) are heatmaps of estimates for column-wise and row-wise covariance matrix in the idiosyncratic component. From Figure (ref), it is obvious that headline CPI is positively correlated with its disaggregated components: energy CPI, core CPI and food CPI. In addition, unemployment is negatively correlated with real GDP, labor unit cost, consumption, core CPI and imports. Labor unit cost is positively correlated with both exports and imports. In Figure (ref), we can see that idiosyncratic risks for countries in European Union are correlated, including Germany, France, Norway, Netherlands, Austria, Denmark, Spain, Finland, Sweden, Luxembourg, Italy and Portugal. UK is weakly correlated to EU as well.
In this application, we investigate the usefulness of the dynamic matrix factor model on the Fama-French return series, which was studied by wang2019factor, yu2022projected and he2024matrix. The data include monthly returns of 100 portfolios, structured in a 10 by 10 matrix according to ten levels of sizes (market equity) and ten levels of ratio of book equity to market equity (BE/ME).\footnote{The data is available at \url{http://mba.tuck.dartmouth.edu/pages/faculty/ken.french/data_library.html}.} The return series span from January 1990 to June 2024 (414 observations).\footnote{We do not include data earlier than 1990 because there are many missing values in the early years.} Following chang2023modelling, we impute the missing values by the weighted averages of the three previous months, i.e., set $y_{i,j,t} = 0.5y_{i,j,t-1} + 0.3y_{i,j,t-2}+0.2y_{i,j,t-3}$ for missing $y_{i,j,t}$. To account for market conditions, we follow wang2019factor, yu2022projected, and he2024matrix and subtract the monthly excess market return from each series. We then standardize the data by subtracting the mean and dividing by the standard deviation. The standardized market-adjusted return series of the portfolios can be found in Supplemental Appendix Section (ref).
Empirical evidence shows that small-cap stocks tend to earn higher average returns than large-cap stocks, while value stocks (high BE/ME) tend to outperform growth stocks (low BE/ME). To account for these cross-sectional return patterns, fama1992cross introduce the Small Minus Big (SMB) and High Minus Low (HML) factors to explain return variations across stocks with varying size and book-to-market ratios. Motivated by this framework, we reorder the size and BE/ME ratios in the data matrix. Specifically, portfolios are ordered by size across rows, with small-cap (SMALL) portfolios listed first, followed by medium-cap (ME5), and then large-cap (BIG) portfolios. Similarly, columns are arranged by book-to-market ratio, with high BE/ME (HiBM) portfolios on the left, followed by medium (BM5), and then low BE/ME (LoBM) portfolios.
Table (ref)--(ref) report the log marginal likelihood estimates for both VDFMs and MDFMs. The results clearly indicate a strong preference for models with stochastic volatility, regardless of whether the VDFM or MDFM is used. Additionally, a comparison between the MDFM-exact and MDFM-cross reveals that accounting for cross-sectional correlation in idiosyncratic component further improves model performance. Among the MDFM specifications, the $2 \times 2$ MDFM with both cross-sectional correlation and stochastic volatility achieves the highest marginal likelihood (–42,951), although it remains slightly lower than that of the 4-factor VDFM (–42,943). The best overall performance is attained by the 5-factor VDFM with stochastic volatility, which yields a marginal likelihood of –42,877. These results suggest that the data favor the more flexible VDFM specification over the more structured MDFM, despite the marginal likelihood's built-in penalty for model complexity. For illustration, we use the MDFM with a factor matrix of dimensions $(p_1, p_2) = (2, 2)$ and stochastic volatility in the subsequent analysis.
Figure (ref) shows the estimates for row loading matrices (the first and second panel from left) and column loading matrices (the third and fourth panel). In specific, the two subplots correspond to $\widehat{\mathbf{A}}_{.,1}$ (first), $\widehat{\mathbf{A}}_{.,2}$ (second), $\widehat{\mathbf{B}}_{.,1}$ (third) and $\widehat{\mathbf{B}}_{.,2}$ (fourth). Both the size (row) loadings and the BE/ME (column) loadings have shown cross-sectional patterns. Particularly, the small-cap factor exerts a strong influence on smaller portfolios, with its impact gradually decreasing as portfolio size increases, eventually turning negative for large-size portfolios. The medium-cap factor similarly influence portfolios with similar sizes, with its influence tapering off as the portfolio size shifts either smaller or larger. Similar patterns go for BE/ME factors.
Figure (ref) shows estimated posterior densities, histograms of posterior draws, priors, as well as the posterior estimates of autoregressive coefficients ($\boldsymbol \rho$) for the factor evolution process. All the six posterior densities have little mass on value 0, and the posterior estimates are around 0.2 or 0.3. This suggests that an AR process for factor evolution is supported by the data.
Figure (ref) shows the estimates and standard deviations of stochastic volatility for stock returns over time. Clearly, the volatility of stock returns exhibits considerable variation throughout the observed period. Notably, the volatility peaks around February 2000, about one month before the onset of the dot-com bubble burst. Additionally, significant spikes in volatility are observed during the 2008 financial crisis and the COVID-19 pandemic.
In this paper, we propose a new class of dynamic factor models tailored to high-dimensional matrix-valued time series, incorporating cross-sectional correlations in the idiosyncratic components, time-varying volatility and outlier adjustments. We develop an MCMC algorithm for Bayesian estimation and introduce an importance-sampling estimator for the marginal likelihood to facilitate Bayesian model comparison. Monte Carlo simulations demonstrate the accuracy of the factor estimates and the ability of the marginal likelihood estimator to correctly identify the true model. Applications to macroeconomic and Fama-French panels highlight the model’s ability to uncover interesting structures in high-dimensional data.
This research opens several avenues for future work. First, a structural matrix factor model could be developed to study the transmission of shocks across countries. Second, it would be valuable to assess the forecasting performance of matrix factor models compared to traditional approaches using vectorized panels. Finally, the current specification requires the number of factors to match the product of the matrix dimensions; a sparse matrix factor model could be designed to automatically select the most relevant latent factors.