
Approximate Bayesian inference for structural equation models (CFE-CMStatistics 2026)
December 12, 2026
\[ \definecolor{kaustorg}{RGB}{241, 143, 0} \definecolor{kausttur}{RGB}{0, 166, 170} \definecolor{kaustmer}{RGB}{177, 15, 46} \definecolor{kaustgrn}{RGB}{173, 191, 4} \definecolor{kaustblu}{RGB}{82, 132, 196} \definecolor{kaustpur}{RGB}{156, 111, 174} \]



diagnostics() names vb_shift_sigma nmad alpha
1 dem65~~dem65 -0.2410 0.0377 -3.2318
2 x2~~x2 -0.2919 0.0329 -3.2677
3 y4~~y4 0.0397 0.0143 -1.4484
4 y2~~y6 -0.0189 0.0116 0.7203
diagnostics(fit) gives the global checks. Here: converged, Hessian condition number 624, max VB shift 0.44 SD, max NMAD 0.038, and max scan-endpoint mass 0.003.
Per parameter, at no extra cost:
The top two by NMAD are \(\Psi_{2,2}\) and \(\Theta_{10,10}\): exactly the two hardest marginals against MCMC (98.9% and 98.5%), although neither crosses a warning threshold (NMAD 0.1, VB shift 1 SD).
Across S1–S4, rank correlations with the worst-case error are .64 (VB shift), .59 (endpoint mass) and .48 (NMAD), but with no general thresholds, and a second mode is invisible to local checks.
| Parameter | Type |
Prior
|
Scale of \(\boldsymbol\vartheta\) | |
|---|---|---|---|---|
| Diffuse | Informative | |||
| \(\nu_i\) | Observed intercept | \(\mathrm N(0,32^2)\) | \(\mathrm N(0,32^2)\) | \(\nu_i\) |
| \(\Lambda_{i,j}\) | Loading | \(\mathrm N(0,10^2)\) | \(\mathrm N(1.25,0.25^2)\) | \(\Lambda_{i,j}\) |
| \(B_{j,j'}\) | Regression coefficient | \(\mathrm N(0,10^2)\) | \(\mathrm N(1.5,0.25^2)\) | \(B_{j,j'}\) |
| \(\Theta_{i,i}^{1/2}\) | Residual SD | \(\Gamma(1,0.5)\) | \(\Gamma(10,10)\) | \(\log\Theta_{i,i}\) |
| \(\Psi_{j,j}^{1/2}\) | Latent SD | \(\Gamma(1,0.5)\) | \(\Gamma(10,10)\) | \(\log\Psi_{j,j}\) |
| \(\rho_{i,j}\) | Correlation (of a covariance) | \(\text{Beta}(1,1)\) | \(\text{Beta}(5,5)\) | \(\operatorname{artanh}\rho_{i,j}\) |
Diffuse priors (blavaan defaults) are used throughout; the informative set is used only in the SBC check. Latent intercepts \(\boldsymbol\alpha\) are fixed at 0 here. Beta priors on correlations are rescaled to \((-1, 1)\). Priors are carried to the unconstrained \(\boldsymbol\vartheta\) scale by change of variables.
Proposition (Equivalence of location corrections)
Let \(\small\bar\vartheta_j\) be the mean of the profile density \(\small p_j(t) \propto e^{h_j(t)}\) on the \(\small\vartheta_j\) scale. Under the regularity conditions for Laplace’s method, as \(\small n\to\infty\) with \(\small m\) fixed: \(\small\bar\vartheta_j = \vartheta_j^* + \hat\delta_j + O(n^{-2})\).
Sketch. With \(\sigma^2 = \Omega_{jj}\), \(\mathbf A = \tfrac{d}{dt}\nabla^2\ell(\boldsymbol\vartheta^* + t\mathbf v_j)\big|_{t=0} = -\mathbf H'\) (third derivatives along the scan) and \(\mathbf C = \boldsymbol\Omega - \mathbf v_j\mathbf v_j^\top\), Lemma 2 gives \(\gamma_j' = \tfrac12\operatorname{tr}(\mathbf A\mathbf C)\). Here \(\sigma\), \(\gamma_j'\) and \(s_j\) are \(O(n^{-1/2})\).
Profile: \(h_j(t) = c - \tfrac12 t^2 + \gamma_j' t + \tfrac16 s_j t^3 + \cdots\), with \(s_j = \mathbf v_j^\top\mathbf A\mathbf v_j\): \[ \begin{aligned} \bar\vartheta_j - \vartheta_j^* &= \sigma\big(\gamma_j' + \tfrac12 s_j\big) + O(n^{-2}) \\ &= \tfrac{\sigma}{2}\operatorname{tr}(\mathbf A\boldsymbol\Omega) + O(n^{-2}). \end{aligned} \]
VB: with \(\boldsymbol\epsilon\sim\operatorname{N}_m(\mathbf 0,\boldsymbol\Omega)\), project \(\operatorname{E}_{\boldsymbol\epsilon}\nabla\ell(\boldsymbol\vartheta^* + \hat{\boldsymbol\delta} + \boldsymbol\epsilon) = \mathbf 0\) onto \(\mathbf v_j\): \[ \begin{aligned} \hat\delta_j &= \tfrac{\sigma}{2}\operatorname{E}(\boldsymbol\epsilon^\top\mathbf A\boldsymbol\epsilon) + O(n^{-2}) \\ &= \tfrac{\sigma}{2}\operatorname{tr}(\mathbf A\boldsymbol\Omega) + O(n^{-2}). \end{aligned} \]

