Bayesian Matrix Factor Models for Demographic Analysis Across Age and Time Gregor Zens Abstract Analyzing demographic data collected across multiple populations, time periods, and age groups is challenging due to the interplay of high dimensionality, demographic heterogeneity among groups, and stochastic variability within smaller groups. This paper proposes a Bayesian matrix factor model to address these challenges. By factorizing count data matrices as the product of low-dimensional latent age and time factors, the model achieves a parsimonious representation that mitigates overfitting and remains computationally feasible even when hundreds of subpopulations are involved. Smoothness in age factors and a dynamic evolution of time factors are achieved through informative priors, and an efficient Markov chain Monte Carlo algorithm is developed for posterior inference. Applying the model to Austrian district-level emigration data from 2002 to 2023 demonstrates its ability to reconstruct demographic processes using only a fraction of the parameters required by conventional factor models. Extensive cross-validation and out-of-sample forecasting exercises show that the proposed matrix factor model consistently outperforms standard benchmarks. Beyond statistical demography, the framework holds promise for a wide range of applications involving noisy, heterogeneous, and high-dimensional non-Gaussian matrix-valued data. Keywords: Bayesian Matrix Factorization; Statistical Demography; Non-Gaussian Data; High-Dimensional Statistics; Markov Chain Monte Carlo 1 Introduction High-dimensional demographic data, covering both age and time dimensions across numerous subpopulations, are becoming increasingly common. Typical examples include subnational counts describing fertility, mortality, or migration patterns, often recorded annually and by single year age groups. Statistical models of such fine-grained demographic data are used to forecast and track demographic trends over time, in support of population projections and regional planning exercises. When considering many subpopulations, modeling such multidimensional data is challenging due to the interplay of high dimensionality, heterogeneity across groups and stochastic variation in small groups. Demographic models must balance robustness to random fluctuations with flexibility to capture genuine demographic heterogeneity. In addition, modern demographic models must be computationally efficient, as datasets may include up to hundreds or thousands of subpopulations. Developing a Bayesian framework for such multidimensional, heterogeneous, and noisy non-Gaussian data is the aim of this article. As a motivating example, Fig. 1 shows a subset of emigration count data from Austria, disaggregated by political district, age, sex, and year. A detailed description of the full dataset will be given later. The small size of some subpopulations makes it difficult to separate meaningful demographic heterogeneity from noise based on the raw data alone. In such contexts, reliable conclusions and deeper insights into demographic processes typically require model-based approaches. Fig. 1 : Selected emigration counts by age (x-axis) and year (color) for six subpopulations, stratified by sex (rows) and district of origin (columns). One family of models that has proven useful in this context is based on the idea of low-rank approximations, including approaches that rely on singular value decompositions (SVDs) or parametric factor models. Because demographic processes typically exhibit certain regularities across age and time, large data sets can often be described with reasonable accuracy using a small number of latent factors. Examples of such models include the SVD-based approaches of Lee and Carter, 1992 , Alexander et al., 2017 , Clark, 2019 , and related Bayesian frameworks ( Czado et al., 2005 ; Wiśniowski et al., 2015 ; Zens, 2024 ). A key issue with low-rank factorizations is that the number of parameters can grow rapidly when considering data measured by age, time, and in many subpopulations. This leads to computational challenges and concerns about overfitting and statistical inefficiency. To address these issues, this article considers a matrix factor model that allows for a more parsimonious representation of demographic processes. Data recorded by age and time are treated as matrix-valued observations, measured for each subpopulation of interest. Each age-time matrix is decomposed into sets of latent age and time factors that are combined multiplicatively using subpopulation-specific loadings matrices. This approach significantly reduces the number of free parameters, facilitates strong information sharing across groups, and allows for sufficient flexibility to capture genuine demographic heterogeneity. The model is developed within a Bayesian framework, which allows for fully probabilistic inference and straightforward handling of non-Gaussian data. Informative priors enforce smoothing of the age factors and allow for a dynamic evolution of the time factors. The prior setup reflects theoretical insights, provides further robustness against overfitting, and accommodates probabilistic forecasting. An efficient Markov chain Monte Carlo (MCMC) algorithm is developed for posterior simulation. The presented modeling framework and algorithms contribute to the literature on Bayesian demography ( Raftery et al., 2014 ; Shang et al., 2016 ; Bijak and Bryant, 2016 ; Bryant and Zhang, 2018 ; Alexander and Raftery, 2024 ), Bayesian factor modeling ( Aguilar and West, 2000 ; Bhattacharya and Dunson, 2011 ; Conti et al., 2014 ; Frühwirth-Schnatter et al., 2024 ), and more broadly to application areas facing similar challenges in modeling sets of heterogeneous, noisy, and potentially non-Gaussian matrix-valued data. The model is applied to annual data on age- and sex-specific emigration patterns in the political districts of Austria, covering the period from 2002 to 2023. Results suggest that the model achieves a balance between flexibility and robustness, mitigates overfitting concerns, and accurately captures complex patterns using only a fraction of the number of parameters of classical factor models. Pseudo out-of-sample evaluations based on cross-validation and forecasting exercises show that the model outperforms various benchmarks despite the reduced number of parameters, further highlighting the merits of the proposed approach. The remainder of the article is structured as follows. Section 2 gives an overview of applications of low-rank factorizations in previous statistical demographic work. Section 3 introduces the proposed matrix factor model, discusses prior choices and posterior simulation using MCMC. Section 4 presents the real data application, as well as the pseudo out-of-sample predictive exercises. Section 5 provides concluding remarks and a discussion on extensions as well as possible future research pathways. 2 Low-Rank Factorizations in Statistical Demography The family of low-rank models, such as those based on SVD or parametric factor models, has been successfully applied in empirical demography for decades. Their success stems from the fact that demographic processes typically exhibit strong regularities due to their direct link to biological processes (when considering fertility and mortality patterns) and to life course events (when considering migration patterns). Common underlying information that is relevant in most settings, such as increasing mortality risk at older ages, or peak fertility and migration activity between the ages of 20 and 30, can be efficiently extracted into a set of latent underlying ‘age factors’ using statistical methods. Similarly, demographic patterns over time often show similarities when many populations are studied jointly, such as declining mortality patterns for all age groups or all subnational units considered. Such common variation can be effectively summarized in a small number of latent underlying ‘time factors’. For illustration, let y_{i,t,x} denote a demographic count outcome of interest in population i=1,\dots,N (e.g., subnational units), time period t=1,\dots,T and at age x=1,\dots,A . For simplicity, the demographic counts are assumed to arise from a Poisson distribution: y_{i,t,x}\sim\mathcal{P}(e^{z_{i,t,x}}). (1) When modeling such multidimensional data sets, typical low-rank approximation modeling strategies tend to follow one of two conceptual approaches. First, from a ‘time factorization’ point of view, the data is typically decomposed using a structure similar to z_{i,t,x}=\mathbf{\lambda}^{\prime}_{i,x}\mathbf{f}_{t}+\varepsilon_{i,t,x}\quad\quad\varepsilon_{i,t,x}\sim\mathcal{N}(0,\sigma^{2}). (2) In such models, the latent factors \mathbf{f}_{t} capture common variation over time, and the loadings \mathbf{\lambda}_{i,x} are estimated for each age and subpopulation. Typical examples of this perspective are the Lee-Carter model and its extensions ( Lee and Carter, 1992 ; Li and Lee, 2005 ; Wiśniowski et al., 2015 ), among others. Although this modeling approach is widely used, it requires estimation of the loadings \lambda_{i,x} for each combination of subpopulation and age. This neglects the fact that the observed variation across ages x and subpopulations i typically follows certain regularities. In addition, estimating a large number of loadings can increase the risk of overfitting and requires significant computational resources. Second, an ‘age factorization’ perspective can be taken, where common age patterns are summarized in a small number of underlying factors: z_{i,t,x}=\mathbf{\lambda}^{\prime}_{i,t}\mathbf{f}_{x}+\varepsilon_{i,t,x}\quad\quad\varepsilon_{i,t,x}\sim\mathcal{N}(0,\sigma^{2}). (3) In this model, the latent factors \mathbf{f}_{x} capture common variation across ages, and the loadings \mathbf{\lambda}_{i,t} are estimated for each age and subpopulation. Examples of such approaches include the hybrid SVD approaches of Alexander et al., 2017 , Clark, 2019 , and Dharamshi et al., 2025 , and the Bayesian functional factor approach of Zens, 2024 . This perspective requires estimating the loadings \mathbf{\lambda}_{i,t} separately for each time t and subpopulation i , neglecting that these loadings may be highly correlated across time and subpopulations. Of course, in both cases, these concerns can be partially mitigated by considering additional structure on the loadings elements, for example in the form of hierarchical or smoothing priors. In fact, this is a common modeling strategy, see for example Alexander et al., 2017 , Susmann et al., 2022 or Dharamshi et al., 2025 . However, in settings with many subpopulations, estimating the loadings \mathbf{\lambda} will still pose significant challenges in either factorization, irrespective of any hierarchical or smoothing structure. For example, considering an ‘age factorization’ of a US county-level dataset with N=3,244 , A=101 age groups measured over T=20 years, and extracting three age factors, requires estimating 3,244\times 20\times 3=194,640 loadings \mathbf{\lambda}_{i,t} . A ’time factorization’ of the same data set, based on three time factors, requires estimating 3,244\times 3\times 101=982,932 loadings \mathbf{\lambda}_{i,x} . Even with very strong hierarchical prior information on the behavior of the loadings, it is clear that such approaches have the potential to cause statistical inefficiency and a high computational demand. Especially in the presence of smoothing mechanisms that allow for information sharing across time and/or space, joint estimation of large parameter vectors or filtering/smoothing approaches for posterior simulation are typically required. This severely limits the scalability of existing statistical demography methods to high-dimensional data. 1 1 1 Of course, many alternative approaches not based on low-rank approximations have been proposed for the analysis of demographic data over age and time, for example based on smoothing splines, functional data approaches, or log-linear models ( Hyndman and Ullah, 2007 ; Bryant and Zhang, 2016 ; Camarda, 2019 ; Pavone et al., 2024 ). In multi-population settings, overparameterization and computational issues also become relevant in these frameworks. In this article, we address this issue by considering a model that combines both factorization perspectives and summarizes the shared information in both age and time dimensions simultaneously. The model is based on a factorization that relies on two sets of low-dimensional factors, one for age and one for time. This results in a low-dimensional representation of potentially very large datasets, while still allowing for efficient computational solutions and accurate recovery of the underlying demographic processes, even in the presence of noisy and highly heterogeneous data. 3 Matrix Factor Models for Age-Time Analysis We consider modeling count-valued 2 2 2 The considerations outlined in this article apply directly to Gaussian outcomes as well as to binomial and negative binomial likelihood structures, which can be approached via data augmentation approaches ( Pillow and Scott, 2012 ; Polson et al., 2013 ; Zens et al., 2024 ). observations y_{i,t,x} measured in population i , at time point t and at age x . The data are organized into N matrices of dimension T\times A , denoted as \mathbf{Y}_{i} , with elements y_{i,t,x} . The counts y_{i,t,x} are assumed to arise from conditionally independent Poisson densities. y_{i,t,x}\sim\mathcal{P}(O_{i,t,x}~e^{z_{i,t,x}}) (4) where O_{i,t,x} is a fixed offset or exposure term representing, for example, an underlying known population size. We collect the latent data z_{i,t,x} in subpopulation specific T\times A matrices \mathbf{Z}_{i} and consider the following factorization for \mathbf{Z}_{i} : \underbrace{\mathbf{Z}_{i}}_{T\times A}=\underbrace{\mathbf{F}_{T}}_{T\times Q}\underbrace{\mathbf{\Lambda}_{i}}_{Q\times R}\underbrace{\mathbf{F}^{\prime}_{A}}_{R\times A}+\underbrace{\mathbf{E}_{i}}_{T\times A}. (5) In this representation, \mathbf{F}_{T} is a T\times Q matrix with elements f_{T,t,q} , containing Q ( q=1,\dots,Q) potentially dynamic factors \mathbf{f}_{T,q} of dimension T\times 1 that capture common variation across time (row dimension). \mathbf{F}_{A} is a A\times R matrix with elements f_{A,r,x} , containing R ( r=1,\dots,R ) factors \mathbf{f}_{A,r} of dimension A\times 1 that capture common variation in the age dimension (column dimension). For the remainder of this article, we will assume for notational convenience that the first column of both \mathbf{F}_{T} and \mathbf{F}_{A} is a constant term, indexed by q=1 , r=1 , and thus Q-1 and R-1 is the number of latent factors to be estimated. The subpopulation-specific Q\times R loading matrices \mathbf{\Lambda}_{i} multiplicatively combine the information from the time and age factors to approximately recover the observed demographic process across age and time in subpopulation i . Each element of the error matrix \mathbf{E}_{i} , denoted as \varepsilon_{i,t,x} , is assumed to arise iid from \mathcal{N}(0,\sigma^{2}) , accounting for measurement error, stochastic variation and overdispersion. This renders the model defined by ( 4 ) and ( 5 ) effectively a Poisson log-normal specification ( Aitchison and Ho, 1989 ). While similar in structure to an SVD, representation ( 5 ) allows for non-diagonal \mathbf{\Lambda}_{i} , is based on sharing the matrices \mathbf{F}_{T} and \mathbf{F}_{A} across all populations i and allows for measurement error via \mathbf{E}_{i} . Since all \varepsilon_{i,t,x} are iid and share a variance term, the model can be seen as an extension of non-Gaussian probabilistic principal components analysis to matrix-valued outcomes. Related models, typically for Gaussian outcomes, are discussed in the literature on modeling econometric and financial time series ( Wang et al., 2019 ; Chen et al., 2020 ; Chen et al., 2024 ), or in the context of (dynamic) tensor-valued data, where matrix-valued outcomes arise as a special case ( Hoff, 2011 ; Hoff, 2015 ; Billio et al., 2023 ). Rewriting representation ( 5 ) in summation form leads to z_{i,t,x}=\sum_{q=1}^{Q}\sum_{r=1}^{R}f_{T,t,q}\lambda_{i,q,r}f_{A,r,x}+\varepsilon_{t,x,i} (6) and illustrates that the factorization in ( 5 ) implies that the outcome is modeled as the sum of a subpopulation-specific constant term (if both q and r index the constant columns in \mathbf{F}_{T} and \mathbf{F}_{A} , i.e., q=r=1 ), age and time specific ‘marginal’ factors ( q=1 , r\neq 1 or q\neq 1 , r=1 ), and interactions between age and time factors ( q\neq 1 , r\neq 1 ). This decomposition allows a parsimonious representation of rather complex dynamics using a combination of potentially dynamic and static factor types. It is further illustrative to compare the factorization in ( 5 ) with the age and time factorization perspectives discussed in Section 2 . From an ’age factorization’ perspective, ( 5 ) can be rewritten as \underbrace{\mathbf{Z}_{i}}_{T\times A}=\underbrace{\mathbf{\Lambda}^{*}_{i}}_{T\times R}\underbrace{\mathbf{F}^{\prime}_{A}}_{R\times A}+\underbrace{\mathbf{E}_{i}}_{T\times A} (7) where factors are extracted in the age dimension, and the subpopulation-time-specific loadings \mathbf{\Lambda}^{*}_{i}=\mathbf{F}_{T}\mathbf{\Lambda}_{i} use common factors across time to reduce the dimensionality of the loadings matrix. Similarly, from a ’time factorization’ perspective, it can be rewritten as: \underbrace{\mathbf{Z}_{i}}_{T\times A}=\underbrace{\mathbf{F}_{T}}_{T\times Q}\underbrace{\mathbf{\Lambda}^{*}_{i}}_{Q\times A}+\underbrace{\mathbf{E}_{i}}_{T\times A} (8) where factors are extracted in the time dimension, and the subpopulation-age-specific loadings \mathbf{\Lambda}^{*}_{i}=\mathbf{\Lambda}_{i}\mathbf{F}^{\prime}_{A} use common factors across age to reduce the dimensionality of the loadings matrix. The proposed factorization extracts relevant common variation across both age and time into two sets of interpretable and low-dimensional factors, leading to a rather parsimonious representation of the data at hand. The number of parameters (considering only loadings plus constant terms for each i ) can potentially be reduced significantly from QNA+N (time factorization) and RNT+N (age factorization) to NQR . Returning to the example of US county-level data measured over N=3,244 counties, T=20 years, A=101 age groups, and assuming three latent factors each in the age and time dimensions, the proposed matrix factor model requires the estimation of 3,244\times 4\times 4=51,904 parameters. In this example, the number of parameters is reduced to about 26.2% of the number of parameters in an ”age factorization” model with R=3 (197,884 parameters), or to about 5.3% of the number of parameters in a ”time factorization” model with Q=3 (986,176 parameters). A visualization of the scaling of the number of parameters of the different methods in N is given in the supplementary material (Fig. A1 ). 3.1 Prior Specification The Bayesian paradigm requires elicitation of suitable prior distributions on all parameters. To allow for dynamic factors and facilitate forecasting, we assume for q>1 the time factors f_{T,t,q} evolve dynamically over time according to first order random walk dynamics f_{T,t,q}=f_{T,t-1,q}+\eta_{T,t,q}\quad\quad\eta_{T,t,q}\sim\mathcal{N}(0,\tau_{T,q}). (9) Based on demographic theory and empirical evidence, smoothness in the age dimension is typically desirable as well ( Camarda, 2012 ; Hyndman et al., 2013 ; Pavone et al., 2024 ). Hence, we also assume that, for r>1 , the age factors f_{A,r,x} follow a random walk: f_{A,r,x}=f_{A,r,x-1}+\eta_{A,r,x}\quad\quad\eta_{A,r,x}\sim\mathcal{N}(0,\tau_{A,r}). (10) For both variables flat priors are assumed on the initial values, leading (for r>1 , q>1 ) to joint multivariate Gaussian priors on the column vectors \mathbf{f}_{A,r}\sim\mathcal{N}(0,\tau_{A,r}\mathbf{\Omega}_{A}) and \mathbf{f}_{T,q}\sim\mathcal{N}(0,\tau_{Q,t}\mathbf{\Omega}_{T}) where \mathbf{\Omega}_{M} denotes the M\times M matrix \mathbf{\Omega}_{M}=\left[\begin{array}[]{cccccc}\,1&-1&0&\cdots&0&0\\ -1&2&-1&\ddots&\vdots&\vdots\\ 0&-1&2&\ddots&\ddots&\vdots\\ \vdots&\ddots&\ddots&\ddots&-1&0\\ 0&\cdots&\ddots&-1&2&-1\\ 0&\cdots&\cdots&0&-1&1\\ \end{array}\right]_{M\times M} (11) see for example Lang and Brezger, 2004 or Chan and Jeliazkov, 2009 . Alternative, more restrictive smoothing priors can be easily incorporated by assuming, for example, second-order random walks, adaptive smoothing priors ( Lang and Brezger, 2004 ), or by assuming that the factors can be well represented using smooth B-spline expansions ( Zens, 2024 ) or Gaussian processes. Similarly, for the dynamic factors, more complex state-space dynamics over time can be easily incorporated in the form of alternative multivariate Gaussian prior structures ( Chan and Jeliazkov, 2009 ). For r>1 , q>1 , weakly informative priors are specified on the variance parameters \tau_{T,q}\sim\mathcal{IG}(d_{0,q},D_{0,q}) and \tau_{A,r}\sim\mathcal{IG}(d_{0,r},D_{0,r}) , with d_{0,q} , d_{0,r} , D_{0,q} and D_{0,r} set to small constants. For the error variance \sigma^{2}\sim\mathcal{IG}(c_{0},C_{0}) we set c_{0}=2.5 and C_{0}=1.5 . For the loadings parameters \mathbf{\Lambda}_{i} , we assume element-wise Gaussian priors p(\lambda_{i,q,r})\propto\mathcal{N}(0,L_{0,i,q,r}) . We will denote the implied multivariate Gaussian prior on \text{vec}(\mathbf{\Lambda}_{i})\sim\mathcal{N}(0,\mathbf{L}_{0,i}) where \mathbf{L}_{0,i} is a diagonal matrix with appropriately ordered diagonal elements L_{0,i,q,r} . By default, flat priors with L^{-1}_{0,i,q,r}=0 are used in the illustrations below. Extensions and useful alternatives to the proposed prior framework are discussed in Section 5 . Typically, latent factor models suffer from several sources of identification problems, including rotational and scale indeterminacy, sign switching, and column switching. For more details, see for example Conti et al., 2014 and Frühwirth-Schnatter et al., 2024 . To partially address these issues, we follow Kowal and Bourgeois, 2020 and condition on \mathbf{F}_{T}^{\prime}\mathbf{F}_{T}=\mathbf{I}_{Q} and \mathbf{F}_{A}^{\prime}\mathbf{F}_{A}=\mathbf{I}_{R} during posterior simulation, based on the introduction of an additional orthogonalization step in the MCMC scheme. Fixing this orthonormal rotation implies rotational as well as scale identification and leads to computational shortcuts in the calculation of conditional posterior moments. However, fixing an orthonormal rotation does not identify the ordering and sign of the factors. In the applications presented below, this was not an issue, so the sign and order of the factors were left unrestricted. If issues such as label switching do arise, they can be resolved relatively easily during MCMC using order restrictions and ex post sign identification schemes ( Kastner et al., 2017 ). Finally, we treat the number of factors, Q and R , as fixed prior choices made by the researcher. In general, choosing an appropriate number of factors in latent factor models is a highly non-trivial statistical problem ( Lopes and West, 2004 ). Potential approaches range from in-sample focused model selection criteria ( , ) and marginal likelihood estimates, to automatic estimation of the number of factors during MCMC ( Frühwirth-Schnatter et al., 2024 ), to predictive measures based on pseudo out-of-sample evaluations. In this article, we rely on the latter and use extensive cross-validation exercises, described in more detail in Section 4 , to select values for Q and R . 3.2 Parameter Estimation The proposed posterior simulation scheme for parameter estimation relies on the fact that, conditional on \mathbf{Z}_{i} , the remaining model is a Gaussian matrix regression model offering closed-form conditional posteriors for all parameters of interest. This makes data augmentation a natural candidate for posterior simulation ( Tanner and Wong, 1987 ). For computing conditional posterior moments in the conditionally Gaussian matrix regression model, the algorithm makes repeated use of vectorization identities such as \text{vec}(\mathbf{A}\mathbf{B}\mathbf{C})=(\mathbf{C}^{\prime}\otimes\mathbf{A})\text{vec}(\mathbf{B})=(\mathbf{I}\otimes\mathbf{AB})\text{vec}(\mathbf{C})=(\mathbf{C}^{\prime}\mathbf{B}^{\prime}\otimes\mathbf{I})\text{vec}(\mathbf{A}) where \mathbf{A} , \mathbf{B} and \mathbf{C} and \mathbf{I} are matrices of appropriate size, \mathbf{I} is the identity matrix, and \otimes is the Kronecker product. Based on these components, a posterior simulation algorithm can be built by repeatedly iterating through the following steps. Update latent outcomes z_{i,t,x} . For t=1,\dots,T , x=1,\dots,A , i=1,\dots,N , update z_{i,t,x}\sim p(z_{i,t,x}|\cdot)\propto\mathcal{P}(y_{i,t,x};e^{z_{i,t,x}}O_{i,t,x})\times\mathcal{N}(z_{i,t,x};\sum_{q=1}^{Q}\sum_{r=1}^{R}f_{T,t,q}f_{A,r,x}\lambda_{i,q,r},\sigma^{2}) using an appropriate posterior sampling algorithm. We use univariate adaptive Metropolis updates in the style of Roberts and Rosenthal, 2009 , but gradient-based updates have also been used successfully for this step ( Steel and Zens, 2024 ). However, gradient-based updates are typically more complex to implement and have relatively high computational costs when considering large numbers of latent observations, which partially offset their efficiency gains. Update loadings matrices \mathbf{\Lambda}_{i} . For i=1,\dots,N , the updates are based on the vectorization of ( 5 ), resulting in \text{vec}(\mathbf{Z}_{i})=\left(\mathbf{F}_{A}\otimes\mathbf{F}_{T}\right)\text{vec}(\mathbf{\Lambda}_{i})+\text{vec}(\mathbf{E}_{i}) (12) which under multivariate Gaussian priors \text{vec}(\mathbf{\Lambda}_{i})\sim\mathcal{N}(0,\mathbf{L}_{0,i}) yields a conditional posterior distribution proportional to a multivariate Gaussian \text{vec}(\mathbf{\Lambda}_{i})\sim\mathcal{N}(\mathbf{l}_{N,i},\mathbf{L}_{N,i}) with posterior moments \begin{split}\mathbf{L}_{N,i}=&\left(\mathbf{L}^{-1}_{0,i}+\left(\mathbf{F}_{A}\otimes\mathbf{F}_{T}\right)^{\prime}\left(\mathbf{F}_{A}\otimes\mathbf{F}_{T}\right)\frac{1}{\sigma^{2}}\right)^{-1}\\ \mathbf{l}_{N,i}=&\mathbf{L}_{N,i}\left(\left(\mathbf{F}_{A}\otimes\mathbf{F}_{T}\right)^{\prime}\text{vec}(\mathbf{Z}_{i})\frac{1}{\sigma^{2}}\right).\\ \end{split} (13) Note that the orthonormality constraints on \mathbf{F}_{T} and \mathbf{F}_{A} lead to \left(\mathbf{F}_{A}\otimes\mathbf{F}_{T}\right)^{\prime}\left(\mathbf{F}_{A}\otimes\mathbf{F}_{T}\right)=\mathbf{I} and hence the posterior moments are particularly easy to compute given diagonal \mathbf{L}_{0,i} . Update age factors \mathbf{F}_{A} . For r=2,\dots,R (excluding the constant term), the age factors are updated as follows. First, we condition on all age factors other than r by computing the working observations \tilde{\mathbf{Z}}_{i}=\mathbf{Z}_{i}-\mathbf{F}_{T}\mathbf{\Lambda}^{-r}_{i}(\mathbf{F}_{A}^{-r})^{\prime} for i=1,\dots,N . \mathbf{F}_{A}^{-r} denotes the A\times(R-1) matrix with column r removed and \mathbf{\Lambda}^{-r}_{i} the Q\times(R-1) loadings matrix with column r removed. For each i=1,\dots,N , this results in the regression system \tilde{\mathbf{Z}}_{i}=\mathbf{F}_{T}\mathbf{\lambda}_{i,\cdot,r}\mathbf{f}_{A,r}^{\prime}+\mathbf{E}_{i} (14) where \mathbf{\lambda}_{i,\cdot,r} denotes the r -th column of \mathbf{\Lambda}_{i} with dimension Q\times 1 and \mathbf{f}_{A,r} is the r -th column of \mathbf{F}_{A} with dimension A\times 1 . Vectorizing this equation yields \text{vec}(\tilde{\mathbf{Z}}_{i})=\left(\mathbf{I}_{A}\otimes\mathbf{F}_{T}\mathbf{\lambda}_{i,\cdot,r}\right)\text{vec}(\mathbf{f}_{A,r}^{\prime})+\text{vec}(\mathbf{E}_{i}). (15) The r -th age factor \mathbf{f}_{A,r} is then updated based on the stacked regression model \begin{bmatrix}\text{vec}\left(\tilde{\mathbf{Z}}_{1}\right)\\ \vdots\\ \text{vec}\left(\tilde{\mathbf{Z}}_{N}\right)\end{bmatrix}=\begin{bmatrix}\mathbf{I}_{A}\otimes\mathbf{F}_{T}\mathbf{\lambda}_{1,\cdot,r}\\ \vdots\\ \mathbf{I}_{A}\otimes\mathbf{F}_{T}\mathbf{\lambda}_{N,\cdot,r}\end{bmatrix}\text{vec}\left(\mathbf{f}_{A,r}^{\prime}\right)+\begin{bmatrix}\text{vec}\left(\mathbf{E}_{1}\right)\\ \vdots\\ \text{vec}\left(\mathbf{E}_{N}\right)\end{bmatrix}. (16) The resulting conditional posterior distribution is proportional to a multivariate Gaussian \mathbf{f}_{A,r}\sim\mathcal{N}\left(\bar{\mathbf{f}}_{A,r},\bar{\mathbf{F}}_{A,r}\right) with posterior moments \begin{split}\bar{\mathbf{F}}_{A,r}=&\left(\frac{1}{\tau_{A,r}}\mathbf{\Omega}_{A}+\frac{1}{\sigma^{2}}\sum_{i=1}^{N}(\mathbf{I}_{A}\otimes\mathbf{\lambda}_{i,\cdot,r}^{\prime}\mathbf{F}_{T}^{\prime}\mathbf{F}_{T}\mathbf{\lambda}_{i,\cdot,r})\right)^{-1}\\ \bar{\mathbf{f}}_{A,r}=&\bar{\mathbf{F}}_{A,r}\left(\frac{1}{\sigma^{2}}\sum_{i=1}^{N}(\mathbf{I}_{A}\otimes\mathbf{F}_{T}\mathbf{\lambda}_{i,\cdot,r})^{\prime}\text{vec}(\tilde{\mathbf{Z}}_{i})\right)\end{split} (17) Note that we condition on \mathbf{F}_{T}^{\prime}\mathbf{F}_{T}=\mathbf{I}_{Q} and hence the posterior variance computation simplifies significantly as the summation involved in computing \bar{\mathbf{F}}_{A,r} reduces to summing N diagonal matrices of dimension A , collecting the crossproduct of the relevant factor loadings. Further computational gains are possible by avoiding explicit computation of the matrix inverse in ( 17 ) using precision-based sampling methods ( Chan and Jeliazkov, 2009 ). To ensure the identification constraint \mathbf{F}_{A}^{\prime}\mathbf{F}_{A}=\mathbf{I}_{R} holds, an initial candidate draw \mathbf{f}^{*}_{A,r}\sim\mathcal{N}\left(\bar{\mathbf{f}}_{A,r},\bar{\mathbf{F}}_{A,r}\right) is immediately orthogonalized and normalized using the following procedure ( Kowal and Bourgeois, 2020 ). First, compute \mathbf{\tilde{C}}=\bar{\mathbf{F}}_{A,r}\mathbf{F}^{-r}_{A} . Second, set \mathbf{f}^{*}_{A,r}\leftarrow\mathbf{f}^{*}_{A,r}-\mathbf{\tilde{C}}\left((\mathbf{F}^{-r}_{A})^{\prime}\mathbf{\tilde{C}}\right)^{-1}(\mathbf{F}^{-r}_{A})^{\prime}\mathbf{f}^{*}_{A,r} . Third, normalize and obtain the final factor draw \mathbf{f}_{A,r}\leftarrow\mathbf{f}^{*}_{A,r}/\sqrt{(\mathbf{f}^{*}_{A,r})^{\prime}\mathbf{f}^{*}_{A,r}} . Finally, to ensure the product \mathbf{F}_{T}\mathbf{\Lambda}_{i}\mathbf{F}_{A}^{\prime} remains unchanged, set \mathbf{\lambda}_{i,\cdot,r}\leftarrow\mathbf{\lambda}_{i,\cdot,r}\sqrt{(\mathbf{f}^{*}_{A,r})^{\prime}\mathbf{f}^{*}_{A,r}} for all i . 3 3 3 Note that the constant term \mathbf{f}_{A,1}=1/\sqrt{A} needs to be scaled as well for \mathbf{F}_{A}^{\prime}\mathbf{F}_{A}=\mathbf{I}_{R} to hold. Update time factors \mathbf{F}_{T} . Updating the time factors \mathbf{F}_{T} works analogously to updating \mathbf{F}_{A} . For q=2,\dots,Q (excluding the constant term), the time factors are updated as follows. First, we condition on all time factors other than q by computing the working observations \tilde{\mathbf{Z}}_{i}=\mathbf{Z}_{i}-\mathbf{F}_{T}^{-q}\mathbf{\Lambda}^{-q}_{i}\mathbf{F}_{A}^{\prime} for i=1,\dots,N . \mathbf{F}_{T}^{-q} denotes the T\times(Q-1) matrix with column q removed and \mathbf{\Lambda}^{-q}_{i} the (Q-1)\times R loadings matrix with row q removed. For each i=1,\dots,N , this results in the regression system \tilde{\mathbf{Z}}_{i}=\mathbf{f}_{T,q}\mathbf{\lambda}_{i,q,\cdot}\mathbf{F}_{A}^{\prime}+\mathbf{E}_{i} (18) where \mathbf{\lambda}_{i,q,\cdot} denotes the q -th row of \mathbf{\Lambda}_{i} with dimension 1\times R and \mathbf{f}_{T,q} is the q -th column of \mathbf{F}_{T} with dimension T\times 1 . Vectorizing this equation yields \text{vec}(\tilde{\mathbf{Z}}_{i})=\left(\mathbf{F}_{A}\mathbf{\lambda}^{\prime}_{i,q,\cdot}\otimes\mathbf{I}_{T}\right)\text{vec}(\mathbf{f}_{T,q})+\text{vec}(\mathbf{E}_{i}). (19) The q -th time factor \mathbf{f}_{T,q} is then updated based on the stacked regression model \begin{bmatrix}\text{vec}\left(\tilde{\mathbf{Z}}_{1}\right)\\ \vdots\\ \text{vec}\left(\tilde{\mathbf{Z}}_{N}\right)\end{bmatrix}=\begin{bmatrix}\mathbf{F}_{A}\mathbf{\lambda}^{\prime}_{1,q,\cdot}\otimes\mathbf{I}_{T}\\ \vdots\\ \mathbf{F}_{A}\mathbf{\lambda}^{\prime}_{N,q,\cdot}\otimes\mathbf{I}_{T}\end{bmatrix}\text{vec}\left(\mathbf{f}_{T,q}\right)+\begin{bmatrix}\text{vec}\left(\mathbf{E}_{1}\right)\\ \vdots\\ \text{vec}\left(\mathbf{E}_{N}\right)\end{bmatrix}. (20) The resulting conditional posterior distribution is proportional to a multivariate Gaussian \mathbf{f}_{T,q}\sim\mathcal{N}\left(\bar{\mathbf{f}}_{T,q},\bar{\mathbf{F}}_{T,q}\right) with posterior moments \begin{split}\bar{\mathbf{F}}_{T,q}=&\left(\frac{1}{\tau_{T,q}}\mathbf{\Omega}_{T}+\frac{1}{\sigma^{2}}\sum_{i=1}^{N}(\mathbf{\lambda}_{i,q,\cdot}\mathbf{F}_{A}^{\prime}\mathbf{F}_{A}\mathbf{\lambda}^{\prime}_{i,q,\cdot}\otimes\mathbf{I}_{T})\right)^{-1}\\ \bar{\mathbf{f}}_{T,q}=&\bar{\mathbf{F}}_{T,q}\left(\frac{1}{\sigma^{2}}\sum_{i=1}^{N}(\mathbf{F}_{A}\mathbf{\lambda}^{\prime}_{i,q,\cdot})^{\prime}\text{vec}(\tilde{\mathbf{Z}}_{i})\right)\end{split} (21) Note that we condition on \mathbf{F}_{A}^{\prime}\mathbf{F}_{A}=\mathbf{I}_{R} and hence the posterior variance computation simplifies significantly as the summation involved in computing \bar{\mathbf{F}}_{T,q} reduces to summing N diagonal matrices of dimension T collecting the crossproduct of the relevant factor loadings. To ensure the identification constraint \mathbf{F}_{T}^{\prime}\mathbf{F}_{T}=\mathbf{I}_{Q} holds, an initial candidate draw \mathbf{f}^{*}_{T,q}\sim\mathcal{N}\left(\bar{\mathbf{f}}_{T,q},\bar{\mathbf{F}}_{T,q}\right) is immediately orthogonalized and normalized. First, compute \mathbf{\tilde{C}}=\bar{\mathbf{F}}_{T,q}\mathbf{F}^{-q}_{T} . Second, set \mathbf{f}^{*}_{T,q}\leftarrow\mathbf{f}^{*}_{T,q}-\mathbf{\tilde{C}}\left((\mathbf{F}^{-q}_{T})^{\prime}\mathbf{\tilde{C}}\right)^{-1}(\mathbf{F}^{-q}_{T})^{\prime}\mathbf{f}^{*}_{T,q} . Third, normalize and obtain the final factor draw \mathbf{f}_{T,q}\leftarrow\mathbf{f}^{*}_{T,q}/\sqrt{(\mathbf{f}^{*}_{T,q})^{\prime}\mathbf{f}^{*}_{T,q}} . Finally, to ensure the product \mathbf{F}_{T}\mathbf{\Lambda}_{i}\mathbf{F}_{A}^{\prime} remains unchanged, set \mathbf{\lambda}_{i,q,\cdot}\leftarrow\mathbf{\lambda}_{i,q,\cdot}\sqrt{(\mathbf{f}^{*}_{T,q})^{\prime}\mathbf{f}^{*}_{T,q}} for all i . 4 4 4 Note that the constant term \mathbf{f}_{T,1}=1/\sqrt{T} needs to be scaled as well for \mathbf{F}_{T}^{\prime}\mathbf{F}_{T}=\mathbf{I}_{Q} to hold. Update smoothing parameters \mathbf{\tau}_{Q} and \mathbf{\tau}_{R} . For r=2,\dots,R and q=2,\dots,Q (excluding the constant terms), the conditional posterior densities p(\tau_{Q,q}|\mathbf{f}_{T,q})\propto\mathcal{IG}(d_{N,q},D_{N,q}) p(\tau_{R,r}|\mathbf{f}_{A,r})\propto\mathcal{IG}(d_{N,r},D_{N,r}) are proportional to inverse Gamma densities with posterior moments \begin{split}d_{N,q}=&d_{0,q}+\frac{1}{2}(T-1)\\ D_{N,q}=&D_{0,q}+\frac{1}{2}\sum_{t=2}^{T}(f_{T,t,q}-f_{T,t-1,q})^{2}\\ d_{N,r}=&d_{0,r}+\frac{1}{2}(A-1)\\ D_{N,r}=&D_{0,r}+\frac{1}{2}\sum_{x=2}^{A}(f_{A,r,x}-f_{A,r,x-1})^{2}.\end{split} (22) Update observation equation error variance \sigma^{2} . The conditional posterior distribution p(\sigma^{2}|\mathbf{Z},\mathbf{F}_{A},\mathbf{F}_{T},\mathbf{\Lambda})\propto\mathcal{IG}(c_{N},C_{N}) is proportional to an inverse Gamma density with posterior moments \begin{split}c_{N}=&c_{0}+\frac{1}{2}NAT\\ C_{N}=&C_{0}+\frac{1}{2}\sum_{i=1}^{N}\sum_{t=1}^{T}\sum_{x=1}^{A}(z_{i,t,x}-\sum_{r=1}^{R}\sum_{q=1}^{Q}f_{T,t,q}f_{A,r,x}\lambda_{i,q,r})^{2}.\end{split} (23) 4 Application To Austrian Migration Data Migration is widely recognized as a key driver of population change (e.g., Bijak, 2010 ), while at the same time it is usually considered the most challenging of the three major demographic components – mortality, fertility, and migration – to model. This difficulty has led to a large body of research on (Bayesian) migration modeling (e.g., Bijak et al., 2008 ; Raymer et al., 2013 ; Wiśniowski et al., 2014 ; Azose and Raftery, 2015 ; Wiśniowski et al., 2016 ; Zhang and Bryant, 2020 ; Rampazzo et al., 2021 ; Bijak, 2022 ; Bijak, 2024 ). Motivated by the challenging nature of the problem, the proposed approach is evaluated and illustrated in a particularly demanding setting that combines the volatility of migration patterns with the sparsity and heterogeneity of subnational data. The model is applied to a dataset of subnational emigration patterns from Austria. The data record district-specific counts of emigrants by single year of age ( x=0,\dots,100;A=101 ) and by sex across 94 political districts over the period 2002–2023 ( T=23 ). The data is sourced from the Austrian national statistical office ( Statistik Austria ) and is derived from the Austrian central register of residents. A migratory movement is defined as a change in address for a period longer than 90 days. The data is publicly available through custom extracts from STATCube , the online data repository of Statistik Austria . Emigration counts are based on combining data on internal and international emigration. Subpopulations are defined based on district-sex pairs, resulting in N=94\times 2=188 subpopulations. Fig. 1 displays data from some example districts, highlighting several challenges in demographic age-time analysis of multiple populations, such as significant stochastic variation in smaller subpopulations, outliers and heterogeneity between subpopulations. However, the data also clearly exhibit the common cross-population patterns typically exploited by low-rank modeling approaches, such as peak migration activity between ages 20 and 30. We set O_{i,t,x}=1 for all data cells and focus on modeling the emigration counts directly. The proposed posterior simulation algorithm is used to collect 20,000 posterior samples after an initial burn-in period of 10,000 iterations, retaining every 8-th sample for posterior analysis. MCMC convergence behavior is generally satisfactory, especially for draws from the predictive density of y_{i,t,x} . Data augmentation in Poisson log-normal frameworks is typically efficient in the presence of large counts, while settings with many zeros and small counts induce a certain degree of autocorrelation. Example traceplots are provided in the supplementary material (Fig. A2 ). For model selection, we perform a ten-fold cross-validation exercise where we repeatedly predict randomly partitioned 10\% hold-out samples after training models on the remaining 90\% of the data as training samples. We consider 100 possible models resulting from combining (Q-1)\in\{1,\dots,10\} and (R-1)\in\{1,\dots,10\} . A similar, but conceptually different exercise based on forecasting the data in t+1 and t+5 is presented later in the section. For evaluation we collect root mean squared errors (RMSEs), mean absolute errors (MAEs) and correlations of the log-transformed true values relative to the posterior means of the log-transformed posterior distribution of the counts y_{i,t,x} . Results for Q-1=5 and R-1=5 latent factors are presented in detail below. This setting provides a good balance between model fit and interpretability. Increasing the number of factors further leads only to marginal increases in predictive performance and less interpretable estimates. Detailed results for all settings are given in the supplementary material (Tab. A1 - A3 ). (a) Age Factors \mathbf{F}_{A} (b) Time Factors \mathbf{F}_{T} Fig. 2 : Estimated factor posterior means across age (a) and time (b) and 95% credible intervals (shaded area). Horizontal dotted line indicates zero. Vertical dotted lines indicate the years 2015 and 2020. Constant factors are excluded. Fig. 2 shows the extracted factors in the age dimension and time dimensions. The age factors modulate the behavior of the subpopulation-specific data at specific ages and have a rather intuitive interpretation. For example, Factor 2 resembles an inverse log-transformed Rogers-Castro model migration schedule, which describes well-known regularities in migration patterns over the life course ( Rogers et al., 1978 ). Factor 1 focuses heavily on migration at the oldest ages. Factors 3, 4, and 5 mainly modulate behavior at specific ages, such as around age 18-20 (when people typically move for education) or around ages between 75 and 100 (where increased mobility patterns may indicate that people are moving into retirement homes). The time factors are similarly interpretable, capturing elements such as linear (Factor 2) and approximately quadratic (Factor 3) trends, as well as distinct dynamics that disrupted Austrian internal and international migration patterns. Specifically, significant disruptions occurred during 2015 and 2016, based primarily on conflict-induced migration from the Middle East (in 2015 and 2016) and from Ukraine (in 2022). In both cases, large international migration inflows led to subsequent internal migration movements, which are reflected in the estimated factors. Similarly, the onset of the Covid-19 pandemic in 2020 is clearly captured in some of the factors. To evaluate the relative importance of the factors, we consider the respective row and column averages of \mathbf{\Lambda}_{i}^{2} as a simple summary statistic: \begin{split}\bar{\lambda}^{2}_{q,\cdot}=\frac{1}{NR}\sum_{i=1}^{N}\sum_{r=1}^{R}\lambda^{2}_{i,q,r}\\ \bar{\lambda}^{2}_{\cdot,r}=\frac{1}{NQ}\sum_{i=1}^{N}\sum_{q=1}^{Q}\lambda^{2}_{i,q,r}.\end{split} These measures give a sense of how close to zero the expected loading is for a given factor \mathbf{f}_{T,q} or \mathbf{f}_{A,r} . They can be computed for all posterior draws and then summarized, for example, in the form of posterior means. In the illustrative example, this clearly results in the Rogers-Castro type age factor (Factor 2) and the linear trend time factor (Factor 2) scoring highest in this importance heuristic. Detailed results are given in the supplementary material (Fig. A3 ). Fig. 3 : Observed and fitted emigration counts for two subpopulations. The top row shows data for females emigrating from a district with a medium-sized population and relatively low noise level. The bottom row shows data for males emigrating from a sparsely populated rural area with significant stochastic variation in the raw data. Pairs of plots in the left and right columns show the same data and estimates from different perspectives. Fitted values are posterior means of the respective predicted densities. Fig. 3 presents observed data alongside fitted values for a small (bottom) and a medium-sized (top) subpopulation. The left pair of columns shows the data in the form of classical age curves, while the right pair of columns provides a ‘bird’s eye’ view of the annual age patterns. The results clearly show how the model is able to smooth out stochastic noise in smaller subpopulations by borrowing information about demographic patterns from other subpopulations, while more closely following the patterns observed in more informative subpopulations. 4.1 Forecasting and Predictive Exercise The modeling framework can be used to obtain probabilistic forecasts for the counts y_{i,t,x} . Conveniently, obtaining these high-dimensional forecasts requires only forecasts of the Q dynamic factors F_{T} , which are the only time-varying component in the considered matrix factor model, rendering the forecasting problem a rather low-dimensional statistical exercise. Given the first-order random walk dynamics, forecasts can be easily obtained by iterating f_{T,t,q}=f_{T,t-1,q}+\eta_{T,t,q} forward in time for each q . Monte Carlo simulation allows to collect a full posterior distribution of forecasts for the q factors. Combining these with the static loadings \mathbf{\Lambda}_{i} and the age factors F_{A} then allows to obtain forecasts for the elements of \mathbf{Z}_{i} and consequently for the counts \mathbf{Y}_{i} . 5 5 5 For example, if \mathbf{f}_{T,t+h} denotes the 1\times Q row vector of factor forecasts for t+h , then \mathbf{f}_{T,t+h}\mathbf{\Lambda}_{i}\mathbf{F}_{A}^{\prime} gives the forecasts z_{i,t+h,x} for individual i , and y_{i,t+h,x} can be simulated from y_{i,t+h,x}\sim\mathcal{P}(e^{z_{i,t+h,x}} ). Fig. 4 : The five estimated factors \mathbf{F}_{T} , as well as seven-year forecasts based on the specified random walk structure. Shaded areas are 95% credible intervals. Horizontal dotted line indicates zero. Vertical dotted lines indicate the years 2015 and 2020. Vertical dashed line is the end of the observed sample period (2023). Constant factors are excluded. To illustrate, consider Fig. 4 , which shows the five extracted factors over time as well as their estimated probabilistic forecast paths through 2030. Note that we consider first-order random walk models on the factors for simplicity, but more complex state space structures are straightforward extensions ( Chan and Jeliazkov, 2009 ). While for some factors a random walk with drift or an autoregressive process may be potentially more appropriate, for other factors the appropriate time series specification is less clear, as they are characterized by the typical volatility and irregularity of migration systems. An interesting extension of the framework could include a model selection mechanism (e.g., based on shrinkage priors) in the state equation governing the dynamics of \mathbf{F}_{T} . Combining these forecasts with the elements of the loading matrices \mathbf{\Lambda}_{i} allows to recover full probabilistic forecasts for all age-sex-subpopulation specific time series. Fig. 5 shows an example for a single subpopulation. The left panel shows the fitted in-sample age curves and the out-of-sample forecasts to 2030, and the right panel shows the same fit and a ‘bird’s eye’ view of the data and predictions. The random walk dynamics are clearly visible, showing an essentially constant mean forecast. The uncertainty around these forecasts is not shown, but increases with the forecast horizon due to the random walk assumption on \mathbf{f}_{T,q} . Importantly, Monte Carlo simulation allows to easily obtain the posterior distribution of functionals of these forecasts, if of interest. For example, predicted emigration patterns for individuals aged 15 to 20 can be aggregated, which could serve as an index to track and predict the attractiveness of districts for younger populations. Fig. 5 : In-sample fit versus out-of-sample forecast for a selected subpopulation. Left panel shows the fitted curves (transparent) as well as the forecasts through 2030 (solid lines), with age on the x -axis and emigration counts on the y -axis. The right panel shows the same fits and forecasts, but with years on the x -axis and age on the y -axis, clearly illustrating the random walk nature of the forecasts. 4.2 Predictive Evaluation Exercise To assess the usefulness of the model for forecasting demographic patterns, a forecasting exercise is performed. We use a moving window setting with a training period of 17 years. The last five observed years (2019–2023) are used as hold-out samples to evaluate pseudo out-of-sample predictions. In the first hold-out period, we generate forecasts for t+1 (2019) and t+5 (2023) to evaluate the short- and medium-term accuracy of the predictions. For the remaining four forecast windows, we collect forecasts for t+1 (2020–2023). We compare the Bayesian matrix factor model to five benchmark modeling frameworks. We consider random walk predictions on the log scale as a simple benchmark, as well as four SVD-based factorizations of the log-transformed counts, similar to the models outlined in Section 2 . First, we consider extracting ‘factors’ in the time dimension and forecasting these time-varying ‘factors’ using random walk specifications. Second, we consider extracting ‘factors’ in the age dimension and forecasting the time-varying ‘loadings’ using random walk models. Both SVD-based models are estimated once separately for each subpopulation i to allow for more flexibility and once in an alternative setting where the factors are approximated jointly across all subpopulations to borrow more strength. Where applicable, the number of extracted latent ‘factors’ is varied between 1 and 15 (considering all combinations for the Bayesian framework). To evaluate the predictions, we collect RMSEs, MAEs, and correlations of the true values relative to the point predictions for the log-transformed counts. For the Bayesian predictions, this amounts to the posterior means of the log-transformed posterior distribution. Table 1 : Forecasting Results for 1-Year and 5-Year Horizons Model Best Specification Worst Specification RMSE MAE Corr. RMSE MAE Corr. 1-Year Forecast Random Walk 0.519 0.371 0.922 0.519 0.371 0.922 Time Factorization 0.427 0.321 0.947 0.517 0.373 0.922 Joint Time Factorization 0.423 0.317 0.948 0.514 0.373 0.923 Age Factorization 0.411 0.317 0.951 0.514 0.374 0.923 Joint Age Factorization 0.397 0.301 0.954 0.428 0.332 0.946 Bayesian Matrix Factor Model 0.389 0.294 0.956 0.422 0.323 0.948 5-Year Forecast Random Walk 0.554 0.399 0.916 0.554 0.399 0.916 Time Factorization 0.464 0.356 0.944 0.552 0.401 0.916 Joint Time Factorization 0.460 0.351 0.945 0.546 0.401 0.918 Age Factorization 0.448 0.349 0.946 0.549 0.402 0.917 Joint Age Factorization 0.431 0.333 0.951 0.455 0.358 0.944 Bayesian Matrix Factor Model 0.427 0.331 0.952 0.458 0.356 0.945 • Notes : RMSE = Root Mean Square Error, MAE = Mean Absolute Error, Corr. = Correlation Coefficient. The table shows the forecasting performance for both 1-year and 5-year horizons for various models, highlighting best and worst specifications. For comparability, results are presented on the log-count scale. Results are averaged across all ages, holdout periods, and subpopulations. Horizon and column specific best performance is highlighted in bold . Tab. 1 summarizes the results of this exercise, averaged over all i , t , x , and holdout horizons. Since each model is evaluated for different Q and R , the table shows two column triplets, one for the respective best specification and one for the respective worst specification. Rankings are based on average performance across the three metrics. The Bayesian matrix factor model approach performs similarly or better than all other models in both the best and worst case for all prediction measures evaluated. The naive random walk typically performs worst, with the time and age factorization approaches falling in between. Interestingly, there is significant evidence that sharing information about age patterns in the form of age factorizations appears to provide more predictive power than sharing information in the time dimension when modeling many populations jointly. This may in part be an effect of the large number of parameters to be estimated when considering many age groups and subpopulations for which loadings must be estimated. The results also suggest that using a joint modeling approach outperforms factorizations estimated separately for each population. Note, however, that this exercise does not imply that the predictive performance of the Bayesian matrix model in its current form exhibits some sort of ‘optimality’ in all conceivable settings. Rather, it indicates a certain degree of predictive robustness and no significant reduction in the predictive performance of the Bayesian model despite its much more parsimonious nature. Several ways to further optimize predictive power for demographic applications and beyond are discussed in the next section. 5 Discussion and Concluding Remarks In this article, we propose a Bayesian matrix factor model for non-Gaussian data, focusing on demographic datasets recorded by age and time. The model is introduced with an informative prior setting and an efficient MCMC estimation algorithm is developed for posterior simulation. To demonstrate its effectiveness, the model is applied to real data and a pseudo out-of-sample prediction exercise is conducted. The proposed approach is parsimonious, directly incorporates prior knowledge of demographic processes, and typically outperforms several benchmark models. These results underscore its potential for applications in statistical demography and related fields dealing with non-Gaussian, noisy, and heterogeneous matrix-valued data. Several avenues for future research emerge. In terms of demographic applications, this article evaluates model performance using migration data. Modeling and predicting migration patterns is typically the most challenging of the three major demographic components mortality, fertility, and migration. Model evaluations in the context of mortality and fertility will provide further insight into model performance. We expect the model to perform even better in these applications, as mortality and fertility patterns are typically more regular over age and time than migration patterns, which plays to the strengths of low-rank factorization methods. In terms of prior settings, hierarchical priors on the factor loadings that enhance information sharing between subpopulations are likely to further improve predictive power ( Alexander et al., 2017 ; Clark, 2019 ; Zens, 2024 ; Dharamshi et al., 2025 ). Similarly, shrinkage priors ( Carvalho et al., 2009 ; Cadonna et al., 2020 ) can be used to regularize the factor loadings, to increase robustness against overfitting and to reflect the fact that not all factors (and their interactions) are expected to be a priori relevant for every subpopulation. We evaluated the use of horseshoe priors on \lambda_{i,q,r} but found that they generally perform slightly worse than flat priors, potentially due to overshrinking the \lambda_{i,q,r} values, which can be large in absolute size. Classical spike-and-slab priors (see Steel and Zens, 2024 for examples in a Poisson log-normal regression setting) may thus serve as a useful alternative, though they typically require higher computational effort. In terms of model setup, the inclusion of known covariates measured by age, subpopulation and/or time point in addition to the latent factors could, if available, potentially further improve model performance. More flexible error variance structures are relatively straightforward extensions as well, but lead to slightly more complex MCMC schemes. Another promising avenue of research is to extend the presented methodology to higher order tensors using the ideas outlined in Hoff, 2011 , Hoff, 2015 or Billio et al., 2023 , allowing for analysis by additional demographic dimensions such as educational attainment or citizenship. In terms of estimation, this article considers a Bayesian approach based on MCMC estimation that results in fully probabilistic – and, in the limit, exact – posterior estimates. The trade-off is – as with any MCMC-based estimation algorithm – a relatively high computational cost. Two computationally cheaper alternatives could be explored. First, approximate maximum likelihood estimates can be obtained in a two-step process. In the first step, the factor matrices \mathbf{F}_{T} and \mathbf{F}_{A} could be extracted from the log-transformed demographic counts based on tensor generalizations of singular value decompositions for matrices ( De Lathauwer et al., 2000 ). In the second step, the loadings matrices \mathbf{\Lambda}_{i} are estimated by ordinary least squares independently for each subpopulation i . This approach is a -- potentially crude 6 6 6 In the Poisson log-normal setting, the quality of this approximation will generally increase with the count size y_{i} . – approximation to the Bayesian approach under flat priors and does not account for uncertainty in \mathbf{F}_{T} and \mathbf{F}_{A} . However, it comes at a much lower computational cost and may therefore be attractive to practitioners concerned with high-dimensional analysis when the primary interest is in point estimates. If forecasting is required, a third step can be added where time series models for the Q time factors in \mathbf{F}_{T} are fitted ex post and used for forecasting. Such multi-step procedures are – although less rigorous – in line with current practice in applied demographic research ( Lee and Carter, 1992 ; Alexander et al., 2017 ) and have been used to obtain the initial values for the MCMC algorithm in the present article. As a second alternative, closer to the Bayesian paradigm, variational Bayes (VB) algorithms could be developed to approximate the posterior densities of interest, combining ideas from VB for factor analysis ( Hansen et al., 2024 ) and VB for Poisson log-normal frameworks ( Chiquet et al., 2019 ). Many of the pathways discussed above share the common overarching goal of effectively scaling statistical models in multidimensional demographic research to accommodate a large number of subpopulations, each of which may contribute only sparse information. This challenge is particularly evident in migration modeling, where data are often cross-tabulated by origin, destination, age, sex, time, and possibly additional dimensions. The methodology presented in this paper attempts to partially address this problem by using matrix factorizations. However, in very high-dimensional settings, several computational and model-related challenges remain that require further advances in the computational and theoretical foundations of statistical demography. Supplementary Material A1 Additional Figures Fig. A1 : Scaling of the number of parameters of the proposed matrix factor model, an age factorization model, and a time factorization model with the number of subpopulations N ( x -axis), assuming A=101 age groups, T=20 time periods, and counting only constant terms and factor loadings. Fig. A2 : Examples of traceplots and posterior distributions for selected variables. y_{FC} corresponds to an out-of-sample forecast and y is the in-sample predictive density of a selected count. Fig. A3 : Posterior mean estimates for measures of factor importance \bar{\lambda}^{2}_{q,\cdot} and \bar{\lambda}^{2}_{\cdot,r} . The y axis is on a logarithmic scale. Constant factors are excluded. See text for details. A2 Additional Tables Table A1: In-Sample Cross-Validation Results (RMSE) Q-1~\backslash~R-1 1 2 3 4 5 6 7 8 9 10 1 1.000 0.946 0.935 0.928 0.924 0.923 0.922 0.922 0.921 0.921 2 0.995 0.940 0.929 0.920 0.916 0.914 0.913 0.912 0.911 0.911 3 0.993 0.938 0.925 0.915 0.911 0.908 0.907 0.906 0.906 0.905 4 0.992 0.936 0.923 0.913 0.908 0.906 0.904 0.903 0.903 0.902 5 0.991 0.935 0.922 0.912 0.907 0.904 0.903 0.902 0.902 0.901 6 0.990 0.934 0.920 0.910 0.905 0.903 0.901 0.900 0.900 0.899 7 0.990 0.934 0.920 0.909 0.905 0.902 0.900 0.900 0.900 0.899 8 0.989 0.933 0.919 0.909 0.904 0.901 0.900 0.899 0.899 0.899 9 0.989 0.933 0.919 0.909 0.904 0.902 0.900 0.900 0.899 0.899 10 0.989 0.933 0.919 0.909 0.904 0.902 0.900 0.900 0.899 0.899 • Notes: Average root mean square error on the log-count scale across all subpopulations, ages, years, and train-test splits for various combinations of Q and R . Results are relative to the Q-1=R-1=1 setting. Table A2: In-Sample Cross-Validation Results (MAE) Q-1~\backslash~R-1 1 2 3 4 5 6 7 8 9 10 1 1.000 0.939 0.927 0.920 0.915 0.914 0.912 0.912 0.912 0.912 2 0.994 0.933 0.921 0.911 0.906 0.904 0.901 0.901 0.901 0.900 3 0.992 0.930 0.916 0.905 0.900 0.898 0.895 0.895 0.894 0.894 4 0.991 0.928 0.913 0.901 0.896 0.894 0.891 0.890 0.890 0.890 5 0.989 0.927 0.912 0.900 0.895 0.893 0.890 0.889 0.889 0.889 6 0.988 0.926 0.910 0.898 0.893 0.891 0.888 0.888 0.887 0.887 7 0.988 0.925 0.910 0.898 0.893 0.890 0.887 0.887 0.887 0.886 8 0.987 0.924 0.909 0.897 0.892 0.890 0.887 0.887 0.886 0.886 9 0.987 0.924 0.909 0.897 0.892 0.890 0.887 0.887 0.886 0.886 10 0.987 0.924 0.909 0.897 0.892 0.890 0.887 0.887 0.887 0.886 • Notes: Average mean absolute error on the log-count scale across all subpopulations, ages, years, and train-test splits for various combinations of Q and R . Results are relative to the Q-1=R-1=1 setting.. Table A3: In-Sample Cross-Validation Results (Correlation) Q-1~\backslash~R-1 1 2 3 4 5 6 7 8 9 10 1 1.000 1.006 1.007 1.008 1.008 1.008 1.009 1.009 1.009 1.009 2 1.001 1.007 1.008 1.009 1.009 1.009 1.010 1.010 1.010 1.010 3 1.001 1.007 1.008 1.009 1.010 1.010 1.010 1.010 1.010 1.010 4 1.001 1.007 1.009 1.010 1.010 1.010 1.010 1.011 1.011 1.011 5 1.001 1.007 1.009 1.010 1.010 1.010 1.011 1.011 1.011 1.011 6 1.001 1.007 1.009 1.010 1.010 1.011 1.011 1.011 1.011 1.011 7 1.001 1.007 1.009 1.010 1.010 1.011 1.011 1.011 1.011 1.011 8 1.001 1.007 1.009 1.010 1.010 1.011 1.011 1.011 1.011 1.011 9 1.001 1.007 1.009 1.010 1.010 1.011 1.011 1.011 1.011 1.011 10 1.001 1.007 1.009 1.010 1.010 1.011 1.011 1.011 1.011 1.011 • Notes: Average correlation coefficient on the log-count scale across all subpopulations, ages, years, and train-test splits for various combinations of Q and R . Results are relative to the Q-1=R-1=1 setting.