Approximate Bayesian inference for Structural Equation Models: The INLA approach

Fudan University School of Public Health
复旦大学公共卫生学院

Haziq Jamil

Research Specialist
BAYESCOMP @ CEMSE-KAUST

https://haziqj.ml/fudan-may26 | 📥 PDF

Håvard Rue

Professor of Statistics
BAYESCOMP @ CEMSE-KAUST

May 14, 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} \DeclareMathOperator*{\argmax}{argmax} \DeclareMathOperator*{\argmin}{argmin} \newcommand{\N}{\mathrm{N}} \newcommand{\SN}{\mathrm{SN}} \]

Bayesian Computational Statistics and Modeling Research Group (BAYESCOMP)

Led by Prof. Håvard Rue

Integrated Nested Laplace Approximation (INLA, Rue et al., 2009)

(right) Granular spatio-temporal mapping of HIV prevalence in sub-Saharan Africa for a 17-year period (Dwyer-Lindgren et al., 2019)

(top) Spatial modelling of corticol surface fMRI data: 2.5M data points, 8.7k mesh triangles = 148 seconds (Mejia et al., 2020).

Context

SEM in a nutshell

Analyse multivariate data \(\mathbf y=(y_1,\dots,y_p)^\top\) to measure and relate hidden variables \(\boldsymbol\eta=(\eta_1,\dots,\eta_q)^\top\), \(q \ll p\), and uncover complex patterns.

In the social sciences, latent variables are used to represent constructs—the theoretical, unobserved concepts of interest.

(Psychology)
Personality traits

(Healthcare)
Quality of life

(Political science)
Social trust

(Education)
Competencies

Towards scalable Bayesian estimation

“Using Bayesian SEMs in empirical research is hindered by slow inference”

  • Advantages of Bayesian estimation for SEM:
    • Natural formulation ias hierarchical latent Gaussian models
    • Robust, probabilistic accounting of uncertainty
    • Avoids small-sample breakdown (regularisation)
  • High computational cost with Markov chain Monte Carlo
    • Typically, dimensionality scales with \(n\)
    • Poor mixing and slow convergence
    • Infeasible for iterative applied work

Stolen from xkcd

Outline

  1. Brief overview of SEMs
    • Motivating example
    • Bayesian estimation
    • Likelihood function
  1. Approximate Bayesian estimation
    • Integrated nested Laplace approximations (INLA)
    • New recipe
    • Performance comparison
  1. Healthcare application
    • CHARLS-inspired model
  • Jamil, H., & Rue, H. (2026a). Approximate Bayesian inference for structural equation models using integrated nested Laplace approximations (2603.25690 [stat.ME]). arXiv. DOI: 10.48550/arXiv.2603.25690
  • Jamil, H., & Rue, H. (2026b). Implementation and workflows for INLA-based approximate Bayesian structural equation modelling (2604.00671 [stat.CO]). arXiv. DOI: 10.48550/arXiv.2604.00671

Structural equation models (SEMs)

Motivating example

Glycemic control and kidney health

Does poorer glycemic control lead to greater severity of kidney disease?

Observe \(p=6\) variables for each patient:

Indicator Description Unit
\(y_1\) HbA1c 3-month avg. blood glucose %
\(y_2\) FPG Fasting plasma glucose mmol/L
\(y_3\) Insulin Fasting insulin level µU/mL
\(y_4\) PCr Plasma creatinine µmol/L
\(y_5\) ACR Albumin–creatinine ratio mg/g
\(y_6\) BUN Blood urea nitrogen mmol/L

