Skip to main content

Frequentist’s are our Friends: A Bayesian’s Hierarchical Story

What frequentist effects coding and Fisher information do inside a Bayesian hierarchical model: exact orthogonalization, Loewner dominance, Louis’s missing-information identity, partially centered sum-to-zero contrasts, and why HMC still needs the Bayesian typical set.
stan
hierarchical-models
parameterizations
lean4
Author

Sean Pinkney

Published

November 29, 2026

1. Two Communities, One Linear Predictor

Write a one-way varying-intercept model for observations \(i = 1, \dots, N\) across groups \(j = 1, \dots, J\):

\[ y_i \mid \alpha, a, \sigma_y \sim \mathcal{N}(\alpha + a_{g[i]}, \sigma_y^2). \]

Bayesians and frequentists complete this specification in different ways (Gelman 2005; Rouder et al. 2012). A Bayesian hierarchical model treats \(\alpha \sim \mathcal{N}(\mu_0, s_\alpha^2)\) as a superpopulation mean and models the \(J\) observed groups as exchangeable draws \(a_j \mid \tau \overset{\mathrm{iid}}{\sim} \mathcal{N}(0, \tau^2)\) from that population. Because \(J\) is finite, the realized sample average \(\bar{a} = J^{-1}\sum_{j=1}^J a_j \sim \mathcal{N}(0, \tau^2 / J)\) is nonzero almost surely, so the average across the observed groups \(\alpha + \bar{a}\) differs from the superpopulation parameter \(\alpha\). That distinction lets the model predict a new \((J+1)\)th group, and it creates a sampling bottleneck: every observation depends on \((\alpha, a)\) only through \(\alpha + a_j\), so adding \(d\) to \(\alpha\) while subtracting \(d\) from every \(a_j\) leaves the likelihood unchanged. Whenever the data speak louder than the prior, Hamiltonian Monte Carlo (HMC) has to move \((\alpha, a)\) back and forth along a narrow \((1, -\mathbf{1}_J^\top)\) shift ridge.

Frequentist effects coding avoids that ridge by treating the \(J\) observed groups as the finite population of interest and imposing a hard sum-to-zero constraint,

\[ \theta = \frac{1}{J}\sum_{j=1}^J (\alpha + a_j) = \alpha + \bar{a}, \qquad c_j = a_j - \bar{a}, \qquad \sum_{j=1}^J c_j = 0. \]

Sweeping \(\bar{a}\) into the intercept removes the redundant shift direction (Vines et al. 1996; Ogle and Barber 2020). As Millar et al. (2009) showed, however, placing the original prior \(\mathcal{N}(\mu_0, s_\alpha^2)\) directly on \(\theta\) changes the estimand from the superpopulation mean \(\alpha\) to the finite-sample grand mean \(\theta\).

In my StanCon 2026 talk with Nikolai Vetr, we connected the two parameterizations so a Bayesian sampler can borrow the frequentist zero-sum geometry during HMC while keeping the exact superpopulation posterior.1 Under the Gaussian prior, the realized group mean \(\bar{a} \mid \tau \sim \mathcal{N}(0, \tau^2 / J)\) is independent of the centered deviations \(c = P_0 a\), where \(P_0 = I_J - J^{-1}\mathbf{1}_J\mathbf{1}_J^\top\) is the centering projector. Integrating \(\bar{a}\) out of the prior gives the exact marginal prior on the finite-population grand mean,

\[ \theta \mid \tau \sim \mathcal{N}\!\left(\mu_0,\; V_\theta(\tau)\right), \qquad V_\theta(\tau) = s_\alpha^2 + \frac{\tau^2}{J}. \]

To represent \(c\) without constructing an explicit basis matrix in transformed data, we can use Stan’s built-in sum_to_zero_constrain() transform. Given an unconstrained vector \(z_u \in \mathbb{R}^{J-1}\), sum_to_zero_constrain(z_u) applies the \(O(J)\) isometric Helmert map \(H: \mathbb{R}^{J-1} \to \{c \in \mathbb{R}^J : \mathbf{1}_J^\top c = 0\}\) (Egozcue et al. 2003), which satisfies \(H^\top H = I_{J-1}\), \(H H^\top = P_0\), and has unit Jacobian determinant. Putting a standard normal prior directly on the unconstrained \((J-1)\)-vector \(z_u \sim \mathcal{N}(0, I_{J-1})\) therefore induces \(c = \tau\,\text{sum\_to\_zero\_constrain}(z_u) \sim \mathcal{N}(0, \tau^2 P_0)\) with no manual H matrix and no target += log(tau) degree-of-freedom correction. Because \(\bar{a}\) never enters the likelihood, a single conditional Gaussian draw in generated quantities recovers the superpopulation parameters \((\alpha, a)\) draw by draw:

data {
  int<lower=1> N;
  int<lower=2> J;
  array[N] int<lower=1, upper=J> group;
  vector[N] y;
  real mu_0;
  real<lower=0> s_alpha;
}
parameters {
  real theta;
  vector[J - 1] z_u;
  real<lower=0> tau;
  real<lower=0> sigma_y;
}
transformed parameters {
  vector[J] c = tau * sum_to_zero_constrain(z_u);
}
model {
  tau ~ normal(0, 5);
  sigma_y ~ normal(0, 2);
  theta ~ normal(mu_0, hypot(s_alpha, tau / sqrt(J)));
  z_u ~ std_normal();
  y ~ normal(theta + c[group], sigma_y);
}
generated quantities {
  real mean_a;
  real alpha;
  vector[J] a;
  {
    real v_bar = square(tau) / J;
    real v_tot = square(s_alpha) + v_bar;
    mean_a = normal_rng(
      (v_bar / v_tot) * (theta - mu_0),
      sqrt(square(s_alpha) * v_bar / v_tot)
    );
  }
  alpha = theta - mean_a;
  a = c + mean_a;
}

If we prefer to sample the contrasts on the physical predictor scale (scaled rather than non_centered), we declare vector[J - 1] h_u, set vector[J] c = sum_to_zero_constrain(h_u) without multiplying by tau, and still place the standard normal prior on the whitened unconstrained vector via (h_u / tau) ~ std_normal(); target += -(J - 1) * log(tau);.

In this post I ask what this frequentist-to-Bayesian bridge does to the Fisher information matrix: when does sum-to-zero (S2Z) make posterior correlations identically zero, how does the construction extend to richer hierarchical models, and where does correlation remain? Four results organize the rest of the post:

  1. Balanced designs give exact Cox–Reid parameter orthogonality; unbalanced designs still gain effective Fisher information in every direction. Under equal group sample sizes, S2Z diagonalizes the location precision matrix at every prior and variance scale. Under arbitrary unbalanced designs and multiple grouping factors, S2Z increases effective population Fisher information in the Loewner order (Löwner 1934)—meaning \(M_1 - M_2\) is positive semidefinite, so precision is larger or equal along every linear combination of population parameters (Section 3.2)—with one boundary case when a dogmatic prior fixes \(\alpha\) on sparse, unbalanced data (Section 2).
  2. The equivalence extends cleanly to correlated slopes, crossed factors, non-Gaussian priors, and varying group scales. Section 3 derives each extension in turn with a concrete example and a short Stan implementation built around sum_to_zero_constrain().
  3. Group-varying standard deviations couple \((\theta, h)\) at order \(O(J^{-1})\) in the prior while diagonalizing the log-SD hierarchy at homogeneity via Louis’s identity. When \(a_j \sim \mathcal{N}(0, s_j^2)\), completing the square over \(\bar{a}\) leaves a small heterogeneous prior cross-term, and Louis’s missing-information identity (Louis 1982)—complete-data Fisher information minus the conditional score variance of the integrated-out mean (Section 3.4)—yields \(\mathcal{I}_{\theta,h}(\ell) = 2I_J - 4\operatorname{diag}(\boldsymbol{\pi}) + 2\boldsymbol{\pi}\boldsymbol{\pi}^\top\).
  4. Across the six Eight Schools parameterizations, rotating into the zero-sum basis matters as much as integrating out \(\mu\), strong data favor physical contrasts, and per-group partial centering handles mixed sample sizes. Section 4 derives all six Fisher matrices explicitly, showing why centered_s2z remains equicorrelated under balanced SEs and why physical S2Z (scaled_s2z) avoids a strong-data \((\log\tau, z)\) hyperbola that slows non_centered_s2z. Section 4.3 then combines per-group partial centering with sum_to_zero_constrain() using frequentist Fisher-reliability weights when weak and dense groups coexist in the same dataset.

All 55 linear-algebraic, Fisher-information, Louis missing-information, and partial-centering theorems in Sections 2–4 are formalized in Lean 4 (v4.34.0 with Mathlib v4.34.0), and every analytic Hessian below matches numerical second derivatives in R within \(8 \times 10^{-8}\).

2. Two Groups, One Ridge, and the Dogmatic-Prior Boundary

The \(J = 2\) case with unit residual variance (\(\sigma_y = 1\)) shows the core geometry in \(2 \times 2\) and \(3 \times 3\) matrices. Suppose group \(j \in \{1, 2\}\) has \(n_j\) observations (\(N = n_1 + n_2\)), so its sample mean \(\bar{y}_j \sim \mathcal{N}(q_j, n_j^{-1})\) contributes Fisher weight \(n_j\). In conventional physical coordinates (scaled_conv), \(q_j = \alpha + a_j\) with \(\alpha \sim \mathcal{N}(0, s_\alpha^2)\) and \(a_j \sim \mathcal{N}(0, \tau^2)\). In physical S2Z (scaled_s2z), sum_to_zero_constrain([h_1]) produces \(\frac{1}{\sqrt{2}}(h_1, -h_1)^\top\), so \(q_1 = \theta + h_1 / \sqrt{2}\) and \(q_2 = \theta - h_1 / \sqrt{2}\) with \(\theta \sim \mathcal{N}(0, s_\alpha^2 + \tau^2 / 2)\) and \(h_1 \sim \mathcal{N}(0, \tau^2)\).

Conditional on \(\tau\), the two posterior precision matrices are

\[ P_{\mathrm{conv}}(\alpha, a_1, a_2) = \begin{pmatrix} s_\alpha^{-2} + n_1 + n_2 & n_1 & n_2 \\ n_1 & n_1 + \tau^{-2} & 0 \\ n_2 & 0 & n_2 + \tau^{-2} \end{pmatrix}, \qquad P_{\mathrm{s2z}}(\theta, h_1) = \begin{pmatrix} (s_\alpha^2 + \tau^2 / 2)^{-1} + n_1 + n_2 & \dfrac{n_1 - n_2}{\sqrt{2}} \\[8pt] \dfrac{n_1 - n_2}{\sqrt{2}} & \dfrac{n_1 + n_2}{2} + \tau^{-2} \end{pmatrix}. \]

The off-diagonal entry of \(P_{\mathrm{s2z}}\) is \((n_1 - n_2)/\sqrt{2}\). Whenever the two groups have equal sample sizes (\(n_1 = n_2\), a 50% / 50% sample size split), \(\theta\) and \(h_1\) are exact Cox–Reid orthogonal parameters (Cox and Reid 1987) at every \((\tau, s_\alpha, N)\). In \(P_{\mathrm{conv}}\), as \(n_1, n_2\) grow, the likelihood block annihilates \((1, -1, -1)^\top\) and squeezes the \((\alpha, a_1)\) posterior ellipse onto the line \(\alpha + a_1 = \bar{y}_1\).

When \(n_1 \ne n_2\), integrating out the group effects reduces the intercept’s marginal precision from the top-left entry \(a\) to the Schur complement \(a - b^\top D^{-1} b\). Here \(b^\top D^{-1} b\) is the scalar case of the cross-information penalty ordered by Loewner dominance in Section 3.2; for \(J = 2\), their difference is nonnegative for all \(n_1, n_2 \ge 0\) and \(\tau > 0\):

\[ \underbrace{\frac{n_1^2}{n_1 + \tau^{-2}} + \frac{n_2^2}{n_2 + \tau^{-2}}}_{b_{\mathrm{conv}}^\top D_{\mathrm{conv}}^{-1} b_{\mathrm{conv}}} \;-\; \underbrace{\frac{(n_1 - n_2)^2 / 2}{(n_1 + n_2)/2 + \tau^{-2}}}_{b_{\mathrm{s2z}}^\top D_{\mathrm{s2z}}^{-1} b_{\mathrm{s2z}}} \;=\; \frac{\tau^{-4}(n_1 + n_2) + 2 n_1 n_2 (n_1 + n_2 + \tau^{-2})}{(n_1 + \tau^{-2})(n_2 + \tau^{-2})\big((n_1 + n_2)/2 + \tau^{-2}\big)} \ge 0. \]