One-at-a-time perturbations. S1–S4 target conditions that Laplace’s method needs, and S5 the dimension: S1 \(n\) from 40 to 1200; S2 std. loadings of \(\eta_1\) from 0.8 to 0.3; S3 \(\operatorname{Cor}(\eta_1,\eta_3)^2\) from 0.2 to 0.98; S4 \(\Psi_{2,2}/\operatorname{Var}(\eta_2)\) from 0.50 to 0.01 (baseline 0.045); S5 \(m\) from 42 to 156. There are 18 conditions \(\times\) 100 replications, each also fitted by blavaan.
| Condition | CR95 (%) |
Diagnostics
|
vs. MCMC (medians; 95th pct. in brackets)
|
||||
|---|---|---|---|---|---|---|---|
| NMAD | VB shift | maxj ΔMean,j | minj JS (%) | Ref. | Worst (share) | ||
| S1 n = 1200 | 95.2 | 0.023 | 0.24 | 0.07 (0.25) | 99.3 | 100 | Ψ2,2 (42%) |
| S1 n = 75 | 92.4 | 0.041 | 0.51 | 0.23 (0.32) | 95.5 | 70 | Θ10,10 (71%) |
| S1 n = 40 | 92.3 | 0.049 | 0.59 | 0.32 (0.74) | 92.9 | 47 | Λ4,1 (21%) |
| S2 std. loadings 0.5 | 92.0 | 0.076 | 0.62 | 0.69 (1.37) | 76.6 | 48 | Ψ1,1 (75%) |
| S2 std. loadings 0.3 | 87.9 | 0.102 | 0.61 | 1.63 (3.73) | 43.5 | 36 | Ψ1,1 (81%) |
| S3 R² = 0.95 | 93.2 | 0.046 | 0.59 | 0.30 (0.66) | 87.0 | 78 | Ψ1,1 (49%) |
| S3 R² = 0.98 | 93.5 | 0.048 | 0.70 | 0.35 (0.71) | 82.8 | 80 | Ψ1,1 (50%) |
| S4 Ψ2,2/Var(η2) = 0.01 | 92.5 | 0.043 | 0.55 | 0.23 (0.32) | 94.9 | 76 | Θ10,10 (67%) |
| S5 m = 156, n = 75 | 94.0 | 0.049 | 0.64 | 0.19 (0.28) | 95.3 | 47 | Var(ητ=8) (23%) |
| Condition | CR95 (%) |
Diagnostics
|
vs. MCMC (medians; 95th pct. in brackets)
|
||||
|---|---|---|---|---|---|---|---|
| NMAD | VB shift | maxj ΔMean,j | minj JS (%) | Ref. | Worst (share) | ||
| S1 n = 1200 | 95.2 | 0.023 | 0.24 | 0.07 (0.25) | 99.3 | 100 | Ψ2,2 (42%) |
| S1 n = 600 | 94.5 | 0.029 | 0.31 | 0.12 (0.26) | 97.8 | 100 | Ψ2,2 (66%) |
| S1 n = 300 | 94.1 | 0.031 | 0.40 | 0.20 (0.28) | 96.7 | 99 | Ψ2,2 (72%) |
| S1 n = 150 | 94.1 | 0.037 | 0.43 | 0.21 (0.33) | 96.2 | 90 | Ψ2,2 (53%) |
| S1 n = 75 | 92.4 | 0.041 | 0.51 | 0.23 (0.32) | 95.5 | 70 | Θ10,10 (71%) |
| S1 n = 40 | 92.3 | 0.049 | 0.59 | 0.32 (0.74) | 92.9 | 47 | Λ4,1 (21%) |
| S2 std. loadings 0.5 | 92.0 | 0.076 | 0.62 | 0.69 (1.37) | 76.6 | 48 | Ψ1,1 (75%) |
| S2 std. loadings 0.3 | 87.9 | 0.102 | 0.61 | 1.63 (3.73) | 43.5 | 36 | Ψ1,1 (81%) |
| S3 R² = 0.80 | 93.3 | 0.043 | 0.46 | 0.21 (0.27) | 95.8 | 85 | Ψ2,2 (56%) |
| S3 R² = 0.95 | 93.2 | 0.046 | 0.59 | 0.30 (0.66) | 87.0 | 78 | Ψ1,1 (49%) |
| S3 R² = 0.98 | 93.5 | 0.048 | 0.70 | 0.35 (0.71) | 82.8 | 80 | Ψ1,1 (50%) |
Medians over 100 replications (95th percentile in brackets); vs-MCMC columns use usable references only (Ref., out of 100).
| Condition | CR95 (%) |
Diagnostics
|
vs. MCMC (medians; 95th pct. in brackets)
|
||||
|---|---|---|---|---|---|---|---|
| NMAD | VB shift | maxj ΔMean,j | minj JS (%) | Ref. | Worst (share) | ||
| S4 Ψ2,2/Var(η2) = 0.50 | 92.5 | 0.039 | 0.48 | 0.24 (0.64) | 95.0 | 65 | Θ10,10 (49%) |
| S4 Ψ2,2/Var(η2) = 0.15 | 93.6 | 0.036 | 0.47 | 0.24 (0.33) | 95.4 | 72 | Θ10,10 (72%) |
| S4 Ψ2,2/Var(η2) = 0.01 | 92.5 | 0.043 | 0.55 | 0.23 (0.32) | 94.9 | 76 | Θ10,10 (67%) |
| S5 m = 80, n = 75 | 93.9 | 0.048 | 0.59 | 0.20 (0.33) | 95.6 | 55 | Θ10,10 (49%) |
| S5 m = 80, n = 300 | 94.0 | 0.042 | 0.43 | 0.19 (0.25) | 96.7 | 94 | Ψ2,2 (39%) |
| S5 m = 156, n = 75 | 94.0 | 0.049 | 0.64 | 0.19 (0.28) | 95.3 | 47 | Var(ητ=8) (23%) |
| S5 m = 156, n = 300 | 94.5 | 0.045 | 0.52 | 0.20 (0.26) | 96.6 | 91 | Ψ2,2 (38%) |