“casewise” thinking leads to \[ \small \begin{align*} \textcolor{kaustmer}{y_{4}} &= \beta_0^{(4)} + \beta_1^{(4)} \textcolor{kaustblu}{y_{1}} + \beta_2^{(4)} \textcolor{kaustblu}{y_{2}} + \beta_3^{(4)} \textcolor{kaustblu}{y_{3}} + \epsilon^{(4)} \\ \textcolor{kaustmer}{y_{5}} &= \beta_0^{(5)} + \beta_1^{(5)} \textcolor{kaustblu}{y_{1}} + \beta_2^{(5)} \textcolor{kaustblu}{y_{2}} + \beta_3^{(5)} \textcolor{kaustblu}{y_{3}} + \epsilon^{(5)} \\ \textcolor{kaustmer}{y_{6}} &= \beta_0^{(6)} + \beta_1^{(6)} \textcolor{kaustblu}{y_{1}} + \beta_2^{(6)} \textcolor{kaustblu}{y_{2}} + \beta_3^{(6)} \textcolor{kaustblu}{y_{3}} + \epsilon^{(6)} \\ \end{align*} \]

  • Does not give a clear and direct answer.

  • Moreover, variables are assumed to be measured without error.

Covariance-based approach

Sample correlation matrix looks like this1:

  • The data suggests clustering of variables
    • \(y_1\),\(y_2\),\(y_3\) measure glycemic control (\(\texttt{GlyCon}\))
    • \(y_4\),\(y_5\),\(y_6\) measure kidney health (\(\texttt{KdnHlt}\))
  • There is an element of dimension-reduction; much needed for analysing (correlated) multivariate data.
  • Easier to hypothesize relationships, e.g. \[ {\color{kaustmer}\texttt{KdnHlt}} = \alpha + \beta \, {\color{kaustblu}\texttt{GlyCon}} + \texttt{error} \]

  • SEM is about modelling the covariance structure of the data, \[ \boldsymbol\Sigma = \boldsymbol\Sigma(\boldsymbol\vartheta). \]

SEM equations

\[ \small \begin{gathered} \begin{pmatrix} y_1 \\ y_2 \\ y_3 \\ y_4 \\ y_5 \\ y_6 \end{pmatrix} = \begin{pmatrix} \textcolor{kaustpur}{\lambda_{11}} & 0 \\ \textcolor{kaustpur}{\lambda_{21}} & 0 \\ \textcolor{kaustpur}{\lambda_{31}} & 0 \\ 0 & \textcolor{kaustpur}{\lambda_{42}} \\ 0 & \textcolor{kaustpur}{\lambda_{52}} \\ 0 & \textcolor{kaustpur}{\lambda_{62}} \\ \end{pmatrix} \begin{pmatrix} \eta_1 \\ \eta_2 \end{pmatrix} + \begin{pmatrix} \epsilon_1 \\ \epsilon_2 \\ \epsilon_3 \\ \epsilon_4 \\ \epsilon_5 \\ \epsilon_6 \end{pmatrix} \\[1em] \begin{pmatrix} \eta_1 \\ \eta_2 \end{pmatrix} = \begin{pmatrix} 0 & 0 \\ {\color{kaustgrn}\beta} & 0 \\ \end{pmatrix} \begin{pmatrix} \eta_1 \\ \eta_2 \end{pmatrix} + \begin{pmatrix} \zeta_1 \\ \zeta_2 \end{pmatrix} \end{gathered} \]

Or, more compactly as \[ \begin{gathered} \mathbf y = {\color{Gray}\boldsymbol\nu +\,} {\color{kaustpur}\boldsymbol\Lambda} \boldsymbol\eta + \boldsymbol\epsilon \\ \boldsymbol\eta = {\color{Gray}\boldsymbol\alpha +\,} {\color{kaustgrn}\mathbf B} \boldsymbol\eta + \boldsymbol\zeta \end{gathered} \]

with assumptions \(\boldsymbol\epsilon\sim\operatorname{N}_p(\mathbf 0, {\color{kaustorg}\boldsymbol\Theta})\), \(\boldsymbol\zeta\sim\operatorname{N}_q(\mathbf 0, {\color{kausttur}\boldsymbol\Psi})\), and \(\boldsymbol\epsilon \perp \boldsymbol\zeta\).

  • SEM parameters include the (possibly constrained transform) free entries of \(\color{Gray}\boldsymbol\nu\), \(\color{kaustpur}\boldsymbol\Lambda\), \(\color{kaustorg}\boldsymbol\Theta\), \(\color{Gray}\boldsymbol\alpha\), \(\color{kaustgrn}\mathbf B\), and \(\color{kausttur}\boldsymbol\Psi\).

  • Collect in \(\boldsymbol\vartheta \in\mathbb R^m\), where \(m < p(p+1)/2 {\color{Gray} \,+\, p}\).

  • Bayesian priors \(\boldsymbol\vartheta\sim\pi(\boldsymbol\vartheta)\).