At the extreme split \(n = (1, 0)\) and \(\tau = 1\), \(b_{\mathrm{conv}}^\top D_{\mathrm{conv}}^{-1} b_{\mathrm{conv}} = \frac{1}{2}\) while \(b_{\mathrm{s2z}}^\top D_{\mathrm{s2z}}^{-1} b_{\mathrm{s2z}} = \frac{1}{3}\), a reduction of \(\frac{1}{6}\). If we also place a dogmatic prior \(s_\alpha = 0.1\) on \(\alpha\), however, the leading diagonal entry changes from \(a_{\mathrm{conv}} = 100 + 1 = 101\) to \(a_{\mathrm{s2z}} = (0.01 + 0.5)^{-1} + 1 = \frac{151}{51} \approx 2.96\). Dividing by \(a\) reverses the normalized squared correlation: \(R^2_{\mathrm{conv}} = \frac{1}{202} \approx 0.005 < \frac{51}{453} \approx 0.113 = R^2_{\mathrm{s2z}}\). Selecting Dogmatic s_α = 0.1 in Figure 1 shows the mechanism: \(s_\alpha = 0.1\) pins \(\alpha \approx 0\) without using the data, whereas \(\theta = \alpha + \bar{a}\) inherits prior variance \(\tau^2/2 = 0.5\) from the unobserved second group \(a_2\).

Two-Group Posterior Contours: Shift Ridge vs Zero-Sum Subspace
50% and 95% conditional Gaussian contours at σ_y = 1; adjust sample sizes and prior scales or select a regime
Total sample size N = n₁ + n₂40.00
Sample size split n₁ / n₂50% / 50%
Group SD τ2.00
Prior SD s_α5.00
Preset:
Conventional: (α, a₁)
Sum-to-Zero: (θ, h₁)
Figure 1: Conditional posterior contours for conventional coordinates and zero-sum coordinates for \(J = 2\) groups with unit residual variance. Equal group sample sizes make \(\theta\) and \(h_1\) orthogonal; unbalanced splits still leave a nonnegative cross-information reduction \(b_{\mathrm{conv}}^\top D_{\mathrm{conv}}^{-1} b_{\mathrm{conv}} - b_{\mathrm{s2z}}^\top D_{\mathrm{s2z}}^{-1} b_{\mathrm{s2z}} \ge 0\).

3. Extending the Equivalence Beyond One-Way Intercepts

A one-way normal-intercept model is only the simplest hierarchical design. Applied models routinely include correlated varying slopes with centered covariates, multiple crossed grouping factors, non-Gaussian likelihoods or non-Gaussian intercept priors, and heavy-tailed or group-varying scales. Each extension follows the same recipe: identify the group-average shifts that leave the linear predictor unchanged, marginalize them out of the prior when conjugate (or isolate them from the likelihood when non-Gaussian), and constrain each factor’s \((J - 1)\) free coordinates with sum_to_zero_constrain().

3.1 Correlated Varying Slopes and Centered Covariates

Suppose each observation has a covariate \(x_i\) and each group \(j \in \{1, \dots, J\}\) has a correlated intercept-and-slope pair \(u_j = (a_j, b_j)^\top \sim \mathcal{N}_2(0, \Sigma)\) with Cholesky factor \(\Sigma = L_\Sigma L_\Sigma^\top\):

\[ y_i \sim \mathcal{N}\!\left(\alpha + a_{g[i]} + (\beta + b_{g[i]}) x_i,\; \sigma_y^2\right). \]

Regression implementations often center covariates around their sample mean \(\bar{x} = N^{-1}\sum_{i=1}^N x_i\), writing \(\tilde{x}_i = x_i - \bar{x}\) and parameterizing the population vector as \(\beta_c = (\alpha_c, \beta)^\top \sim \mathcal{N}_2(\beta_0, V_0)\), where \(\alpha_c = \alpha + \beta \bar{x}\) is the expected response at \(x = \bar{x}\). If the random slope still multiplies raw \(x_i = \tilde{x}_i + \bar{x}\) (or if we want to match centered and uncentered columns cleanly), sweeping the realized group average \(\bar{u} = (\bar{a}, \bar{b})^\top = J^{-1}\sum_{j=1}^J u_j\) into the centered population vector shifts \(\alpha_c\) by \(\bar{a} + \bar{x}\bar{b}\) and \(\beta\) by \(\bar{b}\):

\[ \alpha_c + \beta \tilde{x}_i + a_j + b_j x_i = \underbrace{(\alpha_c + \bar{a} + \bar{x}\bar{b})}_{\theta_1} + c_{a,j} + \underbrace{(\beta + \bar{b})}_{\theta_2} \tilde{x}_i + c_{b,j} \tilde{x}_i + c_{b,j}\bar{x}. \]

When the random slope also multiplies centered \(\tilde{x}_i\), the matching matrix is the identity (\(H_x = I_2\)); when it multiplies raw \(x_i\) while the fixed design is centered, \(H_x = \begin{pmatrix} 1 & \bar{x} \\ 0 & 1 \end{pmatrix}\) satisfies \(\begin{pmatrix} 1 & \tilde{x}_i \end{pmatrix} H_x = \begin{pmatrix} 1 & x_i \end{pmatrix}\) for every observation, so \(\theta = \beta_c + H_x \bar{u} \sim \mathcal{N}_2(\beta_0, V_0 + J^{-1} H_x \Sigma H_x^\top)\).

To sample the \(J\) zero-sum pairs \(C = [c_1, \dots, c_J] \in \mathbb{R}^{2 \times J}\) on the physical predictor scale while keeping a standard normal prior on the unconstrained coordinates, declare matrix[2, J - 1] h_raw and apply sum_to_zero_constrain() to each row. Because \(C = h_{\mathrm{raw}} H^\top\) and \(H^\top H = I_{J-1}\), whitening \(C\) across coefficients is isometric to whitening \(h_{\mathrm{raw}}\) directly:

\[ \|L_\Sigma^{-1} C\|_F^2 = \operatorname{tr}\!\left(L_\Sigma^{-1} h_{\mathrm{raw}} H^\top H h_{\mathrm{raw}}^\top L_\Sigma^{-\top}\right) = \|L_\Sigma^{-1} h_{\mathrm{raw}}\|_F^2. \]

We therefore solve \(L_\Sigma\) against only \(J - 1\) columns and put std_normal() directly on the \(2(J - 1)\) unconstrained whitened entries:

