where $\eta_{t}$ is forecasting errors, $\mathbf{K}_{t}$ is Kalman gain, $\tilde{\mathbf{P}}_{t}$ is variance covariance matrix of state variables $\tilde{S}_{t}$. Filtering of $\tilde{S}_{t|t}$, $\tilde{\mathbf{P}}_{t|t}$ iterates forward for period $t=1,2,\cdots,T$. And for initial value $\tilde{S}_{1|1}$, $\tilde{\mathbf{P}}_{1|1}$, we set $\tilde{\mathbf{X}}_{1}=\tilde{\mathbf{\Lambda}}\tilde{S}_{1}$, and $\tilde{\mathbf{P}}_{1|1}=\tilde{\mathbf{G}}\tilde{\mathbf{P}}_{1|1}\tilde{\mathbf{G}}^{\prime}+\tilde{\mathbf{E}}\mathbf{Q}(\boldsymbol{\theta})\tilde{\mathbf{E}}^{\prime}$, where subscript $t|t$ of $\tilde{S}_{t|t}$ denotes conditional expected value of $\tilde{S}_{t}$ up to information on $X_{1},\cdots,X_{t}$, thus, $E(\tilde{\mathbf{S}}_{t}|\mathbf{X}_{1},\mathbf{X}_{2},\cdots,\mathbf{X}_{t})$.

Step 2: Generate values of $ r_{t-1} $ , $ N_{t-1} $ by implementing simulation smoother.

This algorithm is iterated backward from period: $ t = T, \cdots, 2, 1 $ using values obtained from Kalman filter, as following equations (A.10), (A.11).

$$ \boldsymbol{r}_{t-1}=\tilde{\boldsymbol{\Lambda}}^{\prime}\mathbf{F}_{t}^{-1}\boldsymbol{\eta}_{t}-\mathbf{W}_{t}^{\prime}\mathbf{C}_{t}^{-1}\boldsymbol{d}_{t}+\mathbf{L}_{t}^{\prime}\boldsymbol{r}_{t}, $$

$$ \mathbf{N}_{t-1}=\tilde{\mathbf{\Lambda}}^{\prime}\mathbf{F}_{t}^{-1}\tilde{\mathbf{\Lambda}}+\mathbf{W}_{t}^{\prime}\mathbf{C}_{t}^{-1}\mathbf{W}_{t}+\mathbf{L}_{t}^{\prime}\mathbf{N}_{t}\mathbf{L}_{t}, $$

where $ W_{t} $ and $ C_{t} $ are obtained from the equations such as

$$ \mathbf{W}_{t}=\mathbf{Q}(\boldsymbol{\theta})\tilde{\mathbf{E}}^{\prime}\mathbf{N}_{t}\mathbf{L}_{t}, $$

$$ \mathbf{C}_{t}=\mathbf{Q}(\boldsymbol{\theta})-\mathbf{Q}(\boldsymbol{\theta})\tilde{\mathbf{E}}^{\prime}\mathbf{N}_{t}\tilde{\mathbf{E}}\mathbf{Q}(\boldsymbol{\theta}), $$

and random variable $ d_{t} $ is generated from $ N(\mathbf{0}, \mathbf{C}_{t}) $ . Initial value $ r_{T} $ and $ N_{T} $ are set at $ r_{T} = 0 $ , and $ N_{T} = O $ .

Step 3: Smoothing of structural shocks $ \hat{\varepsilon}_{t|T} $ , are implemented backward iteration using the equation (A.12).

Subscript $ t|T $ of $ \hat{\varepsilon}_{t|T} $ denotes expected value conditional on total sample period such as $ E(\varepsilon_{t}|X_{1},X_{2},\cdots,X_{T}) $ .

$$ \hat{\varepsilon}_{t|T}=\mathbf{Q}(\boldsymbol{\theta})\tilde{\mathbf{E}}^{\prime}\boldsymbol{r}_{t}+\boldsymbol{d}_{t}\qquad\boldsymbol{d}_{t}\sim N(\mathbf{0},\mathbf{C}_{t}),\qquad t=T,\cdots,2,1 $$

Step 4: Generate model variables $ \tilde{S}_{t} $ by forward iteration of the equation (A.13).

$$ \tilde{\boldsymbol{S}}_{t+1|T}=\tilde{\mathbf{G}}\tilde{\boldsymbol{S}}_{t}+\mathbf{E}\hat{\varepsilon}_{t|T},\qquad t=1,2,\cdots,T, $$

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 procedure generating model variables $ \tilde{\pmb{S}}_{t}(t=1,2,\cdots,T) $ from conditional posterior distribution $ p(\pmb{S}^{T}|\pmb{\Gamma}^{(g-1)},\pmb{\theta},\pmb{X}^{T}) $ which is implemented in Step 3.1 of Section 4.

#### A.3 Sampling of Parameters Set $\Gamma$ of Measurement Equation (2.11)

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

$$ \begin{array}{r}{(\mathbf{I}-\mathbf{\Psi}L)\mathbf{X}_{t}=(\mathbf{I}-\mathbf{\Psi}L)\mathbf{\Lambda}S_{t}+\mathbf{\nu}_{t},\qquad\mathbf{\nu}_{t}\sim i.i.d.N(\mathbf{0},\mathbf{R}),}\end{array} $$

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