Reduced form

Hiearchical form

\[ \small \begin{align} \mathbf y \mid \boldsymbol\eta, \boldsymbol\vartheta_1 &\sim \prod_{s=1}^n \mathcal N_p(\mathbf y_s; \boldsymbol\nu + \boldsymbol\Lambda \boldsymbol\eta_s, \boldsymbol\Theta ) \\ \boldsymbol\eta \mid \boldsymbol\vartheta_2 &\sim \prod_{s=1}^n \mathcal N_p\big((\mathbf I - \mathbf B)\boldsymbol\eta_s; \boldsymbol\alpha, \boldsymbol\Psi \big) \\ \boldsymbol\vartheta := \{\boldsymbol\vartheta_1, \boldsymbol\vartheta_2\} &\sim \pi(\boldsymbol\vartheta) \end{align} \]

Reduced form of the SEM

\[ \small \begin{align} \mathbf y \mid \boldsymbol\vartheta &\sim \prod_{s=1}^n \mathcal N_p \big(\mathbf y_s; \boldsymbol\mu(\boldsymbol\vartheta), \boldsymbol\Sigma(\boldsymbol\vartheta) \big) \\ \boldsymbol\mu(\boldsymbol\vartheta) &= \boldsymbol\nu + \boldsymbol\Lambda (\mathbf I - \mathbf B)^{-1} \boldsymbol\alpha \\ \boldsymbol\Sigma(\boldsymbol\vartheta) &= \boldsymbol\Lambda (\mathbf I - \mathbf B)^{-1} \boldsymbol\Psi (\mathbf I - \mathbf B)^{-\top} \boldsymbol\Lambda^\top + \boldsymbol\Theta \end{align} \]

  • Reduced form is possible since \(\pi(\mathbf y \mid \boldsymbol\vartheta) = \int \pi(\mathbf y \mid \boldsymbol\eta,\boldsymbol\vartheta)\pi(\boldsymbol\eta \mid \boldsymbol\vartheta) \, d\boldsymbol\eta\) is tractable (convolution of normals).

  • Contrary to usual Bayesian formulations, especially MCMC.

  • In this case, it is more advantageous:
    1. Closed-form likelihoods and gradients
    2. Problem reduces to optimisation on an \(m\)-dimensional space
    3. Covers many variations of normal SEM likelihood (multigroup, multilevel, full-information missing data)

INLA-based estimation

The {INLAvaan} recipe

  1. Global Laplace approximation to estimate \(\phantom{spacespacespacespacespacespace}\) \[ \small \pi(\boldsymbol\vartheta \mid \mathbf y) \propto \pi(\mathbf y \mid \boldsymbol\vartheta) \, \pi(\boldsymbol\vartheta) \equiv \pi(\mathbf y, \boldsymbol\vartheta) \]
  1. Variational mean correction and improvement \(\phantom{spacespacespacespacespacespace}\) \[ \small \min \operatorname{D}_{\textrm{KL}} \big( q \, \big\Vert \, \pi(\cdot \mid \mathbf y) \big) \]
  1. (Skew-normal) Marginalisation for each posterior \(\vartheta_j\) \(\phantom{spacespacespacespacespace}\) \[ \small \pi(\vartheta_j \mid \mathbf y) = \int_{\mathbb R^{m-1}} \pi(\boldsymbol{\vartheta} \mid \mathbf{y}) \, d \boldsymbol\vartheta_{-j}, \quad j=1,\dots,m, \]
  1. Gaussian copula sampling for quantities of interest \(\phantom{spacespacespacespacespace}\) \[ \small \hat{\operatorname{E}}(g(\boldsymbol\vartheta)) = \sum_{b=1}^B g(\boldsymbol\vartheta^{(b)}), \qquad \boldsymbol\vartheta\sim \hat\pi(\boldsymbol\vartheta \mid \mathbf y) \]