| Tool | Good for | Catch |
|---|---|---|
| Bayes factor (Kass & Raftery, 1995) | Weighing evidence between models, priors included | Priors on extra parameters set the Occam penalty |
| PPP, BRMSEA, BCFI (Garnier-Villarreal & Jorgensen, 2020) | Checking whether one model fits | One model at a time; frequentist cut-offs |
| DIC (Spiegelhalter et al., 2002) | A quick predictive ranking | Plug-in; favours flexible models (Fujimoto & Falk, 2024) |
| LOO (Vehtari et al., 2017) | Predicting new subjects, with per-subject scores | \(n\) refits |

Theorem (Laplace approximation of the CPO) = No refits, no draws
Under \(\small\operatorname{N}_m(\tilde{\boldsymbol\vartheta}, \mathbf H^{-1})\), expand \(\small\ell_s(\boldsymbol\vartheta) := \log\pi(\mathbf y_s \mid \boldsymbol\vartheta)\) about \(\small\tilde{\boldsymbol\vartheta}\), with score \(\small\mathbf g_s := \nabla\ell_s(\tilde{\boldsymbol\vartheta})\) and information \(\small\boldsymbol{\mathcal I}_s := -\nabla^2\ell_s(\tilde{\boldsymbol\vartheta})\). The Gaussian integral is then exact: \[ \small \begin{aligned} {\color{gray}\tiny\mathrm{[1st]}} \ \log\hat\pi^{(1)}(\mathbf y_s \mid \mathbf y_{-s}) &= \ell_s(\tilde{\boldsymbol\vartheta}) - \tfrac12\, \mathbf g_s^\top \mathbf H^{-1} \mathbf g_s, \ {\color{gray}\scriptsize\leftarrow \text{optimistic by } \tfrac12 p_{\text{eff}} \text{ in total}} \\ {\color{gray}\tiny\mathrm{[2nd]}} \ \log\hat\pi^{(2)}(\mathbf y_s \mid \mathbf y_{-s}) &= \underbrace{\ell_s(\tilde{\boldsymbol\vartheta})}_{\text{fit}} - \underbrace{\tfrac12\, \mathbf g_s^\top (\mathbf H - \boldsymbol{\mathcal I}_s)^{-1} \mathbf g_s}_{\text{sensitivity}} + \underbrace{\tfrac12 \log\big| \mathbf H^{-1}(\mathbf H - \boldsymbol{\mathcal I}_s) \big|}_{\text{volume}}. \end{aligned} \] [2nd] exists \(\iff (\small\mathbf H - \boldsymbol{\mathcal I}_s) \succ \mathbf 0\), i.e., \(\small k_s := \lambda_{\max}(\mathbf H^{-1}\boldsymbol{\mathcal I}_s) < 1\).
fit_bollen <- asem(mod_bollen, PoliticalDemocracy, meanstructure = TRUE) # Bollen (1989)
fit_nodirect <- asem(mod_nodirect, PoliticalDemocracy, meanstructure = TRUE) # drop dem65~ind60
fit_nocov <- asem(mod_nocov, PoliticalDemocracy, meanstructure = TRUE) # drop residual covs
compare(fit_bollen, fit_nodirect, fit_nocov, loo = TRUE)Bayesian Model Comparison (INLAvaan)
Models ordered by ELPD (Taylor LOO, second-order)
elpd_diff/se_diff are paired differences vs the best model
Model npar Marg.Loglik logBF DIC pD ELPD SE p_loo elpd_diff se_diff
fit_bollen 42 -1697.938 -1.156 3179.035 41.050 -1590.199 20.256 40.457 0.000 0.000
fit_nodirect 41 -1696.782 0.000 3181.335 39.133 -1591.882 19.746 39.144 -1.683 2.316
fit_nocov 36 -1703.182 -6.401 3201.623 35.436 -1600.126 20.195 33.065 -9.927 6.609

| INLAvaan | HMC + PSIS | |
|---|---|---|
ELPD (bollen) |
−1590.2 | −1591.6 |
Δ (nodirect) |
−1.7 | −1.9 |
Δ (nocov) |
−9.9 | −9.3 |
| Time per model | 1.2 s + 0.07 s | 30 s + PSIS |
HMC: 30,000 draws on three cores.
loo() prints the summed gap against \(\tfrac12 p_{\text{eff}}\) as a free check on the truncation.