transformed parameters {
  matrix[2, 2] L_Sigma = diag_pre_multiply(tau, L_Omega);
  vector[J] c_int = sum_to_zero_constrain(h_raw[1]');
  vector[J] c_slp = sum_to_zero_constrain(h_raw[2]');
}
model {
  matrix[2, 2] Sigma = multiply_lower_tri_self_transpose(L_Sigma);
  matrix[2, J - 1] z_u = mdivide_left_tri_low(L_Sigma, h_raw);

  theta ~ multi_normal(beta_0, V_0 + Sigma / J);
  to_vector(z_u) ~ std_normal();
  target += -(J - 1) * sum(log(diagonal(L_Sigma)));

  y ~ normal(
    (theta[1] + c_int[group]) + (theta[2] + c_slp[group]) .* x_c,
    sigma_y
  );
}

In the Fisher information matrix, conventional coordinates \((\beta_c, u_1, \dots, u_J)\) have a \(2\)-dimensional likelihood nullspace (one constant shift for the intercept and one for the slope). Mapping \(u = (H \otimes I_2)\,\mathrm{vec}(h_{\mathrm{raw}}^\top)\) removes both null directions. Whenever every group has the same within-group design cross-product \(X_j^\top X_j = M_0\) (for example, a balanced clinical trial or panel design), the off-diagonal Fisher block \(\mathcal{I}_{\mathrm{lik}}(\theta, h_{\mathrm{raw}})\) vanishes identically even when \(\Sigma\) has strong intercept–slope correlation.

3.2 Multiple Crossed Grouping Factors and Loewner Dominance

Now suppose each observation belongs to \(F = 2\) crossed grouping factors—say \(G_1\) participants and \(G_2\) test items—with \(u^{(1)}_g \sim \mathcal{N}(0, \tau_1^2)\) and \(u^{(2)}_h \sim \mathcal{N}(0, \tau_2^2)\):

\[ y_i \sim \mathcal{N}\!\left(\alpha + u^{(1)}_{g_1[i]} + u^{(2)}_{g_2[i]},\; \sigma_y^2\right), \qquad \alpha \sim \mathcal{N}(\mu_0, s_\alpha^2). \]

Adding \(d_1\) to every participant effect, \(d_2\) to every item effect, and subtracting \(d_1 + d_2\) from \(\alpha\) leaves every linear predictor unchanged, creating an \(F\)-dimensional shift ridge in the likelihood. Sweeping both realized means \(m_1 = G_1^{-1}\sum_{g=1}^{G_1} u^{(1)}_g \sim \mathcal{N}(0, v_1)\) (\(v_1 = \tau_1^2 / G_1\)) and \(m_2 = G_2^{-1}\sum_{h=1}^{G_2} u^{(2)}_h \sim \mathcal{N}(0, v_2)\) (\(v_2 = \tau_2^2 / G_2\)) into a single grand mean \(\theta = \alpha + m_1 + m_2\) gives

\[ \theta \mid \tau_1, \tau_2 \sim \mathcal{N}(\mu_0, W), \qquad W = s_\alpha^2 + v_1 + v_2. \]

How do we recover both \(m_1\) and \(m_2\) in generated quantities when only their sum enters \(\theta\)? Conditional on \(\theta\), \(m_1\) and \(m_2\) are negatively correlated—if participant effects happened to average slightly high, item effects or \(\alpha\) had to be lower to hit the same \(\theta\):

\[ \begin{pmatrix} m_1 \\ m_2 \end{pmatrix} \Bigm| \theta, \tau_1, \tau_2 \sim \mathcal{N}_2\!\left( \frac{\theta - \mu_0}{W}\begin{pmatrix} v_1 \\ v_2 \end{pmatrix},\; \begin{pmatrix} v_1 & 0 \\ 0 & v_2 \end{pmatrix} - \frac{1}{W}\begin{pmatrix} v_1 \\ v_2 \end{pmatrix}\begin{pmatrix} v_1 & v_2 \end{pmatrix} \right). \]

Rather than factoring an \((F \times F)\) covariance matrix, Matheron’s conditional simulation rule draws \((\tilde{\alpha}, \tilde{m}_1, \tilde{m}_2)\) from their independent priors and applies a rank-one linear update from the innovation \(\theta - (\tilde{\alpha} + \tilde{m}_1 + \tilde{m}_2)\). Using sum_to_zero_constrain() also avoids Stan’s array-length restriction (array[F] sum_to_zero_vector requires equal \(G_f\)), because we simply pass each factor’s \((G_f - 1)\)-vector separately:

parameters {
  real theta;
  vector[G1 - 1] h1_raw;
  vector[G2 - 1] h2_raw;
  vector<lower=0>[2] tau;
  real<lower=0> sigma_y;
}
transformed parameters {
  vector[G1] c1 = sum_to_zero_constrain(h1_raw);
  vector[G2] c2 = sum_to_zero_constrain(h2_raw);
}
model {
  real W = square(s_alpha) + square(tau[1]) / G1 + square(tau[2]) / G2;
  theta ~ normal(mu_0, sqrt(W));
  (h1_raw / tau[1]) ~ std_normal();
  (h2_raw / tau[2]) ~ std_normal();
  target += -(G1 - 1) * log(tau[1]) - (G2 - 1) * log(tau[2]);
  y ~ normal(theta + c1[g1] + c2[g2], sigma_y);
}
generated quantities {
  real alpha;
  vector[2] m;
  {
    real v1 = square(tau[1]) / G1;
    real v2 = square(tau[2]) / G2;
    real W = square(s_alpha) + v1 + v2;
    real a_sim = normal_rng(mu_0, s_alpha);
    real m1_sim = normal_rng(0, sqrt(v1));
    real m2_sim = normal_rng(0, sqrt(v2));
    real innov = theta - (a_sim + m1_sim + m2_sim);
    alpha = a_sim + (square(s_alpha) / W) * innov;
    m[1] = m1_sim + (v1 / W) * innov;
    m[2] = m2_sim + (v2 / W) * innov;
  }
}

When a multi-factor model also includes \(q\) population regression coefficients (such as (1 + x | g_1) + (1 | g_2)), write the joint precision matrix of the population vector and the stacked group effects as \(\begin{pmatrix} A & B \\ B^\top & D \end{pmatrix}\). Integrating out the group effects leaves the marginal population precision \(\mathcal{I}_{\mathrm{eff}} = A - B D^{-1} B^\top\) (the Schur complement of \(D\)), where \(A\) is the precision the population parameters would have if all group effects were known and \(B D^{-1} B^\top\) is the information lost from estimating the group effects alongside them.

To compare two \(q \times q\) information matrices \(M_1\) and \(M_2\), we use the Loewner order (or Loewner dominance, after Löwner (1934)): writing \(M_1 \succeq M_2\) means that \(M_1 - M_2\) is positive semidefinite—all eigenvalues of \(M_1 - M_2\) are nonnegative, or equivalently \(v^\top M_1 v \ge v^\top M_2 v\) for every contrast vector \(v \in \mathbb{R}^q\). Unlike scalar summaries such as trace or determinant, Loewner dominance requires Fisher information to be at least as large along every linear combination of the population parameters simultaneously. When \(M_1, M_2 \succ 0\) are precision matrices, \(M_1 \succeq M_2\) is equivalent to \(M_1^{-1} \preceq M_2^{-1}\), meaning every marginal variance \(\operatorname{Var}(v^\top \theta)\) shrinks or stays the same and the Gaussian credible ellipsoid of \(M_1\) sits inside that of \(M_2\).

Let \(E = \operatorname{blockdiag}(E_1, \dots, E_F)\) collect the factor-wise Helmert bases (\(E_f = H_{G_f} \otimes I_{M_f}\)) and let \(U_{\mathrm{mean}} = \operatorname{blockdiag}(\mathbf{1}_{G_1} \otimes I_{M_1}, \dots, \mathbf{1}_{G_F} \otimes I_{M_F})\) span the \(F\) block-mean subspaces. Because \(\operatorname{im}(E)\) and \(\operatorname{im}(U_{\mathrm{mean}})\) are orthogonal complements in \(\mathbb{R}^{\sum_f G_f M_f}\), \(B_{\mathrm{s2z}} = B_{\mathrm{conv}} E\) and \(D_{\mathrm{s2z}} = E^\top D_{\mathrm{conv}} E\) satisfy an exact \(D_{\mathrm{conv}}\)-orthogonal projection identity for any unbalanced cell counts and any positive-definite group precision \(D_{\mathrm{conv}} \succ 0\):

\[ B_{\mathrm{conv}} D_{\mathrm{conv}}^{-1} B_{\mathrm{conv}}^\top - B_{\mathrm{s2z}} D_{\mathrm{s2z}}^{-1} B_{\mathrm{s2z}}^\top = \left(B_{\mathrm{conv}} D_{\mathrm{conv}}^{-1} U_{\mathrm{mean}}\right) \left(U_{\mathrm{mean}}^\top D_{\mathrm{conv}}^{-1} U_{\mathrm{mean}}\right)^{-1} \left(U_{\mathrm{mean}}^\top D_{\mathrm{conv}}^{-1} B_{\mathrm{conv}}^\top\right) \succeq 0. \]

Furthermore, whenever the cross-factor cell Fisher weights are additively separable across factors, \(C(g_1, g_2) = A(g_1) + B(g_2)\) (including every balanced crossed design), the cross-factor Fisher block \(E_1^\top Z_1^\top \mathcal{W} Z_2 E_2\) vanishes identically. Figure 2 lets you drag cell imbalance from 0.00 (exact Cox–Reid orthogonality across all blocks) up to 1.00 under both Gaussian and logistic GLM weights.

Crossed Two-Factor Model: Loewner Information Gain and Canonical Correlations
Two-factor hierarchy (1 + x | g₁) + (1 | g₂) with G₁ = 5, G₂ = 4, and M₁ + M₂ = 3 shift dimensions
Cell & covariate imbalance0.00
Population prior SD s₀Flat (∞)
Sample size multiplier4.00
Weights:
Eigenvalues of Loewner Gap ΔI_eff ⪰ 0
Canonical Correlations ρ_k(pop; group)
Figure 2: Eigenvalues of the Loewner cross-information reduction \(\Delta\mathcal{I}_{\mathrm{eff}}\) and population-to-group canonical correlations for a crossed two-factor hierarchy under Gaussian and Bernoulli observation weights.

3.3 Generalized Linear Models and Non-Gaussian Population Priors

Moving from Gaussian outcomes to a generalized linear model (GLM) changes only the observation weight matrix. In hierarchical logistic regression,

\[ y_i \sim \operatorname{Bernoulli}\!\left(\operatorname{logit}^{-1}(\eta_i)\right), \qquad \eta_i = \alpha + a_{g[i]} + \beta x_i, \]

the log-likelihood Hessian with respect to \(\eta\) is diagonal with weights \(\mathcal{W}(\eta)_{ii} = p_i(1 - p_i)\), where \(p_i = \operatorname{logit}^{-1}(\eta_i)\). Because the linear predictor \(\eta = \theta\mathbf{1}_N + Z c + \beta x\) is algebraically identical in both parameterizations, every likelihood shift-nullspace and Loewner-dominance result from Section 3.2 carries over directly with \(\mathcal{W}(\eta)\) in place of \(\sigma_y^{-2} I_N\).

A subtler question arises when the superpopulation intercept \(\alpha\) carries a non-Gaussian prior—for example \(\alpha \sim \operatorname{Logistic}(0, 1)\), which induces a uniform prior on the baseline probability \(\operatorname{logit}^{-1}(\alpha) \sim \operatorname{Uniform}(0, 1)\). Now \(\theta = \alpha + \bar{a}\) is the sum of a Logistic variable and a Normal variable \(\bar{a} \sim \mathcal{N}(0, \tau^2 / J)\), which has no closed-form marginal density.

We do not need a closed-form convolution to remove the likelihood ridge. Keep the scalar standardized mean \(z_{\mathrm{mean}} \sim \mathcal{N}(0, 1)\) in parameters, reconstruct \(\alpha = \theta - (\tau / \sqrt{J}) z_{\mathrm{mean}}\) to evaluate alpha ~ logistic(0, 1), and pass only \(\theta + c_{g[i]} + \beta x_i\) into the Bernoulli likelihood:

parameters {
  real theta;
  real z_mean;
  real beta;
  vector[J - 1] h_raw;
  real<lower=0> tau;
}
transformed parameters {
  vector[J] c = sum_to_zero_constrain(h_raw);
  real mean_a = (tau / sqrt(J)) * z_mean;
  real alpha = theta - mean_a;
}
model {
  tau ~ normal(0, 2.5);
  beta ~ normal(0, 2.5);
  alpha ~ logistic(0, 1);
  z_mean ~ std_normal();
  (h_raw / tau) ~ std_normal();
  target += -(J - 1) * log(tau);
  y ~ bernoulli_logit(theta + c[group] + beta * x);
}

Because \(\partial \eta / \partial z_{\mathrm{mean}} = 0\), the likelihood Fisher matrix on \((\theta, \beta, z_{\mathrm{mean}}, h_{\mathrm{raw}})\) has an identically zero row and column for \(z_{\mathrm{mean}}\):

\[ \mathcal{I}_{\mathrm{lik}}(\theta, \beta, z_{\mathrm{mean}}, h_{\mathrm{raw}}) = \begin{pmatrix} \mathbf{1}^\top \mathcal{W}\mathbf{1} & \mathbf{1}^\top \mathcal{W} x & 0 & \mathbf{1}^\top \mathcal{W} Z H \\ x^\top \mathcal{W}\mathbf{1} & x^\top \mathcal{W} x & 0 & x^\top \mathcal{W} Z H \\ 0 & 0 & 0 & \mathbf{0}^\top \\ H^\top Z^\top \mathcal{W}\mathbf{1} & H^\top Z^\top \mathcal{W} x & \mathbf{0} & H^\top Z^\top \mathcal{W} Z H \end{pmatrix}. \]

Instead of coupling \(\alpha\) to all \(J\) group effects through a high-precision data ridge, \(z_{\mathrm{mean}}\) interacts only with \(\theta\) through the smooth scalar logistic prior penalty \(-\partial^2_\alpha \log p(\alpha) = p_\alpha(1 - p_\alpha) \le \frac{1}{4}\).

3.4 Heavy-Tailed Group Effects, Varying Standard Deviations, and Louis’s Identity

What if groups do not share a single variance \(\tau^2\)? Two common models give each group \(j\) its own Gaussian scale \(a_j \mid s_j \sim \mathcal{N}(0, s_j^2)\):

  • Heavy-tailed Student-\(t_\nu\) group effects: writing \(a_j \mid \omega_j, \tau \sim \mathcal{N}(0, \tau^2 \omega_j)\) with \(\omega_j \sim \operatorname{Inv-Gamma}(\nu/2, \nu/2)\) gives \(a_j \mid \tau \sim t_\nu(0, \tau)\) marginally while keeping the conditional prior Gaussian at every draw of \(s_j = \tau\sqrt{\omega_j}\).
  • Partially pooled group standard deviations: modeling \(\ell_j = \log s_j = \gamma + \lambda_\omega z_{\log s, j}\) with \(\gamma \sim \mathcal{N}(\mu_\gamma, s_\gamma^2)\), \(z_{\log s} \sim \mathcal{N}(0, I_J)\), and \(\lambda_\omega \sim \mathcal{N}^+(0, s_\lambda^2)\) lets group variability itself vary across groups.

When \(s_1, \dots, s_J\) are unequal, \(\bar{a}\) and \(c_j = a_j - \bar{a}\) are no longer independent in the prior: \(\operatorname{Cov}(a_j, \bar{a} \mid s) = s_j^2 / J\) depends on \(j\), so high-variance groups pull \(\bar{a}\) more than low-variance groups. Even so, the realized average \(m = \bar{a}\) still enters \(\alpha = \theta - m\) and \(a_j = c_j + m\) quadratically in the log prior! Let \(q_0 = s_0^{-2}\) be the intercept prior precision, \(q_j = s_j^{-2} = e^{-2\ell_j}\) be group \(j\)’s prior precision, and \(P = q_0 + \sum_{j=1}^J q_j = q_0 + q_\bullet\). Completing the square over \(m\) gives

\[ q_0(\theta - m)^2 + \sum_{j=1}^J q_j(c_j + m)^2 = P(m - \hat{m})^2 + q_0(\theta - \hat{m})^2 + \sum_{j=1}^J q_j(c_j + \hat{m})^2, \qquad \hat{m} = \frac{q_0 \theta - \mathbf{q}^\top c}{P}. \]

Integrating \(m \mid \theta, c, s \sim \mathcal{N}(\hat{m}, P^{-1})\) out analytically adds \(-\frac{1}{2}\log P\) to the log-density and yields the conditional location precision matrix on \((\theta, h_{\mathrm{raw}})\) (\(c = H h_{\mathrm{raw}}\)):

\[ P_{\mathrm{loc}}^{\mathrm{s2z}}(\theta, h_{\mathrm{raw}}) = \begin{pmatrix} w_\bullet + \dfrac{q_0 q_\bullet}{P} & \left(\mathbf{w} + \pi_0 \mathbf{q}\right)^\top H \\[8pt] H^\top(\mathbf{w} + \pi_0 \mathbf{q}) & H^\top\!\left(W + Q_a - \dfrac{\mathbf{q}\mathbf{q}^\top}{P}\right)\!H \end{pmatrix}, \qquad \pi_0 = \frac{q_0}{P}, \quad \boldsymbol{\pi} = \frac{\mathbf{q}}{P}. \]

Notice the factor \(\pi_0 = q_0 / (q_0 + \sum_{j=1}^J q_j) = O(J^{-1})\) multiplying the heterogeneous prior coupling \(\mathbf{q}^\top H\): as the number of groups \(J\) grows (or as the intercept prior \(s_0\) becomes wide), the prior cross-term between \(\theta\) and \(h_{\mathrm{raw}}\) vanishes.

When \(\ell_j = \log s_j\) is itself hierarchical, we can apply sum_to_zero_constrain() a second time on the log-SD layer, setting \(\ell = \gamma_s \mathbf{1}_J + \lambda_\omega\,\text{sum\_to\_zero\_constrain}(z_{\log s,\mathrm{raw}})\) with \(\gamma_s \sim \mathcal{N}(\mu_\gamma, \sqrt{s_\gamma^2 + \lambda_\omega^2 / J})\):

transformed parameters {
  vector[J] c = sum_to_zero_constrain(h_raw);
  vector[J] z_log_s = sum_to_zero_constrain(z_log_s_raw);
  vector<lower=0>[J] s_j = exp(gamma_s + lambda_w * z_log_s);
}
model {
  vector[J] q_j = inv_square(s_j);
  real q_0 = inv_square(s_0);
  real P = q_0 + sum(q_j);
  real m_hat = (q_0 * theta - dot_product(q_j, c)) / P;

  gamma_s ~ normal(mu_gamma, hypot(s_gamma, lambda_w / sqrt(J)));
  z_log_s_raw ~ std_normal();
  (theta - m_hat) / s_0 ~ std_normal();
  (c + m_hat) ./ s_j ~ std_normal();
  target += -log(s_0) - sum(log(s_j)) - 0.5 * log(P);

  y ~ normal(theta + c[group], sigma_y);
}

How much Fisher information do the sampled location coordinates \(w = (\theta, h_{\mathrm{raw}})\) carry about the log-SD vector \(\ell = (\ell_1, \dots, \ell_J)^\top\) once \(m = \bar{a}\) has been integrated out? In conventional coordinates \((\alpha, a)\), each \(a_j \sim \mathcal{N}(0, e^{2\ell_j})\) contributes \(\mathbb{E}[-\partial^2_{\ell_j} \log \mathcal{N}(a_j \mid 0, e^{2\ell_j})] = 2\), so \(\mathcal{I}_{\mathrm{complete}}(\ell) = 2I_J\)—which induces a non_centered_conv coupling \(2\lambda_\omega \mathbf{1}_J\) between \(\gamma\) and \(z_{\log s}\).

After marginalizing \(m\), we obtain the exact Fisher matrix on \(\ell\) via Louis’s missing-information identity (Louis 1982). Originally derived to compute observed Fisher information in the EM algorithm when a latent variable \(m\) is integrated out of \(p(w, m \mid \ell) = p(w \mid \ell)\,p(m \mid w, \ell)\), differentiating \(\log p(w \mid \ell) = \log \int p(w, m \mid \ell)\,dm\) twice under the integral sign gives

\[ -\nabla^2_\ell \log p(w \mid \ell) = \mathbb{E}_{m \mid w, \ell}\!\left[-\nabla^2_\ell \log p(w, m \mid \ell)\right] - \operatorname{Var}_{m \mid w, \ell}\!\left(\nabla_\ell \log p(w, m \mid \ell)\right). \]

Taking expectations over \(w \mid \ell\) gives the missing-information decomposition

\[ \mathcal{I}_{\mathrm{marginal}}(\ell) = \mathcal{I}_{\mathrm{complete}}(\ell) - \mathbb{E}_{w \mid \ell}\!\left[\operatorname{Var}_{m \mid w, \ell}\!\left(\nabla_\ell \log p(w, m \mid \ell)\right)\right]: \]

marginal Fisher information equals complete-data Fisher information (as if \(m\) were observed) minus the expected conditional covariance of the complete-data score over the integrated-out variable \(m\). Here the complete-data score with respect to \(\ell_j\) is \(\partial_{\ell_j} \log p(\alpha, a \mid \ell) = e^{-2\ell_j} a_j^2 - 1\). Evaluating its conditional covariance under \(m \mid \theta, h_{\mathrm{raw}}, \ell \sim \mathcal{N}(\hat{m}, P^{-1})\) and averaging over \((\theta, h_{\mathrm{raw}}) \mid \ell\) gives missing information \(4\operatorname{diag}(\boldsymbol{\pi}) - 2\boldsymbol{\pi}\boldsymbol{\pi}^\top\), leaving

\[ \mathcal{I}_{\theta,h}(\ell) = \mathbb{E}_{\theta,h \mid \ell}\!\left[-\nabla^2_\ell \log p(\theta, h_{\mathrm{raw}} \mid \ell)\right] = 2I_J - 4\operatorname{diag}(\boldsymbol{\pi}) + 2\boldsymbol{\pi}\boldsymbol{\pi}^\top. \]

Both this conditional score-covariance subtraction and the direct Slepian–Bangs Gaussian trace formula \(\frac{1}{2}\operatorname{tr}\!\big(P_{\mathrm{prior}}^{\mathrm{s2z}}(\partial_{\ell_j}\Sigma_{\theta,h})P_{\mathrm{prior}}^{\mathrm{s2z}}(\partial_{\ell_k}\Sigma_{\theta,h})\big)\) are proved equal in S2ZFisher.VaryingSdsLouis. At homogeneous variances (\(s_j \equiv \tau\), \(\boldsymbol{\pi} = \frac{\tau^{-2}}{s_0^{-2} + J\tau^{-2}}\mathbf{1}_J\)) along \(\partial\ell/\partial\log\tau = \mathbf{1}_J\), \(\mathbf{1}_J^\top \mathcal{I}_{\theta,h}(\ell)\mathbf{1}_J = 2(J - 1) + \frac{2\tau^4}{(J s_0^2 + \tau^2)^2}\). Setting group SD heterogeneity to 0.00 in Figure 3 shows that even with heavily unbalanced group sample sizes \(n = (4, 7, 12, 18, 25, 34)\), the S2Z log-SD Fisher block is strictly diagonal (max|ρ| = 0.000, MI = 0.000), because the prior hierarchy contributes one latent draw \(a_j\) per group regardless of \(n_j\). (A parallel simplification holds for distributional residual SDs \(\log\sigma_i = \theta_\sigma + c_{\sigma, g[i]}\): every Gaussian observation contributes constant Fisher weight \(2\) to \(\log\sigma_i\), so equal group counts \(n_g = n_0\) make \(\mathcal{I}_{\mathrm{lik}}(\theta_\sigma, h_{\sigma,\mathrm{raw}}) = 0\) even when heteroskedasticity makes the mean submodel unbalanced.)

Group-Varying Standard Deviations: Location and Log-SD Correlations
Unbalanced group counts n = (4, 7, 12, 18, 25, 34). Top row: conditional location precision. Bottom row: log-SD precision via Louis's identity
Log-SD hyper-scale λ_ω0.45
Group SD heterogeneity scale0.00
Residual SD σ_y0.25
Intercept prior SD s₀2.50
Location: Conventional (α, a₁..a₆)
Location: Marginalized S2Z (θ, h₁..h₅)
Log-SD: Conventional (γ, z₁..z₆, λ_ω)
Log-SD: S2Z + Louis (γ_s, ζ₁..ζ₅, λ_ω)
Figure 3: Posterior correlation blocks for a six-group model with group-varying prior standard deviations and unbalanced sample sizes \(n = (4, 7, 12, 18, 25, 34)\). At zero SD heterogeneity (\(\zeta_{\log s} = 0\)), the S2Z log-SD Fisher matrix diagonalizes despite the unequal sample sizes.

3.5 Empirical Check Across the Four Extensions

To see how these Fisher reductions show up in NUTS sampling, Figure 4 compares conventional non-centered coordinates against physical S2Z coordinates across synthetic benchmarks for each of the four extensions in Sections 3.1–3.4 (4 chains × 1,500 post-warmup draws = 6,000 draws after 1,000 warmup, adapt_delta = 0.95, max_treedepth = 12):

  1. Correlated varying slopes (\(J = 10\) unbalanced groups, correlated intercepts and slopes with centered covariates plus a fixed-only predictor, \(\sigma_y = 0.20\)).
  2. Bernoulli GLM with a logistic(0, 1) intercept prior (\(J = 12\) groups, explicit standardized mean \(z_{\mathrm{mean}}\) decoupled from the likelihood).
  3. Crossed two-factor hierarchy (\(G_1 = 8\) with random intercepts and slopes crossed with \(G_2 = 6\) random intercepts, removing \(2 + 1 = 3\) shift dimensions via joint Matheron recovery).
  4. Heavy-tailed Student-\(t\) group effects (\(J = 14\) groups, \(\nu = 4\) random intercepts and slopes via per-group inverse-gamma scales).
Empirical NUTS Efficiency Across the Four Hierarchical Extensions
4 chains × 1,500 post-warmup draws (6,000 transitions, adapt_delta = 0.95); click any row to inspect diagnostics
Metric:
Conventional vs Sum-to-Zero Across Four Extensions
Figure 4: Empirical NUTS diagnostics across paired fits of the four extension models. Every S2Z run finished with zero divergences, reduced leapfrog steps per draw by 1.4× to 25.4×, and matched conventional superpopulation posterior means within 1.43 to 2.71 combined MCSE.

Across all four models, S2Z finished with zero divergences, reproduced the superpopulation posteriors within 1.43–2.71 combined MCSE, cut leapfrog steps per draw from 502.3 → 46.6, 17.6 → 12.5, 401.7 → 15.8, and 306.9 → 59.3, and raised median population ESS per 1,000 gradients by 3.1× to 54.9×. (In Model 1, the single largest native pairwise correlation is 0.961 in S2Z versus 0.908 in conventional coordinates because conventional non-centering whitens each group’s local \(2 \times 2\) correlation \(\rho = -0.65\) inside \(L_\Sigma\) while concentrating global dependence into a rank-2 shift ridge of condition number 22,877; S2Z keeps the harmless local \(2 \times 2\) correlation on (c_int[j], c_slp[j]) while dropping the global condition number to 1,524.)

4. The Eight Schools on Their Own: Six Fisher Information Matrices

With the general extensions in hand, we can examine the classic Eight Schools benchmark (Rubin 1981; Papaspiliopoulos et al. 2007; Betancourt and Girolami 2015) in complete detail. Here \(J = 8\) schools have observed treatment estimates \(y \mid \phi \sim \mathcal{N}(q(\phi), W^{-1})\) with known standard errors \(\sigma_j\), \(W = \operatorname{diag}(w_1, \dots, w_J)\), \(w_j = \sigma_j^{-2}\), \(w_\bullet = \sum_{j=1}^J w_j\), \(\mu \sim \mathcal{N}(0, s_\mu^2)\) (\(s_\mu = 5\)), and \(\tau \sim \text{Half-Cauchy}(0, 5)\).

Crossing the three standard location families (centered, scaled, non_centered) with {conv, s2z} produces six parameterizations of the exact same posterior. Using sum_to_zero_constrain(), the physical (scaled_s2z) and whitened (non_centered_s2z) S2Z models differ only in whether tau scales the prior or the linear predictor:

// scaled_s2z: physical contrasts in the predictor, whitened standard normal in the prior
parameters {
  real<lower=0> tau;
  real theta;
  vector[J - 1] h_j;
}
transformed parameters {
  vector[J] q_j = theta + sum_to_zero_constrain(h_j);
}
model {
  tau ~ cauchy(0, 5);
  theta ~ normal(0, sqrt(25 + square(tau) / J));
  (h_j / tau) ~ std_normal();
  target += -(J - 1) * log(tau);
  y_j ~ normal(q_j, sigma_j);
}
// non_centered_s2z: standard normal parameters scaled by tau in the predictor
parameters {
  real<lower=0> tau;
  real theta;
  vector[J - 1] z_j;
}
transformed parameters {
  vector[J] q_j = theta + tau * sum_to_zero_constrain(z_j);
}
model {
  tau ~ cauchy(0, 5);
  theta ~ normal(0, sqrt(25 + square(tau) / J));
  z_j ~ std_normal();
  y_j ~ normal(q_j, sigma_j);
}

Meanwhile, centered_s2z keeps the \(J\) school means \(q \in \mathbb{R}^J\) directly in parameters and integrates \(\mu\) out of \(q \mid \mu, \tau \sim \mathcal{N}(\mu\mathbf{1}_J, \tau^2 I_J)\) by setting \(\bar{q} = J^{-1}\mathbf{1}_J^\top q \sim \mathcal{N}(0, V_\theta(\tau))\) and \(q - \bar{q}\mathbf{1}_J \sim \mathcal{N}(0, \tau^2 P_0)\).

On Stan’s unconstrained coordinates \(\tilde{\phi} = (\eta, \psi)\) with \(\eta = \log\tau\), let \(H \in \mathbb{R}^{J \times (J-1)}\) denote the linear operator applied by sum_to_zero_constrain(), let \(h_0(\tau) = \frac{100\tau^2}{(25 + \tau^2)^2}\) denote the half-Cauchy log-scale curvature, and define

\[ \kappa_{\eta\eta}(\theta, \tau) = \frac{2\tau^2 s_\mu^2}{J V_\theta^2} - \frac{2\theta^2 \tau^2(s_\mu^2 - \tau^2/J)}{J V_\theta^3}, \qquad \bar{\kappa}_{\eta\eta}(\tau) = \mathbb{E}_{\theta \mid \tau}[\kappa_{\eta\eta}(\theta, \tau)] = \frac{2\tau^4}{(J s_\mu^2 + \tau^2)^2}. \]

Writing \(\mathcal{I}_{\mathrm{lik}}(\tilde{\phi}) = J_q(\tilde{\phi})^\top W J_q(\tilde{\phi})\) for the likelihood Fisher matrix, \(\mathcal{G}(\tilde{\phi}) = \mathcal{I}_{\mathrm{lik}}(\tilde{\phi}) - \nabla^2_{\tilde{\phi}} \log p(\tilde{\phi})\) for the pointwise metric, and \(\overline{\mathcal{G}}(\tau) = \mathbb{E}_{\psi \mid \tau}[\mathcal{G}(\eta, \psi)]\) for the prior-integrated Fisher matrix gives all six models in closed form:

  1. centered_conv (\(\tilde{\phi} = (\eta, \mu, q) \in \mathbb{R}^{J+2}\)): \[ \mathcal{G}^{\mathrm{cent,conv}} = \begin{pmatrix} h_0(\tau) + \dfrac{2\|q - \mu\mathbf{1}\|^2}{\tau^2} & \dfrac{2\mathbf{1}^\top(q - \mu\mathbf{1})}{\tau^2} & -\dfrac{2(q - \mu\mathbf{1})^\top}{\tau^2} \\[8pt] \dfrac{2\mathbf{1}^\top(q - \mu\mathbf{1})}{\tau^2} & s_\mu^{-2} + J\tau^{-2} & -\tau^{-2}\mathbf{1}^\top \\[8pt] -\dfrac{2(q - \mu\mathbf{1})}{\tau^2} & -\tau^{-2}\mathbf{1} & W + \tau^{-2}I_J \end{pmatrix}, \] \[ \overline{\mathcal{G}}^{\mathrm{cent,conv}}(\tau) = \begin{pmatrix} h_0(\tau) + 2J & 0 & \mathbf{0}^\top \\ 0 & s_\mu^{-2} + J\tau^{-2} & -\tau^{-2}\mathbf{1}^\top \\ \mathbf{0} & -\tau^{-2}\mathbf{1} & W + \tau^{-2}I_J \end{pmatrix}. \]

  2. centered_s2z (\(\tilde{\phi} = (\eta, q) \in \mathbb{R}^{J+1}\), \(\bar{q} = J^{-1}\mathbf{1}^\top q\)): \[ \mathcal{G}^{\mathrm{cent,s2z}} = \begin{pmatrix} h_0(\tau) + \kappa_{\eta\eta}(\bar{q}, \tau) + \dfrac{2\|P_0 q\|^2}{\tau^2} & -\dfrac{2(P_0 q)^\top}{\tau^2} - \dfrac{2\bar{q}\tau^2}{J^2 V_\theta^2}\mathbf{1}^\top \\[8pt] -\dfrac{2 P_0 q}{\tau^2} - \dfrac{2\bar{q}\tau^2}{J^2 V_\theta^2}\mathbf{1} & W + \tau^{-2} P_0 + \dfrac{1}{J^2 V_\theta}\mathbf{1}\mathbf{1}^\top \end{pmatrix}, \] \[ \overline{\mathcal{G}}^{\mathrm{cent,s2z}}(\tau) = \begin{pmatrix} h_0(\tau) + 2(J - 1) + \bar{\kappa}_{\eta\eta}(\tau) & \mathbf{0}^\top \\[6pt] \mathbf{0} & W + \tau^{-2} P_0 + \dfrac{1}{J^2 V_\theta}\mathbf{1}\mathbf{1}^\top \end{pmatrix}. \]

  3. scaled_conv (\(\tilde{\phi} = (\eta, \mu, r) \in \mathbb{R}^{J+2}\), \(q = \mu\mathbf{1} + r\)): \[ \mathcal{G}^{\mathrm{scal,conv}} = \begin{pmatrix} h_0(\tau) + \dfrac{2\|r\|^2}{\tau^2} & 0 & -\dfrac{2 r^\top}{\tau^2} \\[8pt] 0 & s_\mu^{-2} + w_\bullet & \mathbf{w}^\top \\[8pt] -\dfrac{2 r}{\tau^2} & \mathbf{w} & W + \tau^{-2}I_J \end{pmatrix}, \] \[ \overline{\mathcal{G}}^{\mathrm{scal,conv}}(\tau) = \begin{pmatrix} h_0(\tau) + 2J & 0 & \mathbf{0}^\top \\ 0 & s_\mu^{-2} + w_\bullet & \mathbf{w}^\top \\ \mathbf{0} & \mathbf{w} & W + \tau^{-2}I_J \end{pmatrix}. \]

  4. scaled_s2z (\(\tilde{\phi} = (\eta, \theta, h) \in \mathbb{R}^{J+1}\), \(q = \theta\mathbf{1} + H h\)): \[ \mathcal{G}^{\mathrm{scal,s2z}} = \begin{pmatrix} h_0(\tau) + \kappa_{\eta\eta}(\theta, \tau) + \dfrac{2\|h\|^2}{\tau^2} & -\dfrac{2\theta\tau^2}{J V_\theta^2} & -\dfrac{2 h^\top}{\tau^2} \\[8pt] -\dfrac{2\theta\tau^2}{J V_\theta^2} & V_\theta^{-1} + w_\bullet & \mathbf{w}^\top H \\[8pt] -\dfrac{2 h}{\tau^2} & H^\top \mathbf{w} & H^\top W H + \tau^{-2}I_{J-1} \end{pmatrix}, \] \[ \overline{\mathcal{G}}^{\mathrm{scal,s2z}}(\tau) = \begin{pmatrix} h_0(\tau) + 2(J - 1) + \bar{\kappa}_{\eta\eta}(\tau) & 0 & \mathbf{0}^\top \\[6pt] 0 & V_\theta^{-1} + w_\bullet & \mathbf{w}^\top H \\[6pt] \mathbf{0} & H^\top \mathbf{w} & H^\top W H + \tau^{-2}I_{J-1} \end{pmatrix}. \]

  5. non_centered_conv (\(\tilde{\phi} = (\eta, \mu, z) \in \mathbb{R}^{J+2}\), \(q = \mu\mathbf{1} + \tau z\)): \[ \mathcal{G}^{\mathrm{nc,conv}} = \begin{pmatrix} h_0(\tau) + \tau^2 z^\top W z & \tau \mathbf{w}^\top z & \tau^2 z^\top W \\ \tau \mathbf{w}^\top z & s_\mu^{-2} + w_\bullet & \tau \mathbf{w}^\top \\ \tau^2 W z & \tau \mathbf{w} & I_J + \tau^2 W \end{pmatrix}, \] \[ \overline{\mathcal{G}}^{\mathrm{nc,conv}}(\tau) = \begin{pmatrix} h_0(\tau) + \tau^2 w_\bullet & 0 & \mathbf{0}^\top \\ 0 & s_\mu^{-2} + w_\bullet & \tau \mathbf{w}^\top \\ \mathbf{0} & \tau \mathbf{w} & I_J + \tau^2 W \end{pmatrix}. \]

  6. non_centered_s2z (\(\tilde{\phi} = (\eta, \theta, z) \in \mathbb{R}^{J+1}\), \(q = \theta\mathbf{1} + \tau H z\)): \[ \mathcal{G}^{\mathrm{nc,s2z}} = \begin{pmatrix} h_0(\tau) + \kappa_{\eta\eta}(\theta, \tau) + \tau^2 z^\top H^\top W H z & \tau \mathbf{w}^\top H z - \dfrac{2\theta\tau^2}{J V_\theta^2} & \tau^2 z^\top H^\top W H \\[8pt] \tau \mathbf{w}^\top H z - \dfrac{2\theta\tau^2}{J V_\theta^2} & V_\theta^{-1} + w_\bullet & \tau \mathbf{w}^\top H \\[8pt] \tau^2 H^\top W H z & \tau H^\top \mathbf{w} & I_{J-1} + \tau^2 H^\top W H \end{pmatrix}, \] \[ \overline{\mathcal{G}}^{\mathrm{nc,s2z}}(\tau) = \begin{pmatrix} h_0(\tau) + \dfrac{J - 1}{J}\tau^2 w_\bullet + \bar{\kappa}_{\eta\eta}(\tau) & 0 & \mathbf{0}^\top \\[6pt] 0 & V_\theta^{-1} + w_\bullet & \tau \mathbf{w}^\top H \\[6pt] \mathbf{0} & \tau H^\top \mathbf{w} & I_{J-1} + \tau^2 H^\top W H \end{pmatrix}. \]

4.1 Why centered_s2z Stays Correlated Under Equal School SEs

Switch Figure 5 to Balanced (σ = 12.5). Both scaled_s2z and non_centered_s2z become strictly diagonal off the main diagonal because \(\mathbf{w}^\top H = w_0 \mathbf{1}^\top H = 0\) and \(H^\top W H = w_0 I_{J-1}\). In centered_s2z, however, the \((i, j)\) off-diagonal precision entry (\(i \ne j\)) is the Schur complement of \(\mu\) in centered_conv:

\[ P_{\mathrm{cent,s2z}}(\tau)_{ij} = -\frac{1}{J\tau^2} + \frac{1}{J^2(s_\mu^2 + \tau^2/J)} = -\frac{s_\mu^2}{\tau^2(J s_\mu^2 + \tau^2)} < 0. \]

Marginalizing \(\mu\) removes the \((J+2)\)th parameter and drops the \(\tau^{-3}\) grand-mean funnel direction, yet \(q_1, \dots, q_J\) remain unrotated school means. Whenever \(\tau \ll s_\mu\), all eight schools still move positively together around their shared sample average \(\bar{q}\). Rotating into sum_to_zero_constrain() coordinates (scaled_s2z and non_centered_s2z) is what turns balanced weights into exact diagonalization.

Eight Schools Fisher and Posterior Correlation Matrices
Hover any cell to inspect exact Posterior Correlation R, Prior-Integrated Fisher Ḡ, and Likelihood Fisher I_lik
Between-school SD τ3.50
Prior SD s_μ5.0
School SE divisor (σ_j / c)1.00×
Data:
Matrix:
centered_conv
scaled_conv
non_centered_conv
centered_s2z
scaled_s2z
non_centered_s2z
Figure 5: Exact correlation and Fisher matrices across all six Eight Schools parameterizations. Teal cells are positive, red cells are negative, and light neutral cells are zero. Thin navy rules separate \(\log\tau\) and the population location parameter from the school coordinates.

4.2 Weak vs Strong Data: non_centered_s2z vs scaled_s2z

Conditional on \(\tau\), \(\operatorname{diag}(1, \tau I_{J-1})\) rescales \(h = \tau z\), so scaled_s2z and non_centered_s2z have the exact same conditional location correlation matrix at every \(\tau\). Jointly with \(\log\tau\), however, the two parameterizations split sharply across data regimes (Figure 6):

  • Weak data (Standard Eight Schools, \(\sigma_j \in [9, 18]\)): the posterior supports \(\tau \to 0\). In scaled_s2z, the \((h, h)\) block \(H^\top W H + \tau^{-2} I_{J-1}\) still diverges like \(\tau^{-2}\) along \(J - 1 = 7\) contrast directions (producing 13 divergences across 8,000 draws), whereas non_centered_s2z bounds \(\overline{\mathcal{G}}_{\eta,\eta}(\tau) = h_0(\tau) + \frac{J-1}{J}\tau^2 w_\bullet + \bar{\kappa}_{\eta\eta}(\tau)\) as \(\tau \to 0\) and finishes with 0 divergences.
  • Strong data (Precise Eight Schools, \(\sigma_j / 10\), \(\sigma_j \in [0.9, 1.8]\)): select Pair: non_centered and Axes: (eff₁, log τ) in Figure 6. Conventional scaled_conv and non_centered_conv are trapped on the \((\mu, r)\) shift ridge (full max|corr| = 0.964 and 0.924; μ bulk ESS per 1,000 gradients is 3.41 and 3.65). non_centered_s2z removes the \((\theta, z)\) ridge (μ ESS/1k grad = 19.5), yet its pointwise cross-block \(\mathcal{G}^{\mathrm{nc,s2z}}_{\eta, z} = \tau^2 z^\top H^\top W H\) grows with \(W\): precise data pin \(\tau(Hz)_j \approx y_j - \bar{y}\), locking \((\log\tau, z_k)\) onto a multiplicative hyperbola (full max|corr| = 0.928, τ ESS/1k grad = 3.62). Physical scaled_s2z avoids both ridges (full max|corr| = 0.253, μ ESS/1k grad = 123.5—a 36× speedup over scaled_conv).
Eight Schools Regime Curves and CmdStan Posterior Draws
Top: analytic Fisher metrics across τ (dashed = conv, solid = s2z). Bottom: post-warmup CmdStan draws (red points = divergent transitions)
Regime:
Curve:
Pair:
Axes:
Analytic Fisher Metric vs Between-School SD τ
scaled_conv
scaled_s2z
Figure 6: Analytic conditional Fisher curves across \(\tau\) paired with thinned CmdStan draws across Balanced (\(\sigma_j = 12.5\)), Standard, and Precise (\(\sigma_j / 10\)) Eight Schools. Under Precise data, scaled_s2z avoids both the location shift ridge of scaled_conv and the \((\log\tau, z_1)\) hyperbolic ridge of non_centered_s2z.

4.3 Mixed Weak and Strong Groups: Partially Centered Sum-to-Zero

Section 4.2 treats weak data and strong data as separate global regimes, yet hierarchical datasets routinely contain sparse and dense groups at the same time. Consider the \(J = 9\) mixed-sample-size design from Betancourt (2017b) and my StanCon 2024 tutorial (Pinkney 2024):

\[ n = (10,\; 5,\; 1000,\; 10,\; 1,\; 5,\; 100,\; 10,\; 5), \qquad \sigma = 10. \]

Neither global S2Z endpoint fits all nine groups. Group 5 has a single observation (\(n_5 = 1\), SE \(= 10\)), so scaled_s2z hits a \(\tau \to 0\) funnel along that sparse contrast; Group 3 has \(n_3 = 1000\) observations (SE \(= 0.316\)), so non_centered_s2z pins \(\tau z_3 \approx \bar{y}_3 - \theta\) and stalls on a \((\log\tau, z_3)\) hyperbola.

In the StanCon 2024 tutorial, I introduced a per-group partially centered parameterization controlled by a continuous weight \(w_i \in [0, 1]\), where \(w_i = 0\) is centered, \(w_i = 1\) is non-centered, and \(0 < w_i < 1\) interpolates smoothly between them:2

\[ \chi_i \sim \mathcal{N}\!\big[\mu(1 - w_i),\; \tau(1 - w_i) + w_i\big], \qquad \alpha_i = \frac{\mu w_i + \tau \chi_i}{\tau(1 - w_i) + w_i}. \]

Checking the moments shows that \(\alpha_i \sim \mathcal{N}(\mu, \tau)\) for every \(w_i \in [0, 1]\) and \(\tau > 0\):

\[ \begin{aligned} \tau \chi_i &\sim \mathcal{N}\!\big[\tau\mu(1 - w_i),\; \tau(\tau(1 - w_i) + w_i)\big], \\ \mu w_i + \tau \chi_i &\sim \mathcal{N}\!\big[\mu(\tau(1 - w_i) + w_i),\; \tau(\tau(1 - w_i) + w_i)\big], \\ \frac{\mu w_i + \tau \chi_i}{\tau(1 - w_i) + w_i} &\sim \mathcal{N}(\mu, \tau). \end{aligned} \]

Combining this denominator \(d_i(\tau) = \tau(1 - w_i) + w_i\) with sum_to_zero_constrain() requires one extra step. Sweeping the realized group mean into \(\theta = \mu + \bar{a}\) removes the \(\mu(1 - w_i)\) location shift, leaving \(u = \text{sum\_to\_zero\_constrain}(z_{\mathrm{raw}}) \in \mathbb{R}^J\) for \(z_{\mathrm{raw}} \in \mathbb{R}^{J-1}\). When the weights \(w_1, \dots, w_J\) differ across groups, dividing \(u\) componentwise by \(d(\tau)\) breaks the zero-sum condition because \(\sum_{i=1}^J u_i / d_i(\tau) \ne 0\). Subtracting the arithmetic mean of \(u \oslash d(\tau)\) restores exact zero sum while keeping \(\tau\) out of the denominator when warmup visits \(\tau \to 0\):

\[ z_{\mathrm{eff}, i} = \frac{u_i}{d_i(\tau)} - \frac{1}{J}\sum_{r=1}^J \frac{u_r}{d_r(\tau)}, \qquad c_i = \tau z_{\mathrm{eff}, i}, \qquad d_i(\tau) = \tau(1 - w_i) + w_i. \]

When \(w \equiv 0\), \(d_i(\tau) = \tau\), \(\sum_r u_r / \tau = 0\), \(z_{\mathrm{eff}} = u / \tau\), and \(c = u\), recovering scaled_s2z. When \(w \equiv 1\), \(d_i(\tau) = 1\), \(\sum_r u_r = 0\), \(z_{\mathrm{eff}} = u\), and \(c = \tau u\), recovering non_centered_s2z.

To obtain the log-Jacobian on the \((J - 1)\)-dimensional contrast space, write \(h = H^\top c = (H^\top A H) z_{\mathrm{raw}}\) where \(A = \operatorname{diag}(\tau / d_1(\tau), \dots, \tau / d_J(\tau))\). Because \(Q = [H,\; J^{-1/2}\mathbf{1}_J]\) is orthogonal, Jacobi’s complementary-minor determinant identity (Jacobi 1834) expresses \(\det(H^\top A H)\) in terms of \(\det(A)\) and the complementary \(1 \times 1\) block \((J^{-1/2}\mathbf{1}_J)^\top A^{-1}(J^{-1/2}\mathbf{1}_J) = \frac{1}{J}\sum_{i=1}^J \frac{d_i(\tau)}{\tau} = \frac{\bar{d}(\tau)}{\tau}\):

\[ \det(H^\top A H) = \det(A)\cdot \frac{\bar{d}(\tau)}{\tau} = \frac{\tau^{J-1}\,\bar{d}(\tau)}{\prod_{i=1}^J d_i(\tau)}, \qquad \bar{d}(\tau) = \frac{1}{J}\sum_{i=1}^J d_i(\tau). \]

Multiplying the \((J-1)\)-dimensional Gaussian prior normalizer \(\tau^{-(J-1)}\) of \(h \sim \mathcal{N}(0, \tau^2 I_{J-1})\) by \(\det(H^\top A H)\) cancels \(\tau^{J-1}\) against \(\tau^{-(J-1)}\), and isometry of \(H\) gives \(\|h/\tau\|^2 = \|c/\tau\|^2 = \|z_{\mathrm{eff}}\|^2\). At \(w \equiv 0\) (\(d_i = \bar{d} = \tau\)) the remaining volume term \(-\sum_{i=1}^J \log d_i(\tau) + \log\bar{d}(\tau)\) reduces to \(-(J - 1)\log\tau\); at \(w \equiv 1\) (\(d_i = \bar{d} = 1\)) it vanishes.

Frequentist Fisher information also supplies the group weights \(w_i\) in closed form. Group \(i\)’s likelihood Fisher information is \(j_i = n_i / \sigma^2\) (or \(\sigma_i^{-2}\) in Eight Schools), so conditional on \(\tau\), the ratio of local posterior variance \((j_i + \tau^{-2})^{-1}\) to prior variance \(\tau^2\) is

\[ w_i = \frac{1}{1 + \hat{\tau}^2 j_i} \in (0, 1), \]

which approaches \(1\) (non_centered) when \(j_i \ll \hat{\tau}^{-2}\) and \(0\) (scaled) when \(j_i \gg \hat{\tau}^{-2}\). Evaluating \(w_i\) at a fixed pilot \(\hat{\tau}^2\) computed once from the data—here the closed-form DerSimonian–Laird moment statistic \(\hat{\tau}^2_{\mathrm{DL}} = \max\!\big(\tau_{\min}^2, \frac{Q - (J - 1)}{\sum_i j_i - \sum_i j_i^2 / \sum_i j_i}\big)\) with Cochran’s \(Q = \sum_{i=1}^J j_i(\bar{y}_i - \bar{y}_w)^2\)—keeps the coordinate map fixed during HMC, so no \(\partial w_i / \partial\tau\) correction arises and the target posterior remains exact:

transformed parameters {
  vector[J] u = sum_to_zero_constrain(z_raw);
  vector[J] d = tau * (1 - w) + w;
  vector[J] u_div_d = u ./ d;
  vector[J] z_eff = u_div_d - mean(u_div_d);
  vector[J] c = tau * z_eff;
}
model {
  theta ~ normal(0, hypot(5.0, tau / sqrt(J)));
  tau ~ normal(0, 5);
  z_eff ~ std_normal();
  target += -sum(log(d)) + log(mean(d));
  y ~ normal(theta + c[indiv_idx], sigma);
}

Running scaled_s2z (\(w \equiv 0\)), non_centered_s2z (\(w \equiv 1\)), and partial_s2z (\(w = w_{\mathrm{DL}}\)) in CmdStan 2.40.0 on the \(J = 9\), \(n = (10, 5, 1000, 10, 1, 5, 100, 10, 5)\), \(\sigma = 10\) design (4 chains \(\times\) 2,000 post-warmup draws, adapt_delta = 0.80) confirms the behavior across both small and moderate between-group variation:

True \(\tau\) (pilot \(\hat{\tau}_{\mathrm{DL}}\)) Model Divergences Leapfrogs / draw τ ESS / 1k grads θ ESS / 1k grads Min ESS / 1k grads
\(\tau = 0.50\) (\(\hat{\tau}_{\mathrm{DL}} = 0.50\)) scaled_s2z (\(w \equiv 0\)) 57 30.0 0.43 10.31 0.43
\(\tau = 0.50\) (\(\hat{\tau}_{\mathrm{DL}} = 0.50\)) non_centered_s2z (\(w \equiv 1\)) 29 26.5 11.29 11.24 11.24
\(\tau = 0.50\) (\(\hat{\tau}_{\mathrm{DL}} = 0.50\)) partial_s2z (\(w = w_{\mathrm{DL}}\)) 0 15.6 35.89 29.36 29.36
\(\tau = 3.00\) (\(\hat{\tau}_{\mathrm{DL}} = 3.21\)) scaled_s2z (\(w \equiv 0\)) 0 25.9 10.16 18.39 10.16
\(\tau = 3.00\) (\(\hat{\tau}_{\mathrm{DL}} = 3.21\)) non_centered_s2z (\(w \equiv 1\)) 36 28.7 8.82 21.70 8.82
\(\tau = 3.00\) (\(\hat{\tau}_{\mathrm{DL}} = 3.21\)) partial_s2z (\(w = w_{\mathrm{DL}}\)) 0 19.0 28.07 24.34 24.34

At \(\tau_{\mathrm{true}} = 0.50\), \(w_{\mathrm{DL}}\) assigns \(w_3 = 0.286\) to the \(n_3 = 1000\) group, \(w_7 = 0.800\) to the \(n_7 = 100\) group, and \(w_5 = 0.998\) to the \(n_5 = 1\) group—eliminating the 57 funnel divergences of scaled_s2z and the 29 hyperbola divergences of non_centered_s2z while raising τ ESS per 1,000 gradients to 35.89 (versus 0.43 and 11.29). At \(\tau_{\mathrm{true}} = 3.00\), \(w_{\mathrm{DL}}\) shifts toward physical coordinates on dense groups (\(w_3 = 0.010\), \(w_7 = 0.089\)) while keeping Group 5 nearly non-centered (\(w_5 = 0.907\)), finishing with 0 divergences and 2.8× the τ ESS per gradient of scaled_s2z.

5. Machine-Checked Proofs in Lean 4 and Regime Summary

In lean/S2ZFisher/, 55 theorems formalize the algebraic, Fisher-information, Louis missing-information, and partial-centering identities in Lean 4.34.0 against Mathlib v4.34.0, checked with check_proofs.py to ensure zero compiler warnings, zero sorrys, and only Lean’s standard foundational axioms (propext, Classical.choice, Quot.sound):

Lean 4 Module Count Verified Results
S2ZFisher.HelmertBasis 13 Centering projector \(P_G^2 = P_G\), \(\operatorname{tr}(P_G) = G-1\); isometric Helmert map \(\mathbf{1}^\top H = 0\), \(H^\top H = I\), \(H H^\top = P_G\), \([H, G^{-1/2}\mathbf{1}] \in O(G)\); Kronecker \((H \otimes I_K)\) mean/contrast split
S2ZFisher.EightSchools 11 Schur-complement identity centered_conv \(\to\) centered_s2z; \(P_{\mathrm{cent,s2z},ij} < 0\) under equal weights; shift nullvectors of conv vs positive definiteness and balanced diagonalization of scaled_s2z & non_centered_s2z; \(\tau\)-curvature reduction
S2ZFisher.BrmsGeneral 9 Centered design matching \(\tilde{X} H_x = Z U\); multi-factor predictor invariance; \((\sum_f M_f)\)-dim shift nullspace vs range preservation; balanced & additively separable Cox–Reid orthogonality; explicit \(z_{\mathrm{mean}}\) likelihood decoupling; Sherman–Morrison rank-one precision inverse
S2ZFisher.LoewnerReduction 8 Exact \(D\)-Pythagorean identity; unbalanced Loewner dominance \(\mathcal{I}_{\mathrm{eff}}^{\mathrm{s2z}}(\theta) \succeq \mathcal{I}_{\mathrm{eff}}^{\mathrm{conv}}(\beta)\); complementary block-mean gap \(D^{-1}U(U^\top D^{-1}U)^{-1}U^\top D^{-1}\); flat-prior canonical correlation bound; \(G = 2\) dogmatic-prior counterexample
S2ZFisher.VaryingSdsLouis 14 Heterogeneous square-completion over \(\bar{a}\); Slepian–Bangs trace and Louis score-covariance proofs of \(\mathcal{I}_{\theta,h}(\ell) = 2I_J - 4\operatorname{diag}(\boldsymbol{\pi}) + 2\boldsymbol{\pi}\boldsymbol{\pi}^\top\); Eight Schools \(\tau\)-curvature corollary & unbalanced-count log-SD diagonalization; zero-sum, endpoints, explicit inverse, and injectivity of partial_s2z

Putting the analytic regimes and empirical benchmarks together gives a compact guide for choosing coordinates:

Regime / Model Structure Parameterization Fisher Geometry
Weak group data (\(\sigma_j \gg \tau\) or \(\tau \to 0\)) non_centered_s2z (tau * sum_to_zero_constrain(z)) Bounded \(\log\tau\) Fisher curvature \((1 - J^{-1})\tau^2 w_\bullet\) avoids the \(\tau^{-2}\) funnel while reducing \((\theta, z)\) cross-information
Moderate-to-strong group data (\(\sigma_j \lesssim \tau\)) scaled_s2z (sum_to_zero_constrain(h) in predictor, whitened in prior) Removes the \((\beta, u)\) shift ridge without introducing non_centered_s2z’s strong-data \((\log\tau, z)\) hyperbola; diagonalizes when balanced
Mixed sparse and dense groups (\(n_j\) spanning orders of magnitude) partial_s2z (\(d_j = \tau(1 - w_j) + w_j\), \(w_j = (1 + \hat{\tau}^2 j_j)^{-1}\)) Interpolates per group between non_centered_s2z on sparse cells and scaled_s2z on dense cells with restricted Jacobian \(-\sum_j \log d_j + \log \bar{d}\)
Very strong group data, 1-way intercepts only centered_s2z or scaled_s2z centered_s2z decouples \(q_j\) at large \(W\) while remaining equicorrelated when \(\tau \ll s_\mu\); scaled_s2z extends to slopes and crossed factors
Multi-factor crossed / varying-slope GLMs Factor-wise sum_to_zero_constrain() + Matheron recovery Removes all \(\sum_{f=1}^F M_f\) shift nullvectors and increases effective population Fisher information \(\mathcal{I}_{\mathrm{eff}}(\theta)\) in Loewner order
Group-varying prior SDs (\(\log s_j = \gamma + \lambda_\omega z_j\)) Dual-layer sum_to_zero_constrain() on location and log-SDs Removes the location ridge and diagonalizes the log-SD block at homogeneity even under unbalanced group sample sizes \(n_j\)
Dogmatic prior on \(\beta\) (\(V_0 \ll \Sigma_f / G_f\)) with sparse, unbalanced groups Conventional non-centered \(V_0\) pins \(\beta \approx \beta_0\) directly; sweeping \(\bar{u}\) into \(\theta\) inflates prior variance to \(V_0 + \Sigma_f / G_f\) and increases normalized \(R^2\)

Extending partial_s2z from scalar intercepts to correlated varying slopes replaces \(d_j(\tau)\) by a \(K \times K\) group preconditioner shaped by each group’s local design Fisher matrix \(X_j^\top \mathcal{W}_j X_j\) and the Cholesky factor \(L_\Sigma\), with a \((J-1)K\)-dimensional block-minor Jacobian analogous to \(-\sum_j \log d_j + \log\bar{d}\).

6. Conclusion: Frequentist Coordinates for the Bayesian Typical Set

Every sampling bottleneck we removed in Sections 2–4 was diagnosed and fixed with classical frequentist machinery: centered predictors, isometric Helmert contrasts (sum_to_zero_constrain()), Cox–Reid parameter orthogonality, Schur-complement Loewner dominance, Louis’s missing-information identity, and DerSimonian–Laird Fisher-reliability weights \(w_i = (1 + \hat{\tau}^2_{\mathrm{DL}} j_i)^{-1}\). Those tools describe local second-order curvature, which governs leapfrog step sizes and trajectory lengths in NUTS. Borrowing them to reparameterize a hierarchical model stops HMC from spending thousands of gradient evaluations sliding along non-identifiable \((\beta, u)\) ridges or fighting mismatched group sample sizes.

If frequentist Fisher geometry already tells us how to orthogonalize these models, why run HMC at all instead of stopping at restricted maximum likelihood (lme4::lmer), Laplace approximation (lme4::glmer), or plug-in empirical Bayes? Optimization-based estimators summarize a model around a mode plus local curvature, whereas posterior expectations and predictive intervals depend on probability mass—density multiplied by volume—which concentrates in the typical set (Betancourt 2017a). Running R 4.5.2 (lme4 2.0.6) alongside CmdStan 2.40.0 on the four model families from this post shows directly where those frequentist estimates miss the typical set (Figure 7):

Model & Dataset Frequentist Call (R 4.5.2 / lme4 2.0.6) Frequentist Estimate & Diagnostic Bayesian S2Z (CmdStan 2.40.0, 0 div)
Eight Schools (\(J = 8\), Section 4) optimize() on exact Gaussian ML & REML log-likelihoods \(\hat{\tau}_{\mathrm{MLE}} = 0.000\), \(\hat{\tau}_{\mathrm{REML}} = 0.000\) (\(Q = 4.71\), \(\mathrm{df} = 7\)); School 1 EB \(= 7.69\) \([0.99, 14.38]\) \(\mathbb{E}[\tau \mid y] = 3.60\), \(\log\tau\) mode \(= 3.78\), \(90\%\) \([0.24, 9.84]\); School 1 \(= 6.12\) \([-1.55, 15.82]\)
Mixed Counts (\(J = 9\), \(n_5 = 1\), \(\tau_{\mathrm{true}} = 0.50\), Section 4.3) lmer(y ~ 1 + (1 | g)) (ML & REML) + ranef(condVar = TRUE) ML: \(\hat{\tau} = 0.000\) (boundary (singular) fit); REML: \(\hat{\tau} = 0.374\) (\(90\%\) prof \([0, 1.19]\)), \(\alpha_5\) EB \(= 2.62\) \([1.69, 3.54]\) partial_s2z: \(\mathbb{E}[\tau \mid y] = 1.26\) \([0.10, 3.42]\); \(\alpha_5 = 2.45\) \([-0.64, 5.14]\) (\(3.1\times\) wider)
Varying Slopes (\(J = 10\), \(\rho_{\mathrm{true}} = -0.50\), \(\sigma_y = 1.5\), Section 3.1) lmer(y ~ 1 + x_c + (1 + x_c | g), REML = TRUE) isSingular == TRUE in 46 / 100 replications; Seed 1002 hits \(\hat{\rho}_{\mathrm{REML}} = -1.000\), \(\hat{\tau}_{\mathrm{slp}} = 0.432\) non_centered_s2z: interior typical set \(\mathbb{E}[\rho \mid y] = -0.33\), \(90\%\) \(\rho \in [-0.87, +0.43]\), \(\mathbb{E}[\tau_{\mathrm{slp}} \mid y] = 0.44\)
Binary GLM (\(J = 100\), \(n_j = 3\), \(\tau_{\mathrm{true}} = 1.00\), Section 3.3) glmer(y ~ 1 + x + (1 | g), binomial, nAGQ = 1) vs nAGQ = 25 \(\hat{\tau}_{\mathrm{Laplace}} < \hat{\tau}_{\mathrm{AGHQ25}}\) in 28 / 30 runs (median \(0.916\) vs \(1.039\)); Seed 4001 \(\hat{\tau}_{\mathrm{Laplace}} = 0.822\) S2Z Bernoulli: Seed 4001 \(\mathbb{E}[\tau \mid y] = 0.929\), \(90\%\) \([0.30, 1.51]\); handles slopes & crossed factors
Where Frequentist Modes and Laplace Curves Miss the Bayesian Typical Set
Empirical outputs from lme4 2.0.6 (lmer ML/REML, glmer nAGQ = 1 Laplace) and plug-in Empirical Bayes vs CmdStan 2.40.0 S2Z draws
Evidence Case:
1D Scale: Density p(τ | y) vs Volume-Weighted p(log τ | y)
School 1 (q₁, τ): CmdStan S2Z vs REML Plug-In EB
Figure 7: Four empirical comparisons between frequentist mixed-model point/Laplace estimators (red) and Bayesian S2Z HMC posterior draws from CmdStan 2.40.0 (teal). Switch tabs to inspect boundary variance collapse in Eight Schools, plug-in Empirical Bayes under-coverage on a single-observation group (\(n_5 = 1\)), singular \(\hat{\rho} = \pm 1\) walls in lme4::lmer, and first-order Laplace downward bias in lme4::glmer.

In the first two tabs of Figure 7, the likelihood and 1D marginal density peak near or on the boundary \(\tau = 0\). On Eight Schools, optimize() returns \(\hat{\tau}_{\mathrm{MLE}} = \hat{\tau}_{\mathrm{REML}} = 0.000\) (\(Q = 4.71\) on \(7\) degrees of freedom), and even the Bayesian marginal density \(p(\tau \mid y)\) has its mode at \(\tau = 0\), while the centered joint density \(p(\mu, q, \tau \mid y) \propto \tau^{-J}\) diverges there. Plugging \(\hat{\tau} = 0\) into empirical Bayes pools all eight schools onto \(7.69 \pm 4.07\) (\(90\%\) interval \([0.99, 14.38]\)) along the \(\tau = 0\) floor. Yet only \(2.1\%\) of posterior probability mass lies below \(\tau = 0.1\): multiplying \(p(\tau \mid y)\) by the unconstrained volume factor \(d\tau = \tau\,d\log\tau\) shifts the \(\log\tau\) mode to \(\tau = 3.78\) (\(\mathbb{E}[\tau \mid y] = 3.60\), \(90\%\) interval \([0.24, 9.84]\)), fanning School 1’s non_centered_s2z draws across \([-1.55, 15.82]\). On the exact \(J = 9\), \(\tau_{\mathrm{true}} = 0.50\) dataset from Section 4.3 (Mixed Counts J = 9), lme4::lmer(..., REML = FALSE) emits boundary (singular) fit at \(\hat{\tau}_{\mathrm{ML}} = 0.000\), and REML = TRUE plugs \(\hat{\tau}_{\mathrm{REML}} = 0.374\) into ranef(fit, condVar = TRUE) to report a narrow \(90\%\) interval \([1.69, 3.54]\) for single-observation Group 5 (\(n_5 = 1\), \(y_5 = -6.69\)). Integrating over \(\tau \in [0.10, 3.42]\) in partial_s2z produces \([-0.64, 5.14]\)—\(3.1\times\) wider—because draws with \(\tau > 1.5\) allow \(y_5 = -6.69\) to pull \(\alpha_5\) downward.

The third and fourth tabs show covariance walls and non-Gaussian skewness. Simulating 100 datasets on the unbalanced \(J = 10\) varying-slope design of Section 3.1 (\(\tau_{\mathrm{int}} = 0.60, \tau_{\mathrm{slp}} = 0.40, \rho_{\mathrm{true}} = -0.50, \sigma_y = 1.5\)), lme4::lmer(y ~ 1 + x_c + (1 + x_c | g), REML = TRUE) lands on a rank-deficient boundary (isSingular(fit) == TRUE) in 46 of 100 runs (Bates et al. 2015); on Seed 1002 it collapses onto \(\hat{\rho}_{\mathrm{REML}} = -1.000\) (\(\hat{\tau}_{\mathrm{slp}} = 0.432\)), whereas CmdStan non_centered_s2z centers at \(\mathbb{E}[\rho \mid y] = -0.33\) (median \(-0.39\), \(90\%\) \([-0.87, +0.43]\), \(\mathbb{E}[\tau_{\mathrm{slp}} \mid y] = 0.44\), regularized slightly toward zero by lkj(2) on \(J - 1 = 9\) degrees of freedom) and stays in the interior of the positive-definite cone because rank-deficient walls have zero volume. In the small-cluster binary GLM (Binary GLM, \(J = 100, n_j = 3, \tau_{\mathrm{true}} = 1.00\)), lme4::glmer(..., nAGQ = 1) replaces each cluster’s skewed logistic-normal integrand with a symmetric Gaussian bell curve at \(\hat{a}_j\), underestimating exact 25-point Gauss–Hermite quadrature (nAGQ = 25) in 28 of 30 replications (median \(\hat{\tau} = 0.916\) vs \(1.039\)) (Breslow and Lin 1995). As soon as a binary GLM adds varying slopes or a second crossed factor, glmer rejects nAGQ > 1 (Error: nAGQ > 1 is only available for models with a single, scalar random-effects term), leaving first-order Laplace as its only option while S2Z HMC integrates over all latent dimensions jointly and recovers superpopulation parameters via Matheron’s rule.

That division of labor is why the two traditions work well together. Frequentist theory supplies the coordinate chart—orthogonal contrasts, Schur complements, Louis’s missing-information matrix, and Fisher-reliability weights—so the log-posterior has well-conditioned local curvature without altering the model. Bayesian computation then uses that chart to traverse the typical set and integrate over scale, correlation, and superpopulation uncertainty where boundary modes and Laplace approximations fall short.

Appendix: Complete Stan Programs and Lean 4 Theorems

scaled_s2z.stan
data {
  int<lower=1> J;
  vector[J] y_j;
  vector<lower=0>[J] sigma_j;
}
parameters {
  real<lower=0> tau;
  real theta;
  vector[J - 1] h_j;
}
transformed parameters {
  vector[J] u_j = sum_to_zero_constrain(h_j);
  vector[J] q_j = theta + u_j;
}
model {
  tau ~ cauchy(0, 5);
  theta ~ normal(0, sqrt(25 + square(tau) / J));
  (h_j / tau) ~ std_normal();
  target += -(J - 1) * log(tau);
  y_j ~ normal(q_j, sigma_j);
}
generated quantities {
  real mu;
  {
    real v = square(tau) / J;
    mu = normal_rng(25 * theta / (25 + v), sqrt(25 * v / (25 + v)));
  }
}
non_centered_s2z.stan
data {
  int<lower=1> J;
  vector[J] y_j;
  vector<lower=0>[J] sigma_j;
}
parameters {
  real<lower=0> tau;
  real theta;
  vector[J - 1] z_j;
}
transformed parameters {
  vector[J] q_j = theta + tau * sum_to_zero_constrain(z_j);
}
model {
  tau ~ cauchy(0, 5);
  theta ~ normal(0, sqrt(25 + square(tau) / J));
  z_j ~ std_normal();
  y_j ~ normal(q_j, sigma_j);
}
generated quantities {
  real mu;
  {
    real v = square(tau) / J;
    mu = normal_rng(25 * theta / (25 + v), sqrt(25 * v / (25 + v)));
  }
}
correlated_slopes_s2z.stan
data {
  int<lower=1> N;
  int<lower=2> J;
  array[N] int<lower=1, upper=J> group;
  vector[N] x;
  vector[N] y;
  vector[2] beta_0;
  cov_matrix[2] V_0;
}
transformed data {
  real x_bar = mean(x);
  vector[N] x_c = x - x_bar;
  matrix[2, 2] H_x = [[1, x_bar], [0, 1]];
  matrix[2, 2] L_V0 = cholesky_decompose(V_0);
}
parameters {
  vector[2] theta;
  matrix[2, J - 1] h_raw;
  vector<lower=0>[2] tau;
  cholesky_factor_corr[2] L_Omega;
  real<lower=0> sigma_y;
}
transformed parameters {
  matrix[2, 2] L_Sigma = diag_pre_multiply(tau, L_Omega);
  vector[J] c_int = sum_to_zero_constrain(h_raw[1]');
  vector[J] c_slp = sum_to_zero_constrain(h_raw[2]');
}
model {
  matrix[2, 2] Sigma = multiply_lower_tri_self_transpose(L_Sigma);
  matrix[2, J - 1] z_u = mdivide_left_tri_low(L_Sigma, h_raw);

  tau ~ normal(0, 2);
  L_Omega ~ lkj_corr_cholesky(2);
  sigma_y ~ normal(0, 2);
  theta ~ multi_normal(beta_0, V_0 + quad_form(Sigma, H_x') / J);
  to_vector(z_u) ~ std_normal();
  target += -(J - 1) * sum(log(diagonal(L_Sigma)));

  y ~ normal(
    (theta[1] + c_int[group]) + (theta[2] + c_slp[group]) .* x_c,
    sigma_y
  );
}
generated quantities {
  vector[2] beta_c;
  vector[2] mean_u;
  {
    matrix[2, 2] L_m = H_x * L_Sigma / sqrt(1.0 * J);
    matrix[2, 2] A = mdivide_left_tri_low(L_V0, L_m);
    matrix[2, 2] P_z = add_diag(A' * A, 1.0);
    matrix[2, 2] L_Pz = cholesky_decompose(P_z);
    vector[2] rhs = A' * mdivide_left_tri_low(L_V0, theta - beta_0);
    vector[2] z_rng = [std_normal_rng(), std_normal_rng()]';
    vector[2] z_draw = mdivide_left_spd(P_z, rhs)
      + mdivide_right_tri_low(z_rng', L_Pz)';
    mean_u = (L_Sigma / sqrt(1.0 * J)) * z_draw;
    beta_c = theta - H_x * mean_u;
  }
}
partial_centered_s2z.stan
data {
  int<lower=1> N;
  int<lower=2> J;
  array[N] int<lower=1, upper=J> indiv_idx;
  vector[N] y;
  real<lower=0> sigma;
  vector<lower=0, upper=1>[J] w;
}
parameters {
  real theta;
  real<lower=0> tau;
  vector[J - 1] z_raw;
}
transformed parameters {
  vector[J] u = sum_to_zero_constrain(z_raw);
  vector[J] d = tau * (1 - w) + w;
  vector[J] u_div_d = u ./ d;
  vector[J] z_eff = u_div_d - mean(u_div_d);
  vector[J] c = tau * z_eff;
}
model {
  theta ~ normal(0, hypot(5.0, tau / sqrt(J)));
  tau ~ normal(0, 5);
  z_eff ~ std_normal();
  target += -sum(log(d)) + log(mean(d));
  y ~ normal(theta + c[indiv_idx], sigma);
}
generated quantities {
  real mu;
  vector[J] alpha_indiv;
  {
    real v_bar = square(tau) / J;
    real v_tot = 25.0 + v_bar;
    real m = normal_rng((v_bar / v_tot) * theta, sqrt(25.0 * v_bar / v_tot));
    mu = theta - m;
    alpha_indiv = theta + c;
  }
}
lean/S2ZFisher/LoewnerReduction.lean
/-- Exact complementary block-mean gap identity: when `E` and `U` are orthogonal complements
(`Eᵀ * U = 0`, both injective, `∀ z, ∃ a b, z = E *ᵥ a + U *ᵥ b`),
`D⁻¹ - E * (Eᵀ * D * E)⁻¹ * Eᵀ = D⁻¹ * U * (Uᵀ * D⁻¹ * U)⁻¹ * Uᵀ * D⁻¹`. -/
theorem subspace_compression_exact_gap {Amb F M : Type*}
    [Fintype Amb] [DecidableEq Amb] [Fintype F] [DecidableEq F] [Fintype M] [DecidableEq M]
    (D : Matrix Amb Amb ℝ) (hD : D.PosDef)
    (E : Matrix Amb F ℝ) (U : Matrix Amb M ℝ)
    (hE : Function.Injective E.mulVec) (hU : Function.Injective U.mulVec)
    (horth : Eᵀ * U = 0)
    (hspan : ∀ z : Amb → ℝ, ∃ (a : F → ℝ) (b : M → ℝ), z = E.mulVec a + U.mulVec b) :
    D⁻¹ - E * (Eᵀ * D * E)⁻¹ * Eᵀ =
      D⁻¹ * U * (Uᵀ * D⁻¹ * U)⁻¹ * Uᵀ * D⁻¹

/-- Universal Loewner dominance of effective population Fisher information:
`x ⬝ᵥ I_eff^conv(β) x ≤ x ⬝ᵥ I_eff^s2z(θ) x` for all `x : Qcol → ℝ`. -/
theorem brms_s2z_effective_info_ge_conv
    {Qcol Bidx : Type*} [Fintype Qcol] [DecidableEq Bidx] [Fintype Bidx]
    (n : Bidx → ℕ) (M : Bidx → ℕ)
    (Alik : Matrix Qcol Qcol ℝ)
    (Bconv : Matrix Qcol (Σ b : Bidx, Fin (n b + 1) × Fin (M b)) ℝ)
    (Dconv : Matrix (Σ b : Bidx, Fin (n b + 1) × Fin (M b))
      (Σ b : Bidx, Fin (n b + 1) × Fin (M b)) ℝ)
    (hD : Dconv.PosDef) (x : Qcol → ℝ) :
    let E := brmsMultiContrast n M
    let Bs2z := Bconv * E
    let Ds2z := Eᵀ * Dconv * E
    let Ieff_conv := Alik - Bconv * Dconv⁻¹ * Bconvᵀ
    let Ieff_s2z := Alik - Bs2z * Ds2z⁻¹ * Bs2zᵀ
    x ⬝ᵥ Ieff_conv.mulVec x ≤ x ⬝ᵥ Ieff_s2z.mulVec x
lean/S2ZFisher/VaryingSdsLouis.lean
/-- Slepian–Bangs Gaussian Fisher information identity on `ℓ = log s` after marginalizing `m = ā`:
`(1/2) tr(P_{prior}^{s2z} (∂_{ℓ_j} Σ) P_{prior}^{s2z} (∂_{ℓ_k} Σ)) = 2 δ_{jk} - 4 δ_{jk} π_j + 2 π_j π_k`. -/
theorem slepian_bangs_s2z_log_sd_fisher_eq (n : ℕ) (q0 : ℝ) (q : Fin (n + 1) → ℝ)
    (hq : ∀ r : Fin (n + 1), q r ≠ 0)
    (hP : q0 + (∑ r : Fin (n + 1), q r) ≠ 0) (j k : Fin (n + 1)) :
    (1 / 2 : ℝ) * Matrix.trace
      ((varyingSdS2ZPrec n q0 q) * (varyingSdS2ZDCov n q j) *
        ((varyingSdS2ZPrec n q0 q) * (varyingSdS2ZDCov n q k))) =
      louisLogSdFisher n q0 q j k

/-- Louis's missing-information identity on `ℓ = log s`: complete Fisher information `2 δ_{jk}`
minus expected conditional score covariance `q_j q_k [4 E[r_j r_k] P⁻¹ + 2 P⁻²]` equals
`louisLogSdFisher n q0 q j k = 2 δ_{jk} - 4 δ_{jk} π_j + 2 π_j π_k`. -/
theorem louis_score_cov_log_sd_fisher_eq (n : ℕ) (q0 : ℝ) (q : Fin (n + 1) → ℝ)
    (hq : ∀ r : Fin (n + 1), q r ≠ 0)
    (hP : q0 + (∑ r : Fin (n + 1), q r) ≠ 0) (j k : Fin (n + 1)) :
    let P := q0 + ∑ r : Fin (n + 1), q r
    let cov_r := (if j = k then (q j)⁻¹ else 0) - P⁻¹
    let miss_jk := q j * q k * (4 * cov_r * P⁻¹ + 2 * (P⁻¹) ^ 2)
    2 * (if j = k then (1 : ℝ) else 0) - miss_jk =
      louisLogSdFisher n q0 q j k

/-- Explicit left inverse of `partialCenterS2Z`: for all `τ > 0` and `w_i ∈ [0, 1]`,
`partialCenterS2ZInv` recovers `z_raw ∈ ℝ^n` identically. -/
theorem s2z_partial_centering_left_inv (n : ℕ) (tau : ℝ) (htau : 0 < tau)
    (w : Fin (n + 1) → ℝ) (hw0 : ∀ i, 0 ≤ w i) (hw1 : ∀ i, w i ≤ 1) :
    Function.LeftInverse (partialCenterS2ZInv n tau w) (partialCenterS2Z n tau w)
NoteNote

The Fisher information analysis and ideas in this post are mine. The mathematics, proofs, and Lean 4 code were assisted by Gemini Neon.

References

Bates, Douglas, Martin Mächler, Ben Bolker, and Steve Walker. 2015. “Fitting Linear Mixed-Effects Models Using lme4.” Journal of Statistical Software 67 (1): 1–48. https://doi.org/10.18637/jss.v067.i01.
Betancourt, Michael. 2017a. A Conceptual Introduction to Hamiltonian Monte Carlo. https://arxiv.org/abs/1701.02434.
Betancourt, Michael. 2017b. Hierarchical Modeling. https://betanalpha.github.io/assets/case_studies/hierarchical_modeling.html.
Betancourt, Michael, and Mark Girolami. 2015. “Hamiltonian Monte Carlo for Hierarchical Models.” In Current Trends in Bayesian Methodology with Applications. Chapman; Hall/CRC.
Breslow, Norman E., and Xihong Lin. 1995. “Bias Correction in Generalised Linear Mixed Models with a Single Component of Dispersion.” Biometrika 82 (1): 81–91. https://doi.org/10.1093/biomet/82.1.81.
Bürkner, Paul-Christian. 2017. “brms: An R Package for Bayesian Multilevel Models Using Stan.” Journal of Statistical Software 80 (1): 1–28. https://doi.org/10.18637/jss.v080.i01.
Cox, D. R., and N. Reid. 1987. “Parameter Orthogonality and Approximate Conditional Inference.” Journal of the Royal Statistical Society: Series B (Methodological) 49 (1): 1–39.
Egozcue, Juan Jose, Vera Pawlowsky-Glahn, Gloria Mateu-Figueras, and Carles Barceló-Vidal. 2003. “Isometric Logratio Transformations for Compositional Data Analysis.” Mathematical Geology 35 (3): 279–300. https://doi.org/10.1023/A:1023818214614.
Gelman, Andrew. 2005. “Analysis of Variance—Why It Is More Important Than Ever.” The Annals of Statistics 33 (1): 1–53. https://doi.org/10.1214/009053604000001048.
Jacobi, Carl Gustav Jacob. 1834. “De Binis Quibuslibet Functionibus Homogeneis Secundi Ordinis Per Substitutiones Lineares in Alias Binas Tranformandis.” Journal für Die Reine Und Angewandte Mathematik 12: 1–69.
Louis, Thomas A. 1982. “Finding the Observed Information Matrix When Using the EM Algorithm.” Journal of the Royal Statistical Society: Series B (Methodological) 44 (2): 226–33.
Löwner, Karl. 1934. “Über Monotone Matrixfunktionen.” Mathematische Zeitschrift 38 (1): 177–216. https://doi.org/10.1007/BF01170633.
Millar, Colin P., Robert J. Fryer, and David Hirst. 2009. Hierarchical Modelling of Scottish Fisheries Observer Data: The Underlying Model. Collaborative Report No. 01/09. Fisheries Research Services.
Ogle, Kiona, and Jarrett J. Barber. 2020. “Ensuring Identifiability in Hierarchical Mixed Effects Bayesian Models.” Ecological Applications 30 (7): e02159. https://doi.org/10.1002/eap.2159.
Papaspiliopoulos, Omiros, and Gareth O. Roberts. 2003. “Non-Centered Parameterisations for Hierarchical Models and Data Augmentation.” Bayesian Statistics 7: 307–26.
Papaspiliopoulos, Omiros, Gareth O. Roberts, and Martin Sköld. 2007. “A General Framework for the Parametrization of Hierarchical Models.” Statistical Science 22 (1): 59–73. https://doi.org/10.1214/088342307000000014.
Pinkney, Sean. 2024. Hierarchical Modeling in Stan: StanCon 2024 Tutorial. https://github.com/spinkney/hierarchical_model_tutorial.
Rouder, Jeffrey N., Richard D. Morey, Paul L. Speckman, and Jordan M. Province. 2012. “Default Bayes Factors for ANOVA Designs.” Journal of Mathematical Psychology 56 (5): 356–74. https://doi.org/10.1016/j.jmp.2012.08.001.
Rubin, Donald B. 1981. “Estimation in Parallel Randomized Experiments.” Journal of Educational Statistics 6 (4): 377–401.
Vines, S. K., W. R. Gilks, and P. Wild. 1996. “Fitting Bayesian Multiple Random Effects Models.” Statistics and Computing 6 (4): 337–46. https://doi.org/10.1007/BF00143554.

Footnotes

  1. General implementations of all the extensions from the talk—correlated varying slopes with centered covariates, multiple crossed factor sets, generalized linear models with non-Gaussian priors, and heavy-tailed or varying-scale group effects—are currently being worked on for brms (Bürkner 2017).↩︎

  2. Papaspiliopoulos and Roberts (2003) introduced partially non-centered coordinates by weighting \(\mu\) alone, without rescaling the denominator by \(\tau(1 - w_i) + w_i\) or deriving the implied latent scale needed in Stan; Papaspiliopoulos et al. (2007) analyzed general linear partial non-centering on unconstrained group effects without a zero-sum subspace constraint.↩︎