[Step 1] Global Laplace approximation

Laplace approximation (Kass & Raftery, 1995; Tierney et al., 1989)

Assume that \(\small f(\boldsymbol\vartheta):=\log \pi(\mathbf y, \boldsymbol\vartheta)\) is twice continuously differentiable, and let \(\small \boldsymbol\vartheta^* = \argmax_{\boldsymbol\vartheta} f(\boldsymbol\vartheta)\). Consider the Taylor expansion of \(\small f\) about \(\small \boldsymbol\vartheta^*\): \[ \small f(\boldsymbol\vartheta) \approx f(\boldsymbol\vartheta^*) - \frac12 (\boldsymbol\vartheta - \boldsymbol\vartheta^*)^\top \cdot \overbrace{-\nabla_{\boldsymbol\vartheta}^2 f(\boldsymbol\vartheta) \Big|_{\boldsymbol\vartheta=\boldsymbol\vartheta^*}}^{\mathbf H} \cdot (\boldsymbol\vartheta - \boldsymbol\vartheta^*). \tag{1}\] Therefore, \(\small\pi(\boldsymbol\vartheta \mid \mathbf y) \approx \mathcal N_m(\boldsymbol\vartheta; \boldsymbol\vartheta^*, \mathbf H^{-1})\).

  • Under standard regularity conditions, the approximation achieves a relative error of \(\mathcal{O}(n^{-1})\) for the posterior density and marginal likelihood (Rue et al., 2017)—c.f. additive \(\mathcal{O}(n^{-1/2})\) error typical of simulation-based methods.

  • By the Bernstein-von Mises theorem, the posterior concentrates at a rate of \(n^{-1/2}\) and converges to a Gaussian in total variation (van der Vaart, 1998).

[Step 1] Global Laplace approximation (cont.)

[Step 2] Variational mean correction

  • Posterior mode is often far away from the “typical set”, especially for skewed distributions.

  • Laplace may misrepresent the bulk of the distribution—correction needed!

  • van Niekerk & Rue (2024) propose a Variational Bayes (VB) correction to the mean of global Laplace: \[ \hat\delta = \argmin_\delta \operatorname{D}_{\text{KL}}\big( \mathcal N_m(\, \cdot \, ; \boldsymbol\vartheta^* + \boldsymbol\delta, \mathbf H^{-1}) \;\big\Vert\; \pi(\cdot \mid \mathbf y) \big). \]
    • Distribution that minimises information loss (Zellner, 1988).
    • Laplace gets the shape (curvature) right. Avoid the massive cost of learning a high-dimensional covariance matrix.
    • Shift the entire Gaussian distribution to center over the true posterior mean.

[Step 3] Marginal posteriors

  • Use the Laplace approximation (1), this time to approximate an integral: \[ \pi(\vartheta_j \mid \mathbf y) = \int_{\mathbb R^{m-1}} e^{\log \pi(\vartheta_j, \boldsymbol\vartheta_{-j} \mid \mathbf y)} \, d \boldsymbol\vartheta_{-j} \approx (2\pi)^{\frac{m-1}{2}} \times \overbrace{\pi(\vartheta_j, \boldsymbol\vartheta_{-j}^* \mid y)}^{\text{height}} \times \overbrace{\left| \mathbf H_{-j}(\vartheta_j) \right|^{-1/2 }}^{\text{(cond.) width}} \]
  • Geometric intuition: at each \(\vartheta_j\), the “area” is roughly the product of the joint peak and the local spread.
  • This is expensive to compute, as for every \(\vartheta_j\) evaluation, need

    1. An optimisation of \(\boldsymbol\vartheta_{-j}\in\mathbb R^{m-1}\) at this location; and
    2. The (log) determinant of the Hessian there.
  • Next slide: two important results.

[Step 3] Marginal posteriors (cont.)—the “height”

Lemma 1 (Conditional Mean Path) = No need for reoptimisation

