where initial value $ \tilde{S}_{1|T} $ is obtained from $ \tilde{S}_{1|T} = \tilde{S}_{1|1} + \tilde{P}_{1|1} r_{0} $ .

The algorithm described above is a procedure generating state variables $ \tilde{\pmb{S}}_{t}(t=1,2,\cdots,T) $ from conditional posterior distribution $ p(\bar{\pmb{S}}^{T}|\pmb{\Gamma}^{(g-1)},\pmb{\theta},\pmb{X}^{T}) $ which is implemented in Step 3.1 of Section 2.4.

#### A.2 Sampling of Parameters Set $\Gamma$ of Measurement Equation (2.12)

In Step 3.2 of MCMC algorithm in Section 4, we sample parameters $\Gamma=\{\Lambda,\mathbf{R},\Psi\}$ of measurement equation obtained from (2.7) and (2.9). To do so, (2.7) is transformed by substituting (2.9) into it as

$$ \begin{array}{r}{({\bf I}-\mathbf{\Psi}L){\bf X}_{t}=({\bf I}-\mathbf{\Psi}L)\mathbf{\Lambda}\bar{S}_{t}+\nu_{t},\qquad\nu_{t}\sim\mathrm{i.i.d.}\;N({\bf0},{\bf R}),}\end{array} $$

where I denotes identity matrix. The sampling of parameters $ \Gamma=\{\Lambda,R,\Psi\} $ from conditional posterior distribution $ p(\mathbf{\Gamma}|\bar{\mathbf{S}}^{T(g)},\boldsymbol{\theta}^{(g-1)},\mathbf{X}^{T}) $ given the unobserved state variables $ \bar{S}^{T} $ and deep parameters $ \theta $ , is conducted following the approach by Chib and Greenberg (1994) who proposed the Bayesian estimation method of linear regression model with AR (1) errors such like (2.7) and (2.9).

For estimating above model, Chib and Greenberg (1994) divided it into two linear regression models. First, by using notations, $ X_{k,t}^{*} = X_{k,t} - \Psi_{kk}X_{k,t-1} $ , and $ S_{j,t}^{*} = \bar{S}_{j,t} - \Psi_{kk}\bar{S}_{j,t-1} $ where subscript k is the k-th indicator of data set $ X_{t} $ and subscript j is the j-th state variable $ \bar{S}_{t} $ , above equation is represented as

$$ X_{k,t}^{*}=\Lambda_{k}S_{j,t}^{*}+\nu_{k,t},\qquad\nu_{k,t}\sim\mathbf{i.i.d.}N(0,R_{k k}), $$

Second, by using notation $ e_{k,t} = X_{k,t} - \Lambda_{k}\bar{S}_{j,t} $ which means measurement errors, the equation is also rewritten as

$$ \boldsymbol{e}_{k}=\boldsymbol{\Psi}_{k k}\boldsymbol{e}_{k,-1}+\boldsymbol{\nu}_{k}, $$

where $ e_{k} = [e_{k,2}, \ldots, e_{k,T}]' $ , $ e_{k,-1} = [e_{k,1}, \ldots, e_{k,T-1}]' $ . We sample parameter $ (\Lambda, \mathbf{R}) $ given parameter $ \Psi $ from the first equation, and parameter $ \Psi $ given $ (\Lambda, \mathbf{R}) $ from the second equation sequentially based on the following two-step algorithm.

Step 1. Sampling ( $ \Lambda_{k} $ , $ R_{kk} $ ) from conditional posterior distribution $ p(\Lambda_{k}, R_{kk} | \Psi_{kk}, \bar{S}^{T}, \theta, X^{T}) $ for estimating equation

$$ X_{k,t}^{*}=\Lambda_{k}S_{j,t}^{*}+\nu_{k,t},\qquad\nu_{k,t}\sim\mathbf{i.i.d.}N(0,R_{k k}),, $$

The posterior density of $ (\Lambda_{k}, R_{kk}) $ given the parameter $ \Psi_{kk} $ , the unobserved state variables $ \bar{S}^{T} $ and deep parameters $ \theta $ is represented as

$$ p(\Lambda_{k},R_{kk}|\Psi_{kk},\bar{\boldsymbol{S}}^{T},\boldsymbol{\theta},\boldsymbol{X}^{T})\quad\propto\quad p(\boldsymbol{X}^{T}|\bar{\boldsymbol{S}}^{T},\Lambda_{k},R_{kk},\Psi_{kk},\boldsymbol{\theta})p(\Lambda_{k},R_{kk}). $$

where $ p(\mathbf{X}^{T}|\bar{\mathbf{S}}^{T},\Lambda_{k},R_{kk},\Psi_{kk},\boldsymbol{\theta}) $ is likelihood function and $ p(\Lambda_{k},R_{kk}) $ is prior density.