Let \(\small \boldsymbol\vartheta\sim\N_m(\boldsymbol\vartheta^*,\boldsymbol\Omega)\) with \(\small\boldsymbol\Omega \succ \mathbf 0\). Then the marginal density of the \(\small j\)th component, \(\small j=1,\dots,m\), is proportional to the joint density evaluated along its CMP: \[ \small \pi(\vartheta_j=x) \propto \pi\big(\vartheta_j=x, \, \boldsymbol\vartheta_{-j} = \operatorname{E}[ \boldsymbol\vartheta_{-j} \mid \vartheta_j=x] \big). \]

  • Operationally,

    1. Lay out a grid \(\mathcal G_j=\big\{\boldsymbol\vartheta^* + t\,\mathbf v_j \;\big|\;t\in[-4,4]\big\}\), \(\mathbf v_j = \Omega_{jj}^{1/2} \, \boldsymbol\Omega_{\cdot j}\).
    2. Evaluate joint posterior \(\pi(\boldsymbol\vartheta \mid \mathbf y)\) at each grid point.
  • Scanning along the CMP is cheap; no re-optimisation needed.

  • For Gaussian posteriors, this is exact; otherwise it provides a first-order approximation to a potentially curved ridge.

[Step 3] Marginal posteriors (cont.)—the “width”

Lemma 2 (Efficient volume correction) = No need to factor dense Hessian

For the \(\small j\)th component along the CMP, \(\small-\frac12 \log | \mathbf H_{-j}(t) | \approx \text{const.} + t\gamma_j'(0)\). Then \[ \small \gamma_j'(0) = -\frac{1}{2} \sum_{k=1}^m \frac{d}{dt}\!\left[ \mathbf{L}_{\cdot k}^{\top}\,\frac{d}{d\mathbf{L}_{\cdot k}}\mathbf{g}(\boldsymbol\vartheta) \right]_{t=0} + \frac{1}{2}\, \frac{d}{dt}\!\left[ \mathbf{v}_j^{\top}\,\frac{d}{d\mathbf{v}_j}\mathbf{g}(\boldsymbol\vartheta) \right]_{t=0}, \] where \(\small\mathbf{g}(\boldsymbol\vartheta) = -\nabla_{\boldsymbol\vartheta} \log \pi(\boldsymbol\vartheta \mid \mathbf{y})\), and \(\small\mathbf H(\boldsymbol\vartheta^*)^{-1}=\mathbf L\mathbf L^\top\).

  • For non-symmetric densities, the conditional spread (“width”) changes along the scan line. This change can be computed entirely via directional derivatives.

  • Forward difference cost is only \(m+2\) gradient evaluations for each \(j\). Note: Baseline is unity in whitened coordinates.

    1. [outer \(\small\nabla^3\)] Shift to \(\boldsymbol\vartheta^+\) along CMP, evaluate gradient.
    2. [inner \(\small\nabla^2\)] Perturb along \(\mathbf{L}_{\cdot k}\) and the scan direction \(\mathbf{v}_j\), evaluating gradients.

[Step 3] Marginal posteriors (cont.)—SN curve fit

  • We now have paired evaluations \((\vartheta_j(t_k), h_{kj})\), where \(t_k\in[-4,4]\) are std. grid points, and \(h_{kj} \approx \log \pi(\boldsymbol\vartheta^* + t_k \mathbf v_j \mid y ) + \gamma_j'(0) \, t_k\) are unnormalised ordinates.

  • Fit a skew normal pdf to these points via weighted least squares, i.e. solve \[(\hat\xi_j,\hat\omega_j,\hat\alpha_j,\hat c_j) = \argmin_{\xi,\omega,\alpha,c} \, \sum_{k=1}^K w_{kj}\big[ h_{kj}-\big\{\log f_{\mathrm{SN}}(\vartheta_j(t_k);\xi,\omega,\alpha)+c\big\} \big]^2,\] where a convenient default is \(w_{kj} \propto \exp(h_{kj})\), for \(j=1,\dots m\).

[Step 4] Gaussian copula sampling

\[ \underbrace{\mathbf z \sim N(\mathbf 0, \mathbf R)}_{\text{Gaussian correlation}} \xrightarrow{\ \Phi(\cdot) \ } \underbrace{\mathbf u}_{\ \text{Uniform} \ } \xrightarrow{ \ F_{\text{SN}}^{-1}(\cdot) \ } \underbrace{\boldsymbol\vartheta}_{\text{SN Marginals}} \xrightarrow{ \ h(\cdot) \ } \text{trans. params.} \]

  • Reconstruct joint posterior samples \(h(\boldsymbol\vartheta^{(b)})\) using a Copula (Nelsen, 2006), preserving Gaussian correlations: \[ \mathbf R = \mathbf D^{-1/2} \boldsymbol \Omega \mathbf D^{-1/2}, \qquad \mathbf D = \operatorname{diag}(\boldsymbol\Omega). \]

  • Under skewness (i.e. \(\alpha_j \neq 0\)), nonlinear quantile transforms are distorted. Fix: NORTA algorithm (NORmal To Anything, Cario & Nelson, 1997).

  • This also allows us to derive approximate posteriors for

    1. Posterior Predictive P-value (PPP), e.g. \(\#\{ T(\mathbf S_{\text{obs}}, \boldsymbol\Sigma(\boldsymbol\vartheta)) > T(\mathbf S_{\text{rep}}, \boldsymbol\Sigma(\boldsymbol\vartheta)) \}\).
    2. Factor scores, \(\boldsymbol\eta \mid \boldsymbol\vartheta \sim \N_q(\mathbf m(\boldsymbol\vartheta), \mathbf V(\boldsymbol\vartheta))\).
    3. Prediction and imputation.

The R/INLAvaan package

library(INLAvaan)

mod <- "
  # Measurement model
  KdnHlt =~ y1 + y2 + y3
  GlyCon =~ y4 + y5 + y6

  # Structural model
  KdnHlt ~ GlyCon
"

fit <- INLAvaan::asem(
  model = mod, 
  data = Kidney
)
timing(fit)
 total 
0.35 s 

Vignettes and tutorials available on https://inlavaan.haziqj.ml/

(b)lavaan S4 methods

print(fit)
INLAvaan 0.2.4.9001 ended normally after 84 iterations

  Estimator                                      BAYES
  Optimization method                           NLMINB
  Number of model parameters                        13

  Number of observations                           250

Model Test (User Model):

   Marginal log-likelihood                   -6176.617 
   PPP (Chi-square)                              0.487 

Also available:

  • summary()
  • fitmeasures()
  • predict()
  • standardisedsolution()
  • vcov()
  • plot()
coef(fit)
    KdnHlt=~y2     KdnHlt=~y3     GlyCon=~y5     GlyCon=~y6  KdnHlt~GlyCon 
         0.702          0.175          1.004          0.282          0.291 
        y1~~y1         y2~~y2         y3~~y3         y4~~y4         y5~~y5 
       293.046        267.537         11.180        508.811        216.423 
        y6~~y6 KdnHlt~~KdnHlt GlyCon~~GlyCon 
        18.739        578.072        346.831 

Comparison to MCMC

Parameter recovery from simulated data

Effects of prior distributions

  • Loadings: \(\lambda \sim \N(0,10^2) \rightsquigarrow \lambda \sim \N(3,0.1^2)\)

  • Latent variances: \(\psi^{1/2} \sim \Gamma(1,0.5) \rightsquigarrow \psi \sim \Gamma(100,50)\)

Application: multimorbidity in ageing China

China Health & Retirement Longitudinal Study

  • Biennial longitudinal survey of Chinese residents aged 45+, run by Peking University since 2011 (Zhao et al., 2013)
  • \(n\) = 17,587 across 150 counties, 28 provinces. 52.7% rural vs. 47.3% urban PSUs.

Simulated data

CHARLS required registration; not available in time!

Domain Indicators
Cardiometabolic (CM) hypertension, diabetes, dyslipidaemia, CHD
Physical functioning (PF) grip_strength, gait_speed, adl_count, iadl_count
Neuropsychiatric (NP) cesd10, word_recall, mental_status, stroke

Research question: Is the disease burden similar in urban and rural areas?

Bifactor SEM: General + domain-specific disease burden

Bifactor (Schmid–Leiman) structure

  • Multimorbidity: older adults typically do not just suffer from one disease domain
  • A bifactor structure to perform variance decomposition
    • G general comorbidity burden
    • CM / PF / NP domain-specific factors, mutually orthogonal
  • Fitted separately for Urban and Rural → multigroup CFA
  • Of interest: \[\alpha_G^{\text{Rural}} - \alpha_G^{\text{Urban}} \overset{?}{=} 0\]

Measurement invariance

  • Comparing latent means (\(\alpha_G^{\text{Rural}} - \alpha_G^{\text{Urban}}\)) is only valid when item loadings and intercepts function identically across groups.
    • Geographical factors fundamentally alter psychometric architecture of comorbidity?
    • Problem: Differences may reflect measurement artefacts, not true burden.

Measurement Non-invariance ⛔️

Measurement Invariance ✅

Meredith (1993) sequence

  • Using R/INLAvaan, we fit 3 models and compare Bayes factors.
fit_config <- acfa(model, charls_dat, group = "group", 
                   meanstructure = TRUE)
Model Constraints \(m\) DIC \(\log\text{BF}\) Time
1 Configural (free) \(\boldsymbol\vartheta^{\text{Rural}} \neq \boldsymbol\vartheta^{\text{Urban}}\) 96 521865.3 0.0 3.08 s
2 Weak invariance \(\boldsymbol\Lambda^{\text{Rural}} \equiv \boldsymbol\Lambda^{\text{Urban}}\) 72 521829.9 157.7 2.72 s
3 Strong invariance \(\boldsymbol\Lambda^{\text{Rural}} \equiv \boldsymbol\Lambda^{\text{Urban}}\), \(\boldsymbol\nu^{\text{Rural}} \equiv \boldsymbol\nu^{\text{Urban}}\) 61 521819.7 244.9 2.33 s
  • MCMC potentially could take hours to fit separately.

  • May compare models based on other fit indices, such as Leave-One-Out Cross Validation (LOOCV, Vehtari et al., 2017).

Posterior outputs

Configural model (no constraints)

Strong invariance model

  • Latent mean difference \(\delta := \alpha_G^{\text{Rural}} - \alpha_G^{\text{Urban}}\) for general disease burden
Mean SD 2.5% 97.5%
0.340 0.021 0.299 0.380
  • Strong evidence of a genuine between-group difference.
  • Rural older adults carry a systematically higher overall multimorbidity burden than their urban counterparts, even after accounting for the three domain-specific factors (CM, PF, NP).

Conclusion

Summary

  • 🚀 INLA methodology offers a rapid alternative for SEM, delivering Bayesian results at near the speed of frequentist estimators.
    • Not aiming to replace MCMC; use case is model development, testing, and exploratory analysis.

  • Vignettes and tutorials available on https://inlavaan.haziqj.ml/: Equality constraints, defined parameters, multigroup, multilevel, and missing data.

谢谢

感谢聆听,敬请指正。
https://haziqj.ml/fudan-may26

References

Cario, M. C., & Nelson, B. L. (1997). Modeling and generating random vectors with arbitrary marginal distributions and correlation matrix. Department of Industrial Engineering and Management, Northwestern University, Evanston.
Dwyer-Lindgren, L., Cork, M. A., Sligar, A., Steuben, K. M., Wilson, K. F., Provost, N. R., Mayala, B. K., VanderHeide, J. D., Collison, M. L., Hall, J. B., Biehl, M. H., Carter, A., Frank, T., Douwes-Schultz, D., Burstein, R., Casey, D. C., Deshpande, A., Earl, L., El Bcheraoui, C., … Hay, S. I. (2019). Mapping HIV prevalence in sub-Saharan Africa between 2000 and 2017. Nature, 570(7760), 189–193. https://doi.org/10.1038/s41586-019-1200-9
Freni-Sterrantino, A., Rustand, D., Van Niekerk, J., Krainski, E., & Rue, H. (2025). A graphical framework for interpretable correlation matrix models for multivariate regression. Statistical Methods & Applications, 34(3), 409–447. https://doi.org/10.1007/s10260-025-00788-y
Jamil, H., & Rue, H. (2026a). Approximate Bayesian inference for structural equation models using integrated nested Laplace approximations (2603.25690 [stat.ME]). arXiv. https://doi.org/10.48550/arXiv.2603.25690
Jamil, H., & Rue, H. (2026b). Implementation and workflows for INLA-based approximate Bayesian structural equation modelling (2604.00671 [stat.CO]). arXiv. https://doi.org/10.48550/arXiv.2604.00671
Kass, R. E., & Raftery, A. E. (1995). Bayes Factors. Journal of the American Statistical Association, 90(430), 773–795. https://doi.org/10.1080/01621459.1995.10476572
Krainski, E., Gómez-Rubio, V., Bakka, H., Lenzi, A., Castro-Camilo, D., Simpson, D., Lindgren, F., & Rue, H. (2018). Advanced spatial modeling with stochastic partial differential equations using R and INLA. Chapman and Hall/CRC.
Mejia, A. F., Yue, Y. (Ryan)., Bolin, D., Lindgren, F., & Lindquist, M. A. (2020). A Bayesian General Linear Modeling Approach to Cortical Surface fMRI Data Analysis. Journal of the American Statistical Association, 115(530), 501–520. https://doi.org/10.1080/01621459.2019.1611582
Meredith, W. (1993). Measurement invariance, factor analysis and factorial invariance. Psychometrika, 58(4), 525–543. https://doi.org/10.1007/BF02294825
Nelsen, R. B. (2006). An introduction to copulas (2nd ed). Springer.
Rue, H., Martino, S., & Chopin, N. (2009). Approximate Bayesian Inference for Latent Gaussian models by using Integrated Nested Laplace Approximations. Journal of the Royal Statistical Society Series B: Statistical Methodology, 71(2), 319–392. https://doi.org/10.1111/j.1467-9868.2008.00700.x
Rue, H., Riebler, A., Sørbye, S. H., Illian, J. B., Simpson, D. P., & Lindgren, F. K. (2017). Bayesian Computing with INLA: A Review. Annual Review of Statistics and Its Application, 4(1), 395–421. https://doi.org/10.1146/annurev-statistics-060116-054045
Simpson, D., Rue, H., Riebler, A., Martins, T. G., & Sørbye, S. H. (2017). Penalising Model Component Complexity: A Principled, Practical Approach to Constructing Priors. Statistical Science, 32(1), 1–28. https://doi.org/10.1214/16-STS576
Song, X.-Y., & Lee, S.-Y. (2012). Basic and Advanced Bayesian Structural Equation Modeling: With Applications in the Medical and Behavioral Sciences (1st ed.). Wiley. https://doi.org/10.1002/9781118358887
Tierney, L., Kass, R. E., & Kadane, J. B. (1989). Fully Exponential Laplace Approximations to Expectations and Variances of Nonpositive Functions. Journal of the American Statistical Association, 84(407), 710–716. https://doi.org/10.1080/01621459.1989.10478824
van der Vaart, A. W. (1998). Asymptotic Statistics. Cambridge University Press. https://doi.org/10.1017/CBO9780511802256
van Niekerk, J., & Rue, H. (2024). Low-rank Variational Bayes correction to the Laplace method. Journal of Machine Learning Research.
Vehtari, A., Gelman, A., & Gabry, J. (2017). Practical Bayesian model evaluation using leave-one-out cross-validation and WAIC. Statistics and Computing, 27(5), 1413–1432. https://doi.org/10.1007/s11222-016-9696-4
Zellner, A. (1988). Optimal Information Processing and Bayes’s Theorem. The American Statistician, 42(4), 278–280. https://doi.org/10.2307/2685143
Zhao, Y., Strauss, J., Yang, G., Giles, J., Hu, P., Hu, Y., Lei, X., Liu, M., Park, A., Smith, J. P., & Wang, Y. (2013). China health and retirement longitudinal study – 2011–2012 national baseline users’ guide. National School of Development, Peking University.