Skip to content

A Python/JAX module ​

jax_source writes a Python module from an RKBRMI. The module evaluates the model's log density and constrained parameters with JAX; NumPyro or BlackJAX can sample it without a Julia process. This example fits a varying-intercepts, varying-slopes regression in Julia and Python, then compares the gradients and posterior distributions.

Model ​

Each group has its own intercept and slope around a population line. Their deviations share a correlation parameter; the observation noise has one residual standard deviation. The data are synthetic.

brm-comparison
Correlated group intercepts and slopes
panes: brm|stanblocks|rkppl|stan|jax:3
julia
function varying_slopes_model(data = varying_slopes_data().data)
    (@brm begin
        "Residual scale of the response."
        sigma ~ Exponential(1)
        "Expected response: a population line, and each group's own intercept and slope, correlated."
        mu ~ 1 + x + (1 + x | g)
        effect(mu, Intercept) ~ Normal(0, 2)
        effect(mu, x) ~ Normal(0, 1)
        sd(mu, g) ~ Exponential(1)
        "Measured response."
        y ~ Normal(mu, sigma)
    end)(data)
end

# ---------------------------------------------------------------------------
# Everything below runs only as a script (`julia --project=test research/jax/reproduce.jl`).
julia
SBBRMI with data keys = [:b_mu__g_g_lkj_eta, :col_idx_mu_mu__g_g, :g_idx, :n_g, :n_terms_mu__g_g, :x, :y]
configured submodels:
ranef_correlated_draws_generic_configured_1 = Base.merge(BayesianRegressionModels.ranef_correlated_draws_generic, quote
            tau ~ (StanBlocks.builtin.restricted)(exponential, 1.0 ./ 1; n = n_terms, lower = 0.0)
        end)
emitted @slic body:
begin
    b_mu__g_g ~ ranef_correlated_draws_generic_configured_1(; group_idx = g_idx, n_groups = n_g, n_terms = n_terms_mu__g_g, lkj_eta = b_mu__g_g_lkj_eta)
    sigma ~ exponential(1.0 ./ 1)
    X_mu = hcat(rep_vector(1.0, num_elements(x)), x)
    pop_mu ~ _popefs_normal(; X = X_mu, beta_loc = [0, 0], beta_scale = [2, 1])
    Z_mu_mu__g_g = hcat(rep_vector(1.0, num_elements(x)), x)
    r_mu_mu__g_g = rows_dot_product(Z_mu_mu__g_g, b_mu__g_g[g_idx, col_idx_mu_mu__g_g])
    mu = pop_mu + r_mu_mu__g_g
    y ~ normal(mu, sigma)
end
julia
"""
Group-level (varying) effects of grouping `g`, `K` correlated margins per level.

Non-centered, from the scales `tau[1:K]` (drawn from their priors), the Cholesky factor of the margins' correlation `L ~ LKJCholesky(K, eta)` and standardized effects
`z[1:length(levels(g)), 1:K] ~ Normal(0, 1)`. Returns the
level-by-margin matrix `z * transpose(tau .* L)`, one row per level of `g` in order.
"""
brm_correlated_group_effects(g, K, eta) = begin
        tau[1:K] .~ Exponential.(1)
        L ~ LKJCholesky(K, eta)
        z[1:length(levels(g)), 1:K] .~ Normal.(0, 1)
        return z * transpose(tau .* L)
    end

"""
Population-level effects: one coefficient per column of the design matrix `X`.

Draws `beta_pop[1:ncoef] ~ Normal(loc, scale)` and returns the linear predictor
`X * beta_pop`. `ncoef` is the number of columns of `X`. Each prior argument (`loc`, `scale`) is one value for all coefficients or a vector with one per coefficient.
"""
brm_population_effects(X, ncoef, loc, scale) = begin
        beta_pop[1:ncoef] .~ Normal.(loc, scale)
        return X * beta_pop
    end

begin
    g_fit_levels = brm_fit_levels(g_fit)
    b_mu__g_g ~ brm_correlated_group_effects(g_fit_levels, 2, 1.0)
    g_level = brm_level_indices(g, g_fit_levels)
    ranef_mu_mu__g_g = b_mu__g_g[g_level, 1] .+ b_mu__g_g[g_level, 2] .* x
    X_mu = hcat(ones(length(g)), x)
    pop_mu ~ brm_population_effects(X_mu, 2, 0.0, [2.0, 1.0])
    Core.@doc "Expected response: a population line, and each group's own intercept and slope, correlated." mu = pop_mu .+ ranef_mu_mu__g_g
    Core.@doc "Residual scale of the response." sigma ~ Exponential(1.0)
    Core.@doc "Measured response." y .~ Normal.(mu, sigma)
end
stan
functions {
matrix hcat(
    vector x,
    vector y
) {
    int n = dims(x)[1];
    if (dims(y)[1] != n) reject("hcat: dim mismatch — `y` dim 1 (= ", dims(y)[1], ") does not match `n` (= ", n, "), inferred from `x` dim 1. `n` sizes: `x` dim 1 (= ", dims(x)[1], "), `y` dim 1 (= ", dims(y)[1], ").");
    return append_col(x, y);
}
vector normal_lpdfs(
    vector obs,
    vector loc,
    real scale
) {
    return jbroadcasted_normal_lpdfs(obs, loc, scale);
}
vector jbroadcasted_normal_lpdfs(
    vector x1,
    vector x2,
    real x3
) {
    int n = dims(x1)[1];
    vector[n] rv;
    for(i in 1:n) {
        rv[i] = normal_lpdfs(broadcasted_getindex(x1, i), broadcasted_getindex(x2, i), x3);
    }
    return rv;
}
real normal_lpdfs(
    real args1,
    real args2,
    real args3
) {
    return normal_lpdf(args1 | args2, args3);
}
real broadcasted_getindex(vector x, int i) {
    return x[i];
}
vector normal_vector_rng(
    int anontok__1,
    vector a,
    real b
) {
    int n = anontok__1;
    if((n == 0)) {
        vector[n] rv;
        return rv;
    } else {
        return to_vector(normal_rng(a, b));
    }
}
}
data {
    int n_terms_mu__g_g;
    real b_mu__g_g_lkj_eta;
    int n_g;
    int x_n;
    vector[x_n] x;
    int g_idx_n;
    int col_idx_mu_mu__g_g_n;
    array[g_idx_n] int g_idx;
    array[col_idx_mu_mu__g_g_n] int col_idx_mu_mu__g_g;
    int y_n;
    vector[y_n] y;
}
transformed data {
    matrix[x_n, 2] X_mu = hcat(rep_vector(1.0, num_elements(x)), x);
    int pop_mu_n_covariates = 2;
    matrix[x_n, 2] Z_mu_mu__g_g = hcat(rep_vector(1.0, num_elements(x)), x);
}
parameters {
    cholesky_factor_corr[n_terms_mu__g_g] b_mu__g_g_L;
    vector<lower=0.0>[n_terms_mu__g_g] b_mu__g_g_tau;
    vector[(n_terms_mu__g_g * n_g)] b_mu__g_g_z_flat;
    real<lower=0.0> sigma;
    vector[pop_mu_n_covariates] pop_mu_beta_pop;
}
transformed parameters {
    matrix[n_terms_mu__g_g, n_g] b_mu__g_g_z = to_matrix(b_mu__g_g_z_flat, n_terms_mu__g_g, n_g);
    matrix[n_g, n_terms_mu__g_g] b_mu__g_g = ((diag_pre_multiply(b_mu__g_g_tau, b_mu__g_g_L) * b_mu__g_g_z)');
    vector[x_n] pop_mu = (X_mu * pop_mu_beta_pop);
    vector[g_idx_n] r_mu_mu__g_g = rows_dot_product(Z_mu_mu__g_g, b_mu__g_g[g_idx, col_idx_mu_mu__g_g]);
    vector[x_n] mu = (pop_mu + r_mu_mu__g_g);
}
model {
    b_mu__g_g_L ~ lkj_corr_cholesky(b_mu__g_g_lkj_eta);
    b_mu__g_g_tau ~ exponential((1.0 ./ 1));
    b_mu__g_g_z_flat ~ std_normal();
    sigma ~ exponential((1.0 ./ 1));
    pop_mu_beta_pop ~ normal([0, 0]', [2, 1]');
    y ~ normal(mu, sigma);
}
generated quantities {
    vector[y_n] y_likelihood = normal_lpdfs(y, mu, sigma);
    vector[y_n] y_gen = normal_vector_rng(y_n, mu, sigma);
}
julia
using ReactiveKernels, ReactiveKernelsPPL
rk = RKBRMI(model)
source = jax_source(rk.model, rk_bound_plan(rk))
write("model.py", source)
inputs = rk_bound_data(rk, source)   # exactly the inputs prepare_data reads
python
import jax
import model as m

prepared = m.prepare_data(**inputs)
lp = m.log_density(u, **prepared)               # u: unconstrained, length m.dimension(prepared)
lp = jax.jit(m.log_density)(u, **prepared)      # one compiled function for every dataset of these shapes
python
"""Generated by ReactiveKernelsPPL.jax_source from a built @rkppl program; do not edit.

Data: g, g_fit, x, y.

Model documentation:

- `mu`: Expected response: a population line, and each group's own intercept and slope, correlated.
- `sigma`: Residual scale of the response.
- `y`: Measured response.
- `b_mu__g_g`: Group-level (varying) effects of grouping `g`, `K` correlated margins per level.

  Non-centered, from the scales `tau[1:K]` (drawn from their priors), the Cholesky factor of the margins' correlation `L ~ LKJCholesky(K, eta)` and standardized effects
  `z[1:length(levels(g)), 1:K] ~ Normal(0, 1)`. Returns the
  level-by-margin matrix `z * transpose(tau .* L)`, one row per level of `g` in order.
- `pop_mu`: Population-level effects: one coefficient per column of the design matrix `X`.

  Draws `beta_pop[1:ncoef] ~ Normal(loc, scale)` and returns the linear predictor
  `X * beta_pop`. `ncoef` is the number of columns of `X`. Each prior argument (`loc`, `scale`) is one value for all coefficients or a vector with one per coefficient.
"""
import numpy as np
import scipy.special as ssp
from typing import Any

import jax
import jax.numpy as jnp
import jax.scipy.linalg
import jax.scipy.special as jsp
from jax.typing import ArrayLike

jax.config.update("jax_enable_x64", True)

DATA = {"g": {"dtype": "object", "ndim": 1, "ragged": False}, "g_fit": {"dtype": "object", "ndim": 1, "ragged": False}, "x": {"dtype": "float64", "ndim": 1, "ragged": False}, "y": {"dtype": "float64", "ndim": 1, "ragged": False}}
INPUTS = ("unconstrained", "ppl_last_b_mu_g_g_z", "ppl_axis1_b_mu_g_g_z", "ppl_first_pop_mu_beta_pop", "ppl_last_pop_mu_beta_pop", "g_level", "x", "X_mu", "y")
PREPARED = {"ppl_last_b_mu_g_g_z": {"dtype": "int64", "ndim": 0, "ragged": False}, "ppl_axis1_b_mu_g_g_z": {"dtype": "int64", "ndim": 0, "ragged": False}, "ppl_first_pop_mu_beta_pop": {"dtype": "int64", "ndim": 0, "ragged": False}, "ppl_last_pop_mu_beta_pop": {"dtype": "int64", "ndim": 0, "ragged": False}, "g_level": {"dtype": "int64", "ndim": 1, "ragged": False}, "x": {"dtype": "float64", "ndim": 1, "ragged": False}, "X_mu": {"dtype": "float64", "ndim": 2, "ragged": False}, "y": {"dtype": "float64", "ndim": 1, "ragged": False}}
UNTRANSLATED = {}


def _rk_order_key_np(x):
    # Julia's isless order of an array as sortable keys: a float is an integer
    # key, -0.0 before 0.0 and every NaN last, equal for values isequal treats
    # as equal. Integer and string arrays are their own keys.
    x = np.asarray(x)
    if x.dtype.kind != "f":
        return x
    bits = np.where(np.isnan(x), np.nan, x).astype(np.float64).view(np.int64)
    return np.where(bits < 0, bits ^ np.int64(0x7FFFFFFFFFFFFFFF), bits)


def _rk_unique_np(x):
    # Julia's unique of a vector: the first value of each isequal class, in
    # order.
    x = np.asarray(x)
    _, first = np.unique(_rk_order_key_np(x), return_index=True)
    return x[np.sort(first)]


def _rk_sort_np(x):
    # Julia's sort of a vector: ascending in isless order, equal values in
    # their order.
    x = np.asarray(x)
    return x[np.argsort(_rk_order_key_np(x), kind="stable")]


def _brm_sorted_labels_np(source):
    labels = _rk_unique_np(source)
    sorted_ = _rk_sort_np(labels)
    return sorted_


def _brm_fit_levels_np(source):
    value = _brm_sorted_labels_np(source)
    levels = value
    return levels


def _rk_dict_key(x):
    if isinstance(x, tuple):
        return (1, tuple(map(_rk_dict_key, x)))
    if isinstance(x, np.ndarray):
        return (2, x.shape, tuple(map(_rk_dict_key, x.ravel(order="F"))))
    if isinstance(x, (complex, np.complexfloating)):
        if x.imag == 0 and not np.signbit(x.imag):
            return _rk_dict_key(x.real)
        return (3, _rk_dict_key(x.real), _rk_dict_key(x.imag))
    if isinstance(x, (float, np.floating)):
        if np.isnan(x):
            return (4,)
        if x == 0 and np.signbit(x):
            return (5,)
    return (0, x)

class _RKDict:
    def __init__(self, pairs=()):
        self.data = {}
        for key, value in pairs:
            self[key] = value

    def __len__(self):
        return len(self.data)

    def __contains__(self, key):
        return _rk_dict_key(key) in self.data

    def __getitem__(self, key):
        return self.data[_rk_dict_key(key)][1]

    def __setitem__(self, key, value):
        self.data[_rk_dict_key(key)] = (key, value)

    def get(self, key, default):
        item = self.data.get(_rk_dict_key(key))
        return default if item is None else item[1]

    def setdefault(self, key, default):
        return self.data.setdefault(_rk_dict_key(key), (key, default))[1]

    def pop(self, key, default):
        item = self.data.pop(_rk_dict_key(key), None)
        return default if item is None else item[1]

    def items(self):
        return self.data.values()

    def keys(self):
        return (item[0] for item in self.items())

    def values(self):
        return (item[1] for item in self.items())

    def copy(self):
        return _RKDict(self.items())


def _brm_level_indices_np(labels, source):
    value = _brm_fit_levels_np(source)
    levels = value
    lookup = _RKDict()
    for k in range(1, len(levels) + 1):
        lookup[levels[k - 1]] = k
    indices = np.zeros((len(labels),), dtype=np.int64)
    for r in range(1, len(labels) + 1):
        position = lookup.get(labels[r - 1], 0)
        if position == 0:
            raise ValueError("".join([str("RK backend: group label `"), str(labels[r - 1]), str("` is not one of the "), str(len(levels)), str(" fitted levels. A replay keeps the fitted levels of every grouping it does not resample; name the grouping in `resample_groups` to take the new data's own levels.")]))
        indices[r - 1] = position
    return indices


def _rk_levels_np(x):
    arr = np.asarray(x)
    values = sorted(set(v for v in arr.tolist() if v is not None))
    return np.array(values, dtype=object if arr.dtype == object else arr.dtype)


class StaticInt(int):
    """An integer of the prepared data that sets a shape.

    It is an `int` everywhere, and `jax.jit` treats it as static, so the
    functions jit with the prepared data as arguments; a new value traces
    them again.
    """

    def __repr__(self):
        return "StaticInt(%d)" % int(self)


jax.tree_util.register_pytree_node(StaticInt, lambda s: ((), int(s)), lambda v, _: StaticInt(v))


def brm_population_effects(X: ArrayLike, beta_pop: ArrayLike, *, outputs: tuple[str, ...]) -> dict:
    """Population-level effects: one coefficient per column of the design matrix `X`.

    Draws `beta_pop[1:ncoef] ~ Normal(loc, scale)` and returns the linear predictor
    `X * beta_pop`. `ncoef` is the number of columns of `X`. Each prior argument (`loc`, `scale`) is one value for all coefficients or a vector with one per coefficient.
    """
    results = {}
    if any(name in outputs for name in ("value",)):
        value = X @ beta_pop
    if any(name in outputs for name in ("ppl_prior_beta_pop", "ppl_pw_prior_beta_pop")):
        ppl_parg_beta_pop_2 = jnp.asarray([2.0, 1.0], dtype=jnp.float64)
        def ppl_pw_prior_beta_pop_cell(beta_pop_2, scale):
            log_scale = jnp.log(scale)
            standardized = (beta_pop_2 - 0.0) / jnp.where(jnp.logical_and(scale == 0, beta_pop_2 == 0.0), 1.0, scale)
            standard_logpdf = -0.5 * np.log(2 * np.pi) - 0.5 * standardized ** 2
            logpdf = standard_logpdf - jnp.where(jnp.logical_and(scale == 0, beta_pop_2 != 0.0), 0.0, log_scale)
            return logpdf
        ppl_pw_prior_beta_pop = (jnp.zeros(beta_pop.shape[:1], dtype=jnp.float64) if 0 in beta_pop.shape[:1] and ppl_parg_beta_pop_2.shape[:1] == beta_pop.shape[:1] else jax.vmap(ppl_pw_prior_beta_pop_cell, in_axes=(0, 0))(beta_pop, ppl_parg_beta_pop_2))
    if any(name in outputs for name in ("ppl_prior_beta_pop",)):
        ppl_prior_beta_pop = jnp.sum(ppl_pw_prior_beta_pop)
    if "ppl_prior_beta_pop" in outputs:
        results["ppl_prior_beta_pop"] = ppl_prior_beta_pop
    if "ppl_pw_prior_beta_pop" in outputs:
        results["ppl_pw_prior_beta_pop"] = ppl_pw_prior_beta_pop
    if "value" in outputs:
        results["value"] = value
    return results


def brm_correlated_group_effects_density(
    ppl_last_z: ArrayLike,
    tau: ArrayLike,
    unconstrained: ArrayLike,
    *,
    outputs: tuple[str, ...],
) -> dict:
    """Group-level (varying) effects of grouping `g`, `K` correlated margins per level.

    Non-centered, from the scales `tau[1:K]` (drawn from their priors), the Cholesky factor of the margins' correlation `L ~ LKJCholesky(K, eta)` and standardized effects
    `z[1:length(levels(g)), 1:K] ~ Normal(0, 1)`. Returns the
    level-by-margin matrix `z * transpose(tau .* L)`, one row per level of `g` in order.
    """
    results = {}
    if any(name in outputs for name in ("ppl_lkj_diagonal_L", "ppl_lkj_partials_L", "ppl_lkj_raw_L", "ppl_prior_L")):
        ppl_lkj_raw_L = unconstrained[3:4]
    if any(name in outputs for name in ("ppl_lkj_diagonal_L", "ppl_lkj_partials_L", "ppl_prior_L")):
        ppl_lkj_partials_L = jnp.tanh(ppl_lkj_raw_L)
    if any(name in outputs for name in ("ppl_lkj_diagonal_L", "ppl_prior_L")):
        out = jnp.ones((2,), dtype=jnp.float64)
        tuple_ = (1, 2, 1.0)
        i = tuple_[0]
        j = tuple_[1]
        d = tuple_[2]
        def loop_body(p, carry):
            (d_2, i_2, j_2, out_2) = carry
            d_3 = d_2 * jnp.sqrt(1 - ppl_lkj_partials_L[p - 1] ** 2)
            def then_arm():
                i_3 = i_2 + 1
                return (None, jnp.asarray(d_3, dtype=jnp.float64), jnp.asarray(i_3, dtype=jnp.int64), jnp.asarray(j_2, dtype=jnp.int64), out_2)
            def else_arm():
                out_3 = out_2.at[j_2 - 1].set(d_3)
                tuple__2 = (1, j_2 + 1, 1.0)
                i_4 = tuple__2[0]
                j_3 = tuple__2[1]
                d_4 = tuple__2[2]
                return (None, jnp.asarray(d_4, dtype=jnp.float64), jnp.asarray(i_4, dtype=jnp.int64), jnp.asarray(j_3, dtype=jnp.int64), out_3)
            branch = jax.lax.cond(i_2 + 1 < j_2, then_arm, else_arm)
            return (branch[1], branch[2], branch[3], branch[4])
        loop_carry = jax.lax.fori_loop(1, 2, loop_body, (jnp.asarray(d, dtype=jnp.float64), jnp.asarray(i, dtype=jnp.int64), jnp.asarray(j, dtype=jnp.int64), out))
        ppl_lkj_diagonal_L = loop_carry[3]
    if any(name in outputs for name in ("ppl_arrflat_z", "ppl_prior_z", "ppl_pw_prior_z")):
        ppl_arrflat_z = unconstrained[4:ppl_last_z]
    if any(name in outputs for name in ("ppl_prior_tau", "ppl_pw_prior_tau")):
        def ppl_pw_prior_tau_cell(tau_2):
            log_scale = np.log(1.0)
            logpdf = jax.lax.cond(tau_2 < 0, lambda: -jnp.inf, lambda: -log_scale - tau_2 / 1.0)
            return logpdf
        ppl_pw_prior_tau = (jnp.zeros(tau.shape[:1], dtype=jnp.float64) if 0 in tau.shape[:1] else jax.vmap(ppl_pw_prior_tau_cell, in_axes=(0,))(tau))
    if any(name in outputs for name in ("ppl_prior_tau",)):
        ppl_prior_tau = jnp.sum(ppl_pw_prior_tau)
    if any(name in outputs for name in ("ppl_prior_L",)):
        total = -0.6931471805599453
        def loop_body_2(i_2, carry_2):
            (total_2,) = carry_2
            total_3 = total_2 + (2 - i_2) * jnp.log(ppl_lkj_diagonal_L[i_2 - 1])
            return (total_3,)
        loop_carry_2 = jax.lax.fori_loop(2, 3, loop_body_2, (jnp.asarray(total, dtype=jnp.float64),))
        ppl_prior_L = loop_carry_2[0]
    if any(name in outputs for name in ("ppl_prior_z", "ppl_pw_prior_z")):
        def ppl_pw_prior_z_cell(z):
            log_scale = np.log(1.0)
            standardized = (z - 0.0) / jnp.where((z == 0.0 if 1.0 == 0 else False), 1.0, 1.0)
            standard_logpdf = -0.5 * np.log(2 * np.pi) - 0.5 * standardized ** 2
            logpdf = standard_logpdf - jnp.where((z != 0.0 if 1.0 == 0 else False), 0.0, log_scale)
            return logpdf
        ppl_pw_prior_z = (jnp.zeros(ppl_arrflat_z.shape[:1], dtype=jnp.float64) if 0 in ppl_arrflat_z.shape[:1] else jax.vmap(ppl_pw_prior_z_cell, in_axes=(0,))(ppl_arrflat_z))
    if any(name in outputs for name in ("ppl_prior_z",)):
        ppl_prior_z = jnp.sum(ppl_pw_prior_z)
    if "ppl_arrflat_z" in outputs:
        results["ppl_arrflat_z"] = ppl_arrflat_z
    if "ppl_lkj_diagonal_L" in outputs:
        results["ppl_lkj_diagonal_L"] = ppl_lkj_diagonal_L
    if "ppl_lkj_partials_L" in outputs:
        results["ppl_lkj_partials_L"] = ppl_lkj_partials_L
    if "ppl_lkj_raw_L" in outputs:
        results["ppl_lkj_raw_L"] = ppl_lkj_raw_L
    if "ppl_prior_L" in outputs:
        results["ppl_prior_L"] = ppl_prior_L
    if "ppl_prior_tau" in outputs:
        results["ppl_prior_tau"] = ppl_prior_tau
    if "ppl_prior_z" in outputs:
        results["ppl_prior_z"] = ppl_prior_z
    if "ppl_pw_prior_tau" in outputs:
        results["ppl_pw_prior_tau"] = ppl_pw_prior_tau
    if "ppl_pw_prior_z" in outputs:
        results["ppl_pw_prior_z"] = ppl_pw_prior_z
    return results


def _ppl_lkj_lower(z: ArrayLike, diagonal: ArrayLike, K: ArrayLike, P: ArrayLike) -> jax.Array:
    """Compute `_ppl_lkj_lower` from its authored source."""
    out = jnp.zeros((K, K), dtype=jnp.float64)
    out_2 = out.at[0, 0].set(1.0)
    tuple_ = (1, 2, 1.0)
    i = tuple_[0]
    j = tuple_[1]
    w = tuple_[2]
    def loop_body(p, carry):
        (i_2, j_2, out_3, w_2) = carry
        out_4 = out_3.at[j_2 - 1, i_2 - 1].set(z[p - 1] * w_2)
        w_3 = w_2 * jnp.sqrt(1 - z[p - 1] ** 2)
        def then_arm():
            i_3 = i_2 + 1
            return (None, jnp.asarray(i_3, dtype=jnp.int64), jnp.asarray(j_2, dtype=jnp.int64), out_4, jnp.asarray(w_3, dtype=jnp.float64))
        def else_arm():
            out_5 = out_4.at[j_2 - 1, j_2 - 1].set(diagonal[j_2 - 1])
            tuple__2 = (1, j_2 + 1, 1.0)
            i_4 = tuple__2[0]
            j_3 = tuple__2[1]
            w_4 = tuple__2[2]
            return (None, jnp.asarray(i_4, dtype=jnp.int64), jnp.asarray(j_3, dtype=jnp.int64), out_5, jnp.asarray(w_4, dtype=jnp.float64))
        branch = jax.lax.cond(i_2 + 1 < j_2, then_arm, else_arm)
        return (branch[1], branch[2], branch[3], branch[4])
    carry_init = (jnp.asarray(i, dtype=jnp.int64), jnp.asarray(j, dtype=jnp.int64), out_2, jnp.asarray(w, dtype=jnp.float64))
    loop_carry = jax.lax.fori_loop(1, P + 1, loop_body, carry_init) if 1 <= P else carry_init
    return loop_carry[2]


def brm_correlated_group_effects(
    L: ArrayLike,
    tau: ArrayLike,
    z: ArrayLike,
    *,
    outputs: tuple[str, ...],
) -> dict:
    """Group-level (varying) effects of grouping `g`, `K` correlated margins per level.

    Non-centered, from the scales `tau[1:K]` (drawn from their priors), the Cholesky factor of the margins' correlation `L ~ LKJCholesky(K, eta)` and standardized effects
    `z[1:length(levels(g)), 1:K] ~ Normal(0, 1)`. Returns the
    level-by-margin matrix `z * transpose(tau .* L)`, one row per level of `g` in order.
    """
    results = {}
    if any(name in outputs for name in ("value",)):
        value = z @ jnp.transpose(tau[..., None] * L)
    if "value" in outputs:
        results["value"] = value
    return results


def prepare_data(g: Any, g_fit: Any, x: ArrayLike, y: ArrayLike) -> dict:
    """The functions' data inputs, computed from the raw data once per dataset.

    Pass the data by the names the model reads them; a list of arrays is a ragged
    column. Call the other functions with the result: `f(u, **prepared)`.
    """
    g = np.asarray(g, dtype=object)
    g_fit = np.asarray(g_fit, dtype=object)
    x = np.asarray(x, dtype=np.float64)
    y = np.asarray(y, dtype=np.float64)
    X_mu = np.asarray(np.concatenate([np.ones((len(g),), dtype=np.float64)[:, None], x[:, None]], axis=1), dtype=np.float64)
    value = _brm_fit_levels_np(g_fit)
    g_fit_levels = value
    value_2 = _brm_level_indices_np(g, g_fit_levels)
    g_level = np.asarray(value_2, dtype=np.int64)
    ppl_axis1_b_mu_g_g_z = len(_rk_levels_np(g_fit_levels))
    ppl_last_b_mu_g_g_z = 4 + 2 * ppl_axis1_b_mu_g_g_z
    ppl_first_pop_mu_beta_pop = ppl_last_b_mu_g_g_z + 1
    ppl_last_pop_mu_beta_pop = ppl_first_pop_mu_beta_pop + 1
    return {"ppl_last_b_mu_g_g_z": StaticInt(ppl_last_b_mu_g_g_z), "ppl_axis1_b_mu_g_g_z": StaticInt(ppl_axis1_b_mu_g_g_z), "ppl_first_pop_mu_beta_pop": StaticInt(ppl_first_pop_mu_beta_pop), "ppl_last_pop_mu_beta_pop": StaticInt(ppl_last_pop_mu_beta_pop), "g_level": np.asarray(g_level, dtype=np.int64), "x": np.asarray(x, dtype=np.float64), "X_mu": np.asarray(X_mu, dtype=np.float64), "y": np.asarray(y, dtype=np.float64)}


def model(_entry: str, unconstrained: ArrayLike, **prepared: ArrayLike) -> Any:
    """Shared model computation. The generated entry wrappers select a static output."""
    ppl_last_b_mu_g_g_z = prepared["ppl_last_b_mu_g_g_z"]
    ppl_axis1_b_mu_g_g_z = prepared["ppl_axis1_b_mu_g_g_z"]
    ppl_first_pop_mu_beta_pop = prepared["ppl_first_pop_mu_beta_pop"]
    ppl_last_pop_mu_beta_pop = prepared["ppl_last_pop_mu_beta_pop"]
    g_level = prepared["g_level"]
    x = prepared["x"]
    X_mu = prepared["X_mu"]
    y = prepared["y"]
    unconstrained = jnp.asarray(unconstrained)
    g_level = jnp.asarray(g_level)
    x = jnp.asarray(x)
    X_mu = jnp.asarray(X_mu)
    y = jnp.asarray(y)
    if _entry in ("log_density", "log_prior", "log_likelihood", "constrain"):
        u_argument = unconstrained[0]
        constrain_2 = jnp.exp(u_argument)
        plate_argument = unconstrained[1:3]
        def b_mu_g_g_tau_cell(ppl_cell_b_mu_g_g_tau):
            constrain_3 = jnp.exp(ppl_cell_b_mu_g_g_tau)
            return constrain_3
        b_mu_g_g_tau = (jnp.zeros(plate_argument.shape[:1], dtype=jnp.float64) if 0 in plate_argument.shape[:1] else jax.vmap(b_mu_g_g_tau_cell, in_axes=(0,))(plate_argument))
    if _entry in ("log_density", "log_jacobian"):
        plate_argument_2 = unconstrained[1:3]
        def ppl_ljcells_b_mu_g_g_tau_cell(ppl_cell_b_mu_g_g_tau):
            return ppl_cell_b_mu_g_g_tau
        ppl_ljcells_b_mu_g_g_tau = (jnp.zeros(plate_argument_2.shape[:1], dtype=jnp.float64) if 0 in plate_argument_2.shape[:1] else jax.vmap(ppl_ljcells_b_mu_g_g_tau_cell, in_axes=(0,))(plate_argument_2))
    if _entry in ("log_density", "log_prior", "log_likelihood", "constrain"):
        pop_mu_beta_pop = unconstrained[ppl_first_pop_mu_beta_pop - 1:ppl_last_pop_mu_beta_pop]
    if _entry in ("log_density", "log_prior", "log_likelihood"):
        pop_mu = brm_population_effects(
            X=(X_mu if _entry in ("log_density", "log_likelihood") else None),
            beta_pop=(pop_mu_beta_pop if _entry in ("log_density", "log_prior", "log_likelihood") else None),
            outputs=tuple(
                name for name, needed in (
                    ("ppl_prior_beta_pop", ("log_density", "log_prior")),
                    ("ppl_pw_prior_beta_pop", ("log_density", "log_prior")),
                    ("value", ("log_density", "log_likelihood")),
                )
                if _entry in needed
            ),
        )
    if _entry in ("log_density", "log_prior"):
        ppl_prior_sigma_log_scale = np.log(1.0)
        logpdf = jax.lax.cond(constrain_2 < 0, lambda: -jnp.inf, lambda: -ppl_prior_sigma_log_scale - constrain_2 / 1.0)
    if _entry in ("log_density", "log_jacobian"):
        u_argument_2 = unconstrained[0]
        plate_fold = jnp.sum(ppl_ljcells_b_mu_g_g_tau)
    b_mu_g_g = brm_correlated_group_effects_density(
        ppl_last_z=(ppl_last_b_mu_g_g_z if _entry in ("log_density", "log_prior", "log_likelihood", "constrain") else None),
        tau=(b_mu_g_g_tau if _entry in ("log_density", "log_prior") else None),
        unconstrained=unconstrained,
        outputs=tuple(
            name for name, needed in (
                ("ppl_arrflat_z", ("log_density", "log_prior", "log_likelihood", "constrain")),
                ("ppl_lkj_diagonal_L", ("log_density", "log_prior", "log_likelihood", "constrain")),
                ("ppl_lkj_partials_L", ("log_density", "log_prior", "log_likelihood", "log_jacobian", "constrain")),
                ("ppl_lkj_raw_L", ("log_density", "log_prior", "log_likelihood", "log_jacobian", "constrain")),
                ("ppl_prior_L", ("log_density", "log_prior")),
                ("ppl_prior_tau", ("log_density", "log_prior")),
                ("ppl_prior_z", ("log_density", "log_prior")),
                ("ppl_pw_prior_tau", ("log_density", "log_prior")),
                ("ppl_pw_prior_z", ("log_density", "log_prior")),
            )
            if _entry in needed
        ),
    )
    if _entry in ("log_density", "log_likelihood", "constrain"):
        ppl_lkj_lower = _ppl_lkj_lower(b_mu_g_g["ppl_lkj_partials_L"], b_mu_g_g["ppl_lkj_diagonal_L"], 2, 1)
        b_mu_g_g_L = ppl_lkj_lower
    if _entry in ("log_density", "log_jacobian"):
        total = 0.0
        tuple_ = (1, 2)
        i = tuple_[0]
        j = tuple_[1]
        def loop_body(p, carry):
            (i_2, j_2, total_2) = carry
            total_3 = total_2 + (j_2 - i_2 + 1) / 2 * jnp.log(1 - b_mu_g_g["ppl_lkj_partials_L"][p - 1] ** 2)
            tuple__2 = jax.lax.cond(i_2 + 1 < j_2, lambda: (i_2 + 1, j_2), lambda: (1, j_2 + 1))
            i_3 = tuple__2[0]
            j_3 = tuple__2[1]
            return (i_3, j_3, total_3)
        loop_carry = jax.lax.fori_loop(1, 2, loop_body, (jnp.asarray(i, dtype=jnp.int64), jnp.asarray(j, dtype=jnp.int64), jnp.asarray(total, dtype=jnp.float64)))
        ppl_lkj_logjac_b_mu_g_g_L = loop_carry[2]
    if _entry in ("log_density", "log_likelihood", "constrain"):
        b_mu_g_g_z = jnp.reshape(b_mu_g_g["ppl_arrflat_z"], (ppl_axis1_b_mu_g_g_z, 2), order="F")
    if _entry in ("log_density", "log_prior"):
        prior = logpdf + b_mu_g_g["ppl_prior_tau"] + b_mu_g_g["ppl_prior_L"] + b_mu_g_g["ppl_prior_z"] + pop_mu["ppl_prior_beta_pop"]
    if _entry in ("log_density", "log_jacobian"):
        log_jacobian_2 = u_argument_2 + plate_fold + ppl_lkj_logjac_b_mu_g_g_L
    if _entry in ("log_density", "log_likelihood"):
        b_mu_g_g_2 = brm_correlated_group_effects(
            L=(b_mu_g_g_L if _entry in ("log_density", "log_likelihood") else None),
            tau=(b_mu_g_g_tau if _entry in ("log_density", "log_likelihood") else None),
            z=(b_mu_g_g_z if _entry in ("log_density", "log_likelihood") else None),
            outputs=tuple(
                name for name, needed in (
                    ("value", ("log_density", "log_likelihood")),
                )
                if _entry in needed
            ),
        )
        ranef_mu_mu_g_g = b_mu_g_g_2["value"][g_level - 1, 0] + b_mu_g_g_2["value"][g_level - 1, 1] * x
        ppl_offset_mu = pop_mu["value"] + ranef_mu_mu_g_g
        def ppl_pw_y_resp_cell(y_2, mu, sigma):
            def then_arm():
                log_scale = jnp.log(sigma)
                standardized = (y_2 - mu) / jnp.where(jnp.logical_and(sigma == 0, y_2 == mu), 1.0, sigma)
                standard_logpdf = -0.5 * np.log(2 * np.pi) - 0.5 * standardized ** 2
                return standard_logpdf - jnp.where(jnp.logical_and(sigma == 0, y_2 != mu), 0.0, log_scale)
            ppl_density = jax.lax.cond(sigma > 0, then_arm, lambda: -jnp.inf)
            return ppl_density
        ppl_pw_y_resp = (jnp.zeros(y.shape[:1], dtype=jnp.float64) if 0 in y.shape[:1] and ppl_offset_mu.shape[:1] == y.shape[:1] else jax.vmap(ppl_pw_y_resp_cell, in_axes=(0, 0, None))(y, ppl_offset_mu, constrain_2))
        ppl_lik_y_resp = jnp.sum(ppl_pw_y_resp)
    if _entry in ("log_density",):
        posterior = prior + ppl_lik_y_resp + log_jacobian_2
    if not (unconstrained.size == ppl_last_pop_mu_beta_pop):
        raise ValueError("[layout] packed length ≠ layout total: a packed point holds the coordinates of the binding whose layout packed it")
    if _entry == "log_density":
        return jnp.asarray(posterior, dtype=jnp.float64)
    if _entry == "log_prior":
        return jnp.asarray(prior, dtype=jnp.float64)
    if _entry == "log_likelihood":
        return jnp.asarray(ppl_lik_y_resp, dtype=jnp.float64)
    if _entry == "log_jacobian":
        return jnp.asarray(log_jacobian_2, dtype=jnp.float64)
    if _entry == "constrain":
        return {"sigma": jnp.asarray(constrain_2, dtype=jnp.float64), "b_mu__g_g": {"tau": jnp.asarray(b_mu_g_g_tau), "L": jnp.asarray(b_mu_g_g_L), "z": jnp.asarray(b_mu_g_g_z)}, "pop_mu": {"beta_pop": jnp.asarray(pop_mu_beta_pop)}}


def log_density(unconstrained: ArrayLike, **prepared: ArrayLike) -> jax.Array:
    """The log density a sampler targets at `unconstrained`, the packed unconstrained parameters (length `dimension(prepared)`), for the data `prepare_data` returned: `f(u, **prepared)`.

    The sum of `log_prior`, `log_likelihood` and `log_jacobian`.
    """
    return model("log_density", unconstrained, **prepared)


def log_prior(unconstrained: ArrayLike, **prepared: ArrayLike) -> jax.Array:
    """The log prior density of the constrained parameters at `unconstrained`, the packed unconstrained parameters (length `dimension(prepared)`), for the data `prepare_data` returned: `f(u, **prepared)`."""
    return model("log_prior", unconstrained, **prepared)


def log_likelihood(unconstrained: ArrayLike, **prepared: ArrayLike) -> jax.Array:
    """The log likelihood of the observations at `unconstrained`, the packed unconstrained parameters (length `dimension(prepared)`), for the data `prepare_data` returned: `f(u, **prepared)`."""
    return model("log_likelihood", unconstrained, **prepared)


def log_jacobian(unconstrained: ArrayLike, **prepared: ArrayLike) -> jax.Array:
    """The log Jacobian of the constraining transforms at `unconstrained`, the packed unconstrained parameters (length `dimension(prepared)`), for the data `prepare_data` returned: `f(u, **prepared)`."""
    return model("log_jacobian", unconstrained, **prepared)


def constrain(unconstrained: ArrayLike, **prepared: ArrayLike) -> dict:
    """The constrained value of each parameter, and of each requested value, at `unconstrained`, the packed unconstrained parameters (length `dimension(prepared)`), for the data `prepare_data` returned: `f(u, **prepared)`. Returns a dict, a submodel's values nested under its name:

    - `sigma`: Residual scale of the response.
    - `b_mu__g_g.tau`
    - `b_mu__g_g.L`
    - `b_mu__g_g.z`
    - `pop_mu.beta_pop`
    """
    return model("constrain", unconstrained, **prepared)


def dimension(prepared: dict) -> int:
    """The length of `unconstrained` for the data `prepared` (what `prepare_data` returned)."""
    return int(prepared["ppl_last_pop_mu_beta_pop"])


def parameters(prepared: dict) -> dict:
    """Each parameter's 0-based `start`/`stop` in `unconstrained`, its transform and dimensions,
    for the data `prepared` (what `prepare_data` returned)."""
    return {"sigma": {"start": 0, "stop": 1, "transform": "exp", "dims": ()}, "b_mu__g_g.tau": {"start": 1, "stop": 3, "transform": "exp", "dims": (2,)}, "b_mu__g_g.L": {"start": 3, "stop": 4, "transform": "lkj", "dims": (2, 2)}, "b_mu__g_g.z": {"start": 4, "stop": int(prepared["ppl_last_b_mu_g_g_z"]), "transform": "identity", "dims": (int(prepared["ppl_axis1_b_mu_g_g_z"]), 2)}, "pop_mu.beta_pop": {"start": int(prepared["ppl_first_pop_mu_beta_pop"]) - 1, "stop": int(prepared["ppl_last_pop_mu_beta_pop"]), "transform": "identity", "dims": (2,)}}

The dataset has 320 observations in 24 groups. The fitted model has 54 unconstrained coordinates.

Module export ​

julia
using BayesianRegressionModels, ReactiveKernels, ReactiveKernelsPPL

model = varying_slopes_model()
rk = RKBRMI(model)
source = jax_source(rk.model, rk_bound_plan(rk); values=(:mu,))
inputs = rk_bound_data(rk, source)

The export contains 27673 bytes of Python source.

The resulting model.py contains these entry points:

Entry pointResult
prepare_data(**inputs)Data-only calculations in NumPy, performed once per dataset
log_density(u, **prepared)Log density in unconstrained coordinates, including the transform Jacobian
log_prior(u, **prepared)Prior contribution
log_likelihood(u, **prepared)Observation contribution
log_jacobian(u, **prepared)Coordinate-transform contribution
constrain(u, **prepared)Parameters on their declared supports, nested by model scope
dimension(prepared)Number of unconstrained coordinates for this dataset
parameters(prepared)Parameter names, shapes, transforms and zero-based coordinate ranges

values=(:mu,) also includes the expected response in constrain's output. Request authored names such as mu, rather than generated implementation variables. Parameter sizes that depend on the data are resolved by dimension(prepared) and parameters(prepared); DIMENSION and PARAMETERS constants are available only for a fixed-size layout.

Retained plate values ​

To export a vector calculated in each plate cell, retain it with an indexed assignment and select its authored name. For example, author mean_cell[i] = mu[i] .* exp.(-t[i] ./ onset) in the cell, then use y[i] ~ Normal(mean_cell[i], sigma) for its response. Here t[i] holds that patient's visit times. The likelihood and exported value use the same mean:

julia
source = jax_source(rk.model, rk_bound_plan(rk); values=(:mean_cell,))
inputs = rk_bound_data(rk, source)

With ReactiveKernels 0.1.231 or later, constrain(u, **prepared)["mean_cell"] returns the visit vectors concatenated in patient order, preserving the visit order within each patient. Its length is sum(length, data.t); the known visit counts delimit the patients. The mean is evaluated from the model's expression at each draw. A bare mean_cell = ... inside the plate is scratch and cannot be selected through values.

Data preparation ​

rk_bound_data(rk, source) returns exactly the columns listed by model.DATA, by name, including scalar constants and untranslated data-only definitions. The one-argument rk_bound_data(rk) is the native graph binding: it can contain extra intermediates and use internal names for scalar inputs.

The Python environment is separate from the documentation build. The reproduction script executes this workflow; the tables below read its cached results.

python
import jax
jax.config.update("jax_enable_x64", True)
import jax.numpy as jnp
import model as m

# inputs: the Julia binding transferred to Python arrays and label lists
prepared = m.prepare_data(**inputs)
u = jnp.zeros(m.dimension(prepared), dtype=jnp.float64)
log_density = jax.jit(m.log_density)
value = log_density(u, **prepared)
gradient = jax.grad(lambda u: m.log_density(u, **prepared))(u)
expected_response = m.constrain(u, **prepared)["mu"]

Enable 64-bit values before creating the JAX arrays to match Julia's Float64 calculation. PREPARED describes the data accepted by the density functions. JIT compilation can reuse an executable when the new prepared inputs have the same shapes and static shape-setting values; changing the number of groups changes the parameter dimension.

UNTRANSLATED identifies data-only definitions that still need values from Julia. Exporting those values allows Python inference to run independently; preparing arbitrary new raw data entirely in Python requires an empty UNTRANSLATED mapping.

Module metadataThis example
DATAg, g_fit, g_fit_levels, g_level, x, y
PREPAREDppl_last_b_mu_g_g_z, ppl_axis1_b_mu_g_g_z, ppl_first_pop_mu_beta_pop, ppl_last_pop_mu_beta_pop, g_level, x, X_mu, y
UNTRANSLATEDg_fit_levels, g_level

The reproduction script writes a JSON representation of these columns with their types, shapes and column-major values. Its decode function restores the Python inputs before calling prepare_data.

Density and gradient agreement ​

The comparison evaluates the same unconstrained points from the native posterior with Julia and JAX. JAX runs eagerly and under jax.jit; its gradient comes from jax.grad, while the native gradient uses Enzyme.

QuantityLargest absolute difference
Log density2.3e-13
Gradient component4.5e-13

These checks compare the implemented target at fixed points. Independently sampled posterior draws need not be equal, so their comparison also reports sampling uncertainty and convergence diagnostics.

Posterior sampling ​

NumPyro's NUTS sampler accepts the negative log density as its potential_fn. This uses the exported density directly, including its coordinate Jacobian.

Sampling runs only in the reproduction environment and is cached, so this block is not rerun during the documentation build.

python
import numpy as np
from numpyro.infer import MCMC, NUTS

potential = lambda u: -m.log_density(u, **prepared)
sampler = MCMC(NUTS(potential_fn=potential, target_accept_prob=0.8),
               num_warmup=1000, num_samples=1000, num_chains=4,
               chain_method="sequential", progress_bar=False)
initial = jnp.asarray(0.1 * np.random.default_rng(7).standard_normal(
    (4, m.dimension(prepared))))
sampler.run(jax.random.PRNGKey(7), init_params=initial)
draws = sampler.get_samples(group_by_chain=True)

The native fit uses rk_logdensity_problem and WarmupHMC's completion_warmup_mcmc, requesting four chains with a completion quorum of three. It runs with one Julia thread because concurrent RK/Enzyme gradients are currently unsupported. NumPyro starts independently near zero in unconstrained space. The two samplers have different warmup procedures; the timings depend on those procedures and the host load. Stopping after a quorum selects chains by completion time, which can bias a posterior if runtime depends on the sampled region. The diagnostics below do not rule out that selection effect.

brm-figure
{"spec":"{\"$schema\":\"https://vega.github.io/schema/vega-lite/v5.json\",\"_aov\":{\"legendInteraction\":\"highlight\"},\"_aovSummary\":{\"bands\":[[\"q025\",\"q975\",\"q025/q975\"],[\"q25\",\"q75\",\"q25/q75\"]],\"point_col\":\"q50\",\"value_label\":\"q50\"},\"config\":{\"axis\":{\"labelLimit\":0},\"header\":{\"labelLimit\":0},\"legend\":{\"labelLimit\":0}},\"data\":{\"values\":[{\"description\":\"residual standard deviation\",\"ess_bulk\":3711.362395878692,\"ess_tail\":2250.663799741413,\"label\":\"Residual SD\",\"mcse\":0.00033160248284825374,\"mean\":0.4799511636570437,\"median\":0.47914139512033094,\"method\":\"native\",\"q025\":0.44240377656201785,\"q05\":0.4483137260979811,\"q25\":0.4659888698837116,\"q50\":0.47914139512033094,\"q75\":0.4929028135223653,\"q95\":0.5147693355325844,\"q975\":0.5219435194509645,\"quantity\":\"sigma\",\"rhat\":1.001065494405555,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.020234910849390397,\"unit\":\"response\",\"z\":0.11276478196876691},{\"description\":\"residual standard deviation\",\"ess_bulk\":3463.428568352853,\"ess_tail\":2374.3714331009983,\"label\":\"Residual SD\",\"mcse\":0.00034325299317920554,\"mean\":0.4798973448618883,\"median\":0.4790168542651359,\"method\":\"jax\",\"q025\":0.44335838661477417,\"q05\":0.44863691634975666,\"q25\":0.4660798489825393,\"q50\":0.4790168542651359,\"q75\":0.49298858709526117,\"q95\":0.5144571541696502,\"q975\":0.5214190988855802,\"quantity\":\"sigma\",\"rhat\":0.9999722641474926,\"sampler\":\"NumPyro · JAX\",\"sd\":0.02011404134899526,\"unit\":\"response\",\"z\":0.11276478196876691},{\"description\":\"population intercept\",\"ess_bulk\":226.48732721350618,\"ess_tail\":455.67745623485285,\"label\":\"Population intercept\",\"mcse\":0.011759738211088147,\"mean\":1.4341621913084763,\"median\":1.4315775724469666,\"method\":\"native\",\"q025\":1.0992084081056093,\"q05\":1.1436968664056226,\"q25\":1.3125628721370193,\"q50\":1.4315775724469666,\"q75\":1.542605576899422,\"q95\":1.7402275456766039,\"q975\":1.815589132986234,\"quantity\":\"pop_mu.beta_pop[1]\",\"rhat\":1.019430717641513,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.18159368084700114,\"unit\":\"response\",\"z\":0.1848949448241395},{\"description\":\"population intercept\",\"ess_bulk\":505.5122541277629,\"ess_tail\":950.2916853872437,\"label\":\"Population intercept\",\"mcse\":0.007725955527352785,\"mean\":1.4315606081874288,\"median\":1.4279736147258975,\"method\":\"jax\",\"q025\":1.0888839785737687,\"q05\":1.1451290458700436,\"q25\":1.3200075141553282,\"q50\":1.4279736147258975,\"q75\":1.5435228920320916,\"q95\":1.7248755308175463,\"q975\":1.780922287811671,\"quantity\":\"pop_mu.beta_pop[1]\",\"rhat\":1.013516077547225,\"sampler\":\"NumPyro · JAX\",\"sd\":0.1738803480224786,\"unit\":\"response\",\"z\":0.1848949448241395},{\"description\":\"population slope\",\"ess_bulk\":466.1467103767902,\"ess_tail\":730.3684020568664,\"label\":\"Population slope\",\"mcse\":0.004596468313353731,\"mean\":-0.817032671612588,\"median\":-0.8207518568419168,\"method\":\"native\",\"q025\":-0.9976761175701994,\"q05\":-0.9710815624864173,\"q25\":-0.883377482555889,\"q50\":-0.8207518568419168,\"q75\":-0.7553266619055646,\"q95\":-0.6479562555245946,\"q975\":-0.6053336758253339,\"quantity\":\"pop_mu.beta_pop[2]\",\"rhat\":1.007790436950179,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.09880901678554113,\"unit\":\"response/predictor unit\",\"z\":1.000094138463633},{\"description\":\"population slope\",\"ess_bulk\":975.029387169921,\"ess_tail\":1259.4363098788997,\"label\":\"Population slope\",\"mcse\":0.002971859393356822,\"mean\":-0.8225067112682587,\"median\":-0.8218159235378024,\"method\":\"jax\",\"q025\":-1.0070115388190108,\"q05\":-0.9729031119151239,\"q25\":-0.8835232236360232,\"q50\":-0.8218159235378024,\"q75\":-0.7632427188667271,\"q95\":-0.6677461706562668,\"q975\":-0.6381606759783638,\"quantity\":\"pop_mu.beta_pop[2]\",\"rhat\":1.0059068789617267,\"sampler\":\"NumPyro · JAX\",\"sd\":0.0927097435969292,\"unit\":\"response/predictor unit\",\"z\":1.000094138463633},{\"description\":\"group intercept standard deviation\",\"ess_bulk\":361.8562400261585,\"ess_tail\":759.4513032235474,\"label\":\"Group intercept SD\",\"mcse\":0.006939699878290071,\"mean\":0.8574479963533704,\"median\":0.8452224419683094,\"method\":\"native\",\"q025\":0.6427938491393677,\"q05\":0.6659115955037177,\"q25\":0.7631608071628349,\"q50\":0.8452224419683094,\"q75\":0.9384996586115101,\"q95\":1.0887421493795357,\"q975\":1.1534961760621025,\"quantity\":\"b_mu__g_g.tau[1]\",\"rhat\":1.0034771783443301,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.1325916638933449,\"unit\":\"response\",\"z\":0.02063966560434768},{\"description\":\"group intercept standard deviation\",\"ess_bulk\":674.6000261392998,\"ess_tail\":1303.4159911735414,\"label\":\"Group intercept SD\",\"mcse\":0.005011505760529059,\"mean\":0.857271319580811,\"median\":0.8419067272022027,\"method\":\"jax\",\"q025\":0.6491225578268676,\"q05\":0.6731416563346053,\"q25\":0.7619311543321137,\"q50\":0.8419067272022027,\"q75\":0.9386006551657545,\"q95\":1.094192275004033,\"q975\":1.154726996349408,\"quantity\":\"b_mu__g_g.tau[1]\",\"rhat\":1.0087605039631458,\"sampler\":\"NumPyro · JAX\",\"sd\":0.13088745328809467,\"unit\":\"response\",\"z\":0.02063966560434768},{\"description\":\"group slope standard deviation\",\"ess_bulk\":671.8412824357747,\"ess_tail\":1425.754772387337,\"label\":\"Group slope SD\",\"mcse\":0.002855960343293285,\"mean\":0.4264644516235841,\"median\":0.4179078382971324,\"method\":\"native\",\"q025\":0.303291170455252,\"q05\":0.319617267507238,\"q25\":0.37417801729100475,\"q50\":0.4179078382971324,\"q75\":0.4718146191415739,\"q95\":0.5629133528948091,\"q975\":0.5943569163875169,\"quantity\":\"b_mu__g_g.tau[2]\",\"rhat\":1.0021626455763066,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.07340257132454078,\"unit\":\"response/predictor unit\",\"z\":1.0933032904037672},{\"description\":\"group slope standard deviation\",\"ess_bulk\":1142.0509038945386,\"ess_tail\":1501.5731631042152,\"label\":\"Group slope SD\",\"mcse\":0.0022690476319335157,\"mean\":0.4304523998238933,\"median\":0.42063504546594077,\"method\":\"jax\",\"q025\":0.3072719139060384,\"q05\":0.3234432264150819,\"q25\":0.3785391993536595,\"q50\":0.42063504546594077,\"q75\":0.47411612278937076,\"q95\":0.5683559997207716,\"q975\":0.6025343478382604,\"quantity\":\"b_mu__g_g.tau[2]\",\"rhat\":1.0010147616890408,\"sampler\":\"NumPyro · JAX\",\"sd\":0.07502445295668123,\"unit\":\"response/predictor unit\",\"z\":1.0933032904037672},{\"description\":\"intercept-slope correlation\",\"ess_bulk\":739.9220772204467,\"ess_tail\":1227.9247630105378,\"label\":\"Intercept–slope correlation\",\"mcse\":0.006260608077817482,\"mean\":0.5122464812851765,\"median\":0.5352994824250343,\"method\":\"native\",\"q025\":0.1108815140686392,\"q05\":0.20676573758475564,\"q25\":0.40608867824952527,\"q50\":0.5352994824250343,\"q75\":0.6369902590290132,\"q95\":0.7503311315829699,\"q975\":0.7793906009171008,\"quantity\":\"b_mu__g_g.L[2]\",\"rhat\":1.0055798767527226,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.17002972562430038,\"unit\":1.0,\"z\":0.7823550799435164},{\"description\":\"intercept-slope correlation\",\"ess_bulk\":1129.2283760367352,\"ess_tail\":1715.8462705716256,\"label\":\"Intercept–slope correlation\",\"mcse\":0.004949447427426869,\"mean\":0.5184902553536485,\"median\":0.5365520039485681,\"method\":\"jax\",\"q025\":0.14968810501890195,\"q05\":0.2095035687632864,\"q25\":0.4235118021519817,\"q50\":0.5365520039485681,\"q75\":0.6357610286537285,\"q95\":0.7542594482290846,\"q975\":0.7891489388361049,\"quantity\":\"b_mu__g_g.L[2]\",\"rhat\":1.002831363165876,\"sampler\":\"NumPyro · JAX\",\"sd\":0.1643431855967948,\"unit\":1.0,\"z\":0.7823550799435164}]},\"facet\":{\"row\":{\"field\":\"label\",\"sort\":[\"Residual SD\",\"Population intercept\",\"Population slope\",\"Group intercept SD\",\"Group slope SD\",\"Intercept–slope correlation\"],\"title\":\"\",\"type\":\"nominal\"}},\"resolve\":{\"scale\":{\"x\":\"independent\"}},\"spec\":{\"height\":55,\"layer\":[{\"_aovLegend\":{\"dimmed\":true,\"filtered\":false,\"opacity\":null,\"params\":[\"legend_selection\"],\"transform\":[]},\"encoding\":{\"color\":{\"field\":\"sampler\",\"scale\":{\"domain\":[\"WarmupHMC · Julia\",\"NumPyro · JAX\"],\"range\":[\"#2a78d6\",\"#eb6834\"]},\"title\":\"Sampler\",\"type\":\"nominal\"},\"opacity\":{\"condition\":{\"test\":{\"and\":[{\"or\":[\"!isValid(datum[\\\"sampler\\\"])\",{\"empty\":true,\"param\":\"legend_selection\"}]}]},\"value\":1},\"value\":0.15},\"tooltip\":[{\"field\":\"q50\",\"title\":\"Parameter value (estimate)\",\"type\":\"quantitative\"},{\"field\":\"sampler\",\"type\":\"nominal\"},{\"field\":\"q025\",\"title\":\"q025\",\"type\":\"quantitative\"},{\"field\":\"q975\",\"title\":\"q975\",\"type\":\"quantitative\"}],\"x\":{\"field\":\"q025\",\"scale\":{\"zero\":false},\"title\":\"Parameter value\",\"type\":\"quantitative\"},\"x2\":{\"field\":\"q975\"},\"y\":{\"axis\":{\"title\":null},\"field\":\"sampler\",\"title\":\"\",\"type\":\"nominal\"}},\"mark\":{\"strokeWidth\":1.5,\"type\":\"rule\"},\"params\":[{\"bind\":\"scales\",\"name\":\"grid\",\"select\":{\"encodings\":[\"x\"],\"type\":\"interval\"}},{\"bind\":\"legend\",\"name\":\"legend_selection\",\"select\":{\"fields\":[\"sampler\"],\"type\":\"point\"}}]},{\"_aovLegend\":{\"dimmed\":true,\"filtered\":false,\"opacity\":null,\"params\":[],\"transform\":[]},\"encoding\":{\"color\":{\"field\":\"sampler\",\"scale\":{\"domain\":[\"WarmupHMC · Julia\",\"NumPyro · JAX\"],\"range\":[\"#2a78d6\",\"#eb6834\"]},\"title\":\"Sampler\",\"type\":\"nominal\"},\"opacity\":{\"condition\":{\"test\":{\"and\":[{\"or\":[\"!isValid(datum[\\\"sampler\\\"])\",{\"empty\":true,\"param\":\"legend_selection\"}]}]},\"value\":1},\"value\":0.15},\"tooltip\":[{\"field\":\"q50\",\"title\":\"Parameter value (estimate)\",\"type\":\"quantitative\"},{\"field\":\"sampler\",\"type\":\"nominal\"},{\"field\":\"q025\",\"title\":\"q025\",\"type\":\"quantitative\"},{\"field\":\"q975\",\"title\":\"q975\",\"type\":\"quantitative\"}],\"x\":{\"field\":\"q25\",\"scale\":{\"zero\":false},\"title\":\"Parameter value\",\"type\":\"quantitative\"},\"x2\":{\"field\":\"q75\"},\"y\":{\"axis\":{\"title\":null},\"field\":\"sampler\",\"title\":\"\",\"type\":\"nominal\"}},\"mark\":{\"strokeWidth\":8.0,\"type\":\"rule\"}},{\"_aovLegend\":{\"dimmed\":true,\"filtered\":false,\"opacity\":null,\"params\":[],\"transform\":[]},\"encoding\":{\"opacity\":{\"condition\":{\"test\":{\"and\":[{\"or\":[\"!isValid(datum[\\\"sampler\\\"])\",{\"empty\":true,\"param\":\"legend_selection\"}]}]},\"value\":1},\"value\":0.15},\"tooltip\":[{\"field\":\"q50\",\"title\":\"Parameter value (estimate)\",\"type\":\"quantitative\"},{\"field\":\"sampler\",\"type\":\"nominal\"},{\"field\":\"q025\",\"title\":\"q025\",\"type\":\"quantitative\"},{\"field\":\"q975\",\"title\":\"q975\",\"type\":\"quantitative\"}],\"x\":{\"field\":\"q50\",\"scale\":{\"zero\":false},\"type\":\"quantitative\"},\"y\":{\"field\":\"sampler\",\"type\":\"nominal\"}},\"mark\":{\"color\":\"white\",\"filled\":true,\"size\":80,\"stroke\":\"#333\",\"strokeWidth\":1.5,\"type\":\"point\"}}],\"width\":470},\"description\":\"Population parameters from Julia and JAX: posterior medians, central 50% intervals (thick) and 95% intervals (thin). Each panel has its own horizontal scale.\"}","caption":"Population parameters from Julia and JAX: posterior medians, central 50% intervals (thick) and 95% intervals (thin). Each panel has its own horizontal scale.","alt":"Population parameters from Julia and JAX: posterior medians, central 50% intervals (thick) and 95% intervals (thin). Each panel has its own horizontal scale."}
QuantityWarmupHMC: median [95% interval]NumPyro: median [95% interval]Mean difference / combined MCSE
Residual SD0.48 [0.44, 0.52]0.48 [0.44, 0.52]0.11
Population intercept1.43 [1.10, 1.82]1.43 [1.09, 1.78]0.18
Population slope-0.82 [-1.00, -0.61]-0.82 [-1.01, -0.64]1.00
Group intercept SD0.85 [0.64, 1.15]0.84 [0.65, 1.15]0.02
Group slope SD0.42 [0.30, 0.59]0.42 [0.31, 0.60]1.09
Intercept–slope correlation0.54 [0.11, 0.78]0.54 [0.15, 0.79]0.78

The correlation panel shows the intercept–slope correlation, and the group scales are standard deviations. The last column divides the absolute difference between posterior means by the square root of the sum of their squared Monte Carlo standard errors. The diagnostics below summarize all nonconstant constrained scalar parameters, including each group's standardized effects.

SamplerCompleted chainsMax. R̂Min. bulk ESSMin. tail ESSDivergences
WarmupHMC31.0192264560
NumPyro41.0145069500
brm-figure
{"spec":"{\"$schema\":\"https://vega.github.io/schema/vega-lite/v5.json\",\"_aov\":{\"legendInteraction\":\"highlight\"},\"_aovSummary\":{\"bands\":[[\"q025\",\"q975\",\"q025/q975\"],[\"q25\",\"q75\",\"q25/q75\"]],\"point_col\":\"q50\",\"value_label\":\"q50\"},\"config\":{\"axis\":{\"labelLimit\":0},\"header\":{\"labelLimit\":0},\"legend\":{\"labelLimit\":0}},\"data\":{\"values\":[{\"ess_bulk\":548.571129978854,\"ess_tail\":1106.568758148733,\"group\":\"g01\",\"label\":\"Intercept\",\"mcse\":0.011269068510927965,\"mean\":0.08088230626360517,\"method\":\"native\",\"q025\":-0.44155583045405605,\"q05\":-0.35840902165614347,\"q25\":-0.09543010130900502,\"q50\":0.08698460741193005,\"q75\":0.2604408018876182,\"q95\":0.5148010110012765,\"q975\":0.5872442494891985,\"quantity\":\"intercept\",\"rhat\":1.0073550286345812,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.26512993154814735},{\"ess_bulk\":2548.532030270085,\"ess_tail\":2041.3659653139323,\"group\":\"g01\",\"label\":\"Slope\",\"mcse\":0.005055067657130992,\"mean\":-0.04676004554516016,\"method\":\"native\",\"q025\":-0.5457132109401596,\"q05\":-0.45820373287068483,\"q25\":-0.2153740675146636,\"q50\":-0.043630886084940916,\"q75\":0.12047946643422144,\"q95\":0.3727006206044369,\"q975\":0.4517471451505246,\"quantity\":\"slope\",\"rhat\":1.0022248027953589,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.25444849562833827},{\"ess_bulk\":570.0673411588446,\"ess_tail\":923.0897537347577,\"group\":\"g02\",\"label\":\"Intercept\",\"mcse\":0.010875729277324941,\"mean\":0.4474059757617613,\"method\":\"native\",\"q025\":-0.0858915626999936,\"q05\":-0.003679227687343974,\"q25\":0.28641509336446136,\"q50\":0.4603964797486608,\"q75\":0.6228851696226902,\"q95\":0.8625797772327032,\"q975\":0.9399191713742975,\"quantity\":\"intercept\",\"rhat\":1.0085012119902845,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.25992567167102476},{\"ess_bulk\":2519.08532339536,\"ess_tail\":1931.9122855316866,\"group\":\"g02\",\"label\":\"Slope\",\"mcse\":0.00506927152890881,\"mean\":-0.10680332901788836,\"method\":\"native\",\"q025\":-0.6162484720981937,\"q05\":-0.5214617910193247,\"q25\":-0.2749992402681609,\"q50\":-0.10393292296510342,\"q75\":0.06434540598019937,\"q95\":0.3086109735471624,\"q975\":0.39653161530001324,\"quantity\":\"slope\",\"rhat\":1.0011049314161662,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.2544923593871141},{\"ess_bulk\":412.6266784498841,\"ess_tail\":944.9742001947358,\"group\":\"g03\",\"label\":\"Intercept\",\"mcse\":0.01144447921930641,\"mean\":-0.021985536663756324,\"method\":\"native\",\"q025\":-0.47752464656612925,\"q05\":-0.4133775851601245,\"q25\":-0.17063072490888143,\"q50\":-0.017037169720225925,\"q75\":0.13409724798786055,\"q95\":0.3617651297154403,\"q975\":0.42561646452604274,\"quantity\":\"intercept\",\"rhat\":1.0101242749400123,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.2322678747511177},{\"ess_bulk\":1358.2707939419543,\"ess_tail\":1670.9606662572032,\"group\":\"g03\",\"label\":\"Slope\",\"mcse\":0.0046439306264356005,\"mean\":-0.2385054162561399,\"method\":\"native\",\"q025\":-0.5717731156542575,\"q05\":-0.5201794425101616,\"q25\":-0.35390836409453563,\"q50\":-0.24131670702392252,\"q75\":-0.12241342551093118,\"q95\":0.05713189959344418,\"q975\":0.10505115276407075,\"quantity\":\"slope\",\"rhat\":1.0016270821167534,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.1715636504359251},{\"ess_bulk\":338.3864905914541,\"ess_tail\":615.5139593586392,\"group\":\"g04\",\"label\":\"Intercept\",\"mcse\":0.011341423503692936,\"mean\":-0.9011574646822377,\"method\":\"native\",\"q025\":-1.3351816505415253,\"q05\":-1.2499661917041425,\"q25\":-1.0363288893648976,\"q50\":-0.8929239749835827,\"q75\":-0.762589179533561,\"q95\":-0.5590818647465041,\"q975\":-0.5096322809038119,\"quantity\":\"intercept\",\"rhat\":1.0132600583608602,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.21189639250093392},{\"ess_bulk\":996.1801592043278,\"ess_tail\":1804.7225879249488,\"group\":\"g04\",\"label\":\"Slope\",\"mcse\":0.004651200016184533,\"mean\":-0.6370383502085836,\"method\":\"native\",\"q025\":-0.9370531357826538,\"q05\":-0.882573727109976,\"q25\":-0.7285962648336093,\"q50\":-0.6360400372467655,\"q75\":-0.5417269511528838,\"q95\":-0.40022352703949765,\"q975\":-0.35229385570044053,\"quantity\":\"slope\",\"rhat\":1.002492367722595,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.14650682738504803},{\"ess_bulk\":414.5533466252408,\"ess_tail\":795.132751625512,\"group\":\"g05\",\"label\":\"Intercept\",\"mcse\":0.011590830943260407,\"mean\":-0.8301593078003371,\"method\":\"native\",\"q025\":-1.3096117431772032,\"q05\":-1.2233421107194131,\"q25\":-0.9898312621504448,\"q50\":-0.8229248450662876,\"q75\":-0.6689286558371329,\"q95\":-0.4588506831947883,\"q975\":-0.38352236263352973,\"quantity\":\"intercept\",\"rhat\":1.0107112856984406,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.23658039513388807},{\"ess_bulk\":1064.6468794476878,\"ess_tail\":2136.5004648990825,\"group\":\"g05\",\"label\":\"Slope\",\"mcse\":0.0047650475056384015,\"mean\":0.06070122089659833,\"method\":\"native\",\"q025\":-0.2500126324578072,\"q05\":-0.193844157050057,\"q25\":-0.04259039891740762,\"q50\":0.057659540742625845,\"q75\":0.16428847209265732,\"q95\":0.3129397777885904,\"q975\":0.3575420698051905,\"quantity\":\"slope\",\"rhat\":1.0023526777951615,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.15522022672755603},{\"ess_bulk\":327.536106438027,\"ess_tail\":641.8240292801354,\"group\":\"g06\",\"label\":\"Intercept\",\"mcse\":0.01187114450455633,\"mean\":0.37404670020379704,\"method\":\"native\",\"q025\":-0.060880125361973486,\"q05\":0.012325038530722922,\"q25\":0.2336617021429224,\"q50\":0.3796175982598368,\"q75\":0.5155779377260437,\"q95\":0.7188118057975014,\"q975\":0.7895417596226972,\"quantity\":\"intercept\",\"rhat\":1.0110240610054584,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.21452633650581127},{\"ess_bulk\":838.046748327101,\"ess_tail\":1233.9208201077024,\"group\":\"g06\",\"label\":\"Slope\",\"mcse\":0.0049712097417969735,\"mean\":-0.17056240154479077,\"method\":\"native\",\"q025\":-0.4527524446823029,\"q05\":-0.4049814117833259,\"q25\":-0.2645316400330373,\"q50\":-0.16773097965595007,\"q75\":-0.07316722101682295,\"q95\":0.05895569112425207,\"q975\":0.09879166020551225,\"quantity\":\"slope\",\"rhat\":1.0034162111716731,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.14326028123067422},{\"ess_bulk\":403.2771485540471,\"ess_tail\":701.2400780483458,\"group\":\"g07\",\"label\":\"Intercept\",\"mcse\":0.011333549840108625,\"mean\":-0.8101224308353331,\"method\":\"native\",\"q025\":-1.2959186265922358,\"q05\":-1.1935260789360873,\"q25\":-0.9534903166141306,\"q50\":-0.8050048454765297,\"q75\":-0.6554132674861158,\"q95\":-0.4494106518974989,\"q975\":-0.3883116645062498,\"quantity\":\"intercept\",\"rhat\":1.008919279914125,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.22868811064726532},{\"ess_bulk\":1117.984768689367,\"ess_tail\":1586.379539876745,\"group\":\"g07\",\"label\":\"Slope\",\"mcse\":0.004851108518325279,\"mean\":-0.2337733822280842,\"method\":\"native\",\"q025\":-0.5619072460367677,\"q05\":-0.5000434721299853,\"q25\":-0.33290348479934145,\"q50\":-0.23453527416730124,\"q75\":-0.12838468769669292,\"q95\":0.028964298152156787,\"q975\":0.07973208099030016,\"quantity\":\"slope\",\"rhat\":1.0038614077242878,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.16109688028845634},{\"ess_bulk\":292.6021714878586,\"ess_tail\":661.2826406278592,\"group\":\"g08\",\"label\":\"Intercept\",\"mcse\":0.01230729664065171,\"mean\":-1.5274711229123696,\"method\":\"native\",\"q025\":-1.9760628301828167,\"q05\":-1.8868101004291922,\"q25\":-1.662986204791656,\"q50\":-1.5242431394766913,\"q75\":-1.3825945393927779,\"q95\":-1.1880305445813448,\"q975\":-1.1371426367422648,\"quantity\":\"intercept\",\"rhat\":1.014933457365732,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.21296773303900776},{\"ess_bulk\":870.4013424715082,\"ess_tail\":1222.0002706954294,\"group\":\"g08\",\"label\":\"Slope\",\"mcse\":0.004924108662809446,\"mean\":-0.3239885104270551,\"method\":\"native\",\"q025\":-0.6206043783045511,\"q05\":-0.57284427506353,\"q25\":-0.417876646503503,\"q50\":-0.32049460397241913,\"q75\":-0.2265523363559921,\"q95\":-0.08957407390970991,\"q975\":-0.0467372504749199,\"quantity\":\"slope\",\"rhat\":1.003347404706746,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.14522149723520983},{\"ess_bulk\":367.21669017297256,\"ess_tail\":697.5479451864243,\"group\":\"g09\",\"label\":\"Intercept\",\"mcse\":0.011332197434151934,\"mean\":0.35788619359638746,\"method\":\"native\",\"q025\":-0.09692062590927417,\"q05\":-0.007473408680264657,\"q25\":0.2232578879591377,\"q50\":0.3625342922136717,\"q75\":0.5083083317468138,\"q95\":0.7081666337807788,\"q975\":0.7728611727469836,\"quantity\":\"intercept\",\"rhat\":1.0131119739910834,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.21928324224529566},{\"ess_bulk\":1222.2519108290076,\"ess_tail\":1867.0567541970972,\"group\":\"g09\",\"label\":\"Slope\",\"mcse\":0.004495735756036664,\"mean\":0.03551360267129992,\"method\":\"native\",\"q025\":-0.2831954237065301,\"q05\":-0.22618923969160726,\"q25\":-0.06258572042635374,\"q50\":0.036057310592239815,\"q75\":0.13455147475288884,\"q95\":0.29231237838709057,\"q975\":0.33928450039330704,\"quantity\":\"slope\",\"rhat\":1.0029606252772942,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.15644430409128338},{\"ess_bulk\":394.4550615738846,\"ess_tail\":700.8915574868963,\"group\":\"g10\",\"label\":\"Intercept\",\"mcse\":0.01163259093972318,\"mean\":-0.9141972804520654,\"method\":\"native\",\"q025\":-1.3887142829582413,\"q05\":-1.2963549965620262,\"q25\":-1.0549368092454163,\"q50\":-0.9128311777269451,\"q75\":-0.7597039971461897,\"q95\":-0.5508179686057091,\"q975\":-0.4732640976543934,\"quantity\":\"intercept\",\"rhat\":1.0096836552026685,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.23189970830193798},{\"ess_bulk\":1447.9914231044988,\"ess_tail\":1739.9709701547724,\"group\":\"g10\",\"label\":\"Slope\",\"mcse\":0.004524336492144239,\"mean\":-0.44049221555870266,\"method\":\"native\",\"q025\":-0.7858749015593793,\"q05\":-0.7272274067575699,\"q25\":-0.5544351765094524,\"q50\":-0.43579412529683653,\"q75\":-0.32638987965959476,\"q95\":-0.16188727447280288,\"q975\":-0.11082578255778341,\"quantity\":\"slope\",\"rhat\":1.0008023256091743,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.1717633569957226},{\"ess_bulk\":390.4014007893907,\"ess_tail\":760.8336269653877,\"group\":\"g11\",\"label\":\"Intercept\",\"mcse\":0.011400621177715453,\"mean\":0.8102703717577263,\"method\":\"native\",\"q025\":0.35521012325047935,\"q05\":0.43329223864663996,\"q25\":0.663796091369738,\"q50\":0.8149391080125147,\"q75\":0.9635211352241113,\"q95\":1.1737059632183942,\"q975\":1.2301765718901814,\"quantity\":\"intercept\",\"rhat\":1.0118921464957782,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.22560189955481555},{\"ess_bulk\":1764.685541217092,\"ess_tail\":2039.3938638933766,\"group\":\"g11\",\"label\":\"Slope\",\"mcse\":0.004106521423452065,\"mean\":0.1825066050822286,\"method\":\"native\",\"q025\":-0.15561713504348948,\"q05\":-0.09473930724420004,\"q25\":0.06805701020796104,\"q50\":0.1811262348930752,\"q75\":0.29509410276270914,\"q95\":0.4617240446292407,\"q975\":0.5150234471798055,\"quantity\":\"slope\",\"rhat\":1.0026980128159795,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.17250886253542297},{\"ess_bulk\":411.22097134632435,\"ess_tail\":718.4138246900026,\"group\":\"g12\",\"label\":\"Intercept\",\"mcse\":0.010926412301674144,\"mean\":0.44627015941305037,\"method\":\"native\",\"q025\":-0.005908389638819751,\"q05\":0.078402244747314,\"q25\":0.3046805914501311,\"q50\":0.4518534544023831,\"q75\":0.5960295650236479,\"q95\":0.7918529576544567,\"q975\":0.8568894365687153,\"quantity\":\"intercept\",\"rhat\":1.0097653523724728,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.22100858810744384},{\"ess_bulk\":882.4925148976026,\"ess_tail\":1620.9364166987784,\"group\":\"g12\",\"label\":\"Slope\",\"mcse\":0.005338994552671579,\"mean\":-0.22872860327134759,\"method\":\"native\",\"q025\":-0.5483833795124077,\"q05\":-0.4869444417560329,\"q25\":-0.33278893030178824,\"q50\":-0.22358571495273183,\"q75\":-0.1228952800557164,\"q95\":0.026765211516707257,\"q975\":0.07959943747256289,\"quantity\":\"slope\",\"rhat\":1.0043559992684121,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.15783911481258198},{\"ess_bulk\":311.6800493790993,\"ess_tail\":680.7542036816906,\"group\":\"g13\",\"label\":\"Intercept\",\"mcse\":0.011688903368921519,\"mean\":-1.1668054118310378,\"method\":\"native\",\"q025\":-1.6009148761014196,\"q05\":-1.5041561250124735,\"q25\":-1.2972644999568155,\"q50\":-1.161634227736583,\"q75\":-1.0264035791577528,\"q95\":-0.8411016367444288,\"q975\":-0.7748792906994233,\"quantity\":\"intercept\",\"rhat\":1.0143207760811435,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.2088235325596801},{\"ess_bulk\":1143.640963938001,\"ess_tail\":1796.7560328465602,\"group\":\"g13\",\"label\":\"Slope\",\"mcse\":0.004869716265547817,\"mean\":-0.1888432469337769,\"method\":\"native\",\"q025\":-0.5180104796724362,\"q05\":-0.4630642868226276,\"q25\":-0.29853757652611257,\"q50\":-0.1884755474762686,\"q75\":-0.07750010080341235,\"q95\":0.07903642142220352,\"q975\":0.1297451240349359,\"quantity\":\"slope\",\"rhat\":1.0033937516141107,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.16466752760999395},{\"ess_bulk\":460.0089156119915,\"ess_tail\":814.1170886247932,\"group\":\"g14\",\"label\":\"Intercept\",\"mcse\":0.010885886304975353,\"mean\":0.12907512400758142,\"method\":\"native\",\"q025\":-0.35358935344031117,\"q05\":-0.2747126053688123,\"q25\":-0.021870450855658183,\"q50\":0.13415171047691196,\"q75\":0.28646527007669514,\"q95\":0.5032999494354408,\"q975\":0.5882700386566688,\"quantity\":\"intercept\",\"rhat\":1.009782400478167,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.2346595230609918},{\"ess_bulk\":1346.7722697348615,\"ess_tail\":2164.35828056359,\"group\":\"g14\",\"label\":\"Slope\",\"mcse\":0.004733030331007801,\"mean\":-0.17416958255262935,\"method\":\"native\",\"q025\":-0.5192351214584395,\"q05\":-0.459292383889581,\"q25\":-0.288714991431524,\"q50\":-0.1721343404284509,\"q75\":-0.05788118776788916,\"q95\":0.10906014984603137,\"q975\":0.1545188929135545,\"quantity\":\"slope\",\"rhat\":1.0012522091827671,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.17384490247550974},{\"ess_bulk\":391.6280883891417,\"ess_tail\":801.3493738481517,\"group\":\"g15\",\"label\":\"Intercept\",\"mcse\":0.011280478314853879,\"mean\":0.9264685131782171,\"method\":\"native\",\"q025\":0.4695833583697571,\"q05\":0.5515645968970515,\"q25\":0.7835495882245195,\"q50\":0.9304617155092494,\"q75\":1.0795270932723255,\"q95\":1.2799511723797654,\"q975\":1.338429532738517,\"quantity\":\"intercept\",\"rhat\":1.0102306579402873,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.22410948830764063},{\"ess_bulk\":972.6965183009673,\"ess_tail\":1711.4211562978974,\"group\":\"g15\",\"label\":\"Slope\",\"mcse\":0.004628456153119369,\"mean\":0.5518076016946412,\"method\":\"native\",\"q025\":0.2663058227146419,\"q05\":0.3151628369337462,\"q25\":0.45752280929622396,\"q50\":0.55453937898687,\"q75\":0.6460732751610605,\"q95\":0.7903290229102734,\"q975\":0.8317564358791726,\"quantity\":\"slope\",\"rhat\":1.0041009509368235,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.144209118353601},{\"ess_bulk\":476.28803199364756,\"ess_tail\":950.0078140285829,\"group\":\"g16\",\"label\":\"Intercept\",\"mcse\":0.011793098337487363,\"mean\":0.2876652987329955,\"method\":\"native\",\"q025\":-0.24351604813071767,\"q05\":-0.14328383480483983,\"q25\":0.11826965492607527,\"q50\":0.29828736077467477,\"q75\":0.4646107385105308,\"q95\":0.7005650256177022,\"q975\":0.7782528002669974,\"quantity\":\"intercept\",\"rhat\":1.0101032750703425,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.2594785978790804},{\"ess_bulk\":1469.231028819412,\"ess_tail\":1660.9551597557204,\"group\":\"g16\",\"label\":\"Slope\",\"mcse\":0.005285432977359407,\"mean\":-0.3836955219653619,\"method\":\"native\",\"q025\":-0.7960487133437498,\"q05\":-0.7197679470030461,\"q25\":-0.5186428602608035,\"q50\":-0.3834941988920183,\"q75\":-0.2470694788163461,\"q95\":-0.04871399135299245,\"q975\":0.025844009007369287,\"quantity\":\"slope\",\"rhat\":1.0020389978459785,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.20288450092138838},{\"ess_bulk\":345.64920027108195,\"ess_tail\":653.046093932752,\"group\":\"g17\",\"label\":\"Intercept\",\"mcse\":0.011803039068928108,\"mean\":1.166796512851353,\"method\":\"native\",\"q025\":0.7260728650424159,\"q05\":0.8067067066474022,\"q25\":1.026660604896222,\"q50\":1.1679047818868247,\"q75\":1.3122278758603145,\"q95\":1.5210727840723512,\"q975\":1.5870178873359628,\"quantity\":\"intercept\",\"rhat\":1.009872878642921,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.22026016016822555},{\"ess_bulk\":1212.9155108530545,\"ess_tail\":1709.9413909317027,\"group\":\"g17\",\"label\":\"Slope\",\"mcse\":0.004720677134157709,\"mean\":0.50271001640725,\"method\":\"native\",\"q025\":0.1763985675800931,\"q05\":0.23595179304301686,\"q25\":0.39522042414411795,\"q50\":0.5001928638864115,\"q75\":0.613644517414258,\"q95\":0.7785259369989009,\"q975\":0.829954902180985,\"quantity\":\"slope\",\"rhat\":1.0031825370673555,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.16433822881491272},{\"ess_bulk\":414.91937238848533,\"ess_tail\":734.8715007456356,\"group\":\"g18\",\"label\":\"Intercept\",\"mcse\":0.011681097117189244,\"mean\":0.7963370700182975,\"method\":\"native\",\"q025\":0.31576685917949326,\"q05\":0.4088152340463397,\"q25\":0.6367643281701453,\"q50\":0.7988241959598068,\"q75\":0.9552503855008128,\"q95\":1.1940431289284792,\"q975\":1.2684972420770269,\"quantity\":\"intercept\",\"rhat\":1.0101277585000272,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.2404872035091467},{\"ess_bulk\":1318.5949703979416,\"ess_tail\":1776.4885489101907,\"group\":\"g18\",\"label\":\"Slope\",\"mcse\":0.0048243881409092615,\"mean\":-0.11149897844790357,\"method\":\"native\",\"q025\":-0.45490997231439173,\"q05\":-0.3973656480185732,\"q25\":-0.22464109427323664,\"q50\":-0.111361891839486,\"q75\":0.004910187309660851,\"q95\":0.17409243232815397,\"q975\":0.22279863741334263,\"quantity\":\"slope\",\"rhat\":1.00166709894062,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.17382889862725864},{\"ess_bulk\":328.28826309841565,\"ess_tail\":763.3455684130408,\"group\":\"g19\",\"label\":\"Intercept\",\"mcse\":0.01190477603781024,\"mean\":0.7899770647117015,\"method\":\"native\",\"q025\":0.3486830043283252,\"q05\":0.4376394512330547,\"q25\":0.6540250088879517,\"q50\":0.7961765000737375,\"q75\":0.9385158554142309,\"q95\":1.1432936480661384,\"q975\":1.2030266522503863,\"quantity\":\"intercept\",\"rhat\":1.0148517992805215,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.21761141732576805},{\"ess_bulk\":1258.4643179200443,\"ess_tail\":1812.0284161331062,\"group\":\"g19\",\"label\":\"Slope\",\"mcse\":0.0045631464655739055,\"mean\":0.6083707731478328,\"method\":\"native\",\"q025\":0.2866923765888594,\"q05\":0.3430365893186701,\"q25\":0.502145187267558,\"q50\":0.6095138372442224,\"q75\":0.717726596241061,\"q95\":0.87237503577141,\"q975\":0.9209386454031817,\"quantity\":\"slope\",\"rhat\":1.0017858170726477,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.16138834787017076},{\"ess_bulk\":373.99512698464014,\"ess_tail\":698.478289527457,\"group\":\"g20\",\"label\":\"Intercept\",\"mcse\":0.011665418834002616,\"mean\":1.3752248283051474,\"method\":\"native\",\"q025\":0.9171298519737044,\"q05\":0.9987713971517345,\"q25\":1.2308192294106863,\"q50\":1.3759286127453638,\"q75\":1.529547247624043,\"q95\":1.7384813741950345,\"q975\":1.8106391071076613,\"quantity\":\"intercept\",\"rhat\":1.0129955275143891,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.2273824512339903},{\"ess_bulk\":1070.803370847351,\"ess_tail\":1900.3195047797544,\"group\":\"g20\",\"label\":\"Slope\",\"mcse\":0.004631255739004645,\"mean\":0.50264957298741,\"method\":\"native\",\"q025\":0.20212906778350587,\"q05\":0.2522994042832251,\"q25\":0.4055684969553237,\"q50\":0.5040940709898507,\"q75\":0.6064648039850651,\"q95\":0.7436985008847604,\"q975\":0.7969459610394262,\"quantity\":\"slope\",\"rhat\":1.0020435757796506,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.1511954282575271},{\"ess_bulk\":308.084766007719,\"ess_tail\":752.5769995526308,\"group\":\"g21\",\"label\":\"Intercept\",\"mcse\":0.011993921888158671,\"mean\":0.05500615509803344,\"method\":\"native\",\"q025\":-0.38044168686403884,\"q05\":-0.29951765382398643,\"q25\":-0.07615144797771563,\"q50\":0.056769229987866876,\"q75\":0.1973856719231032,\"q95\":0.39021896102331244,\"q975\":0.45800522237200375,\"quantity\":\"intercept\",\"rhat\":1.0133464510430847,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.2110645880870007},{\"ess_bulk\":997.9312991938154,\"ess_tail\":1297.5310018454795,\"group\":\"g21\",\"label\":\"Slope\",\"mcse\":0.004836089425836106,\"mean\":0.8220197219783943,\"method\":\"native\",\"q025\":0.5246073448592641,\"q05\":0.5753618502223341,\"q25\":0.7200855550127486,\"q50\":0.8200897929678954,\"q75\":0.9252986985485439,\"q95\":1.0751452343458139,\"q975\":1.1150107422211977,\"quantity\":\"slope\",\"rhat\":1.0037297839706734,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.15242454873747338},{\"ess_bulk\":327.07351591456825,\"ess_tail\":777.1743646378861,\"group\":\"g22\",\"label\":\"Intercept\",\"mcse\":0.011667188559471178,\"mean\":-0.9173242511497567,\"method\":\"native\",\"q025\":-1.3599606084650322,\"q05\":-1.2719555654555905,\"q25\":-1.0483888456005694,\"q50\":-0.9161600500022709,\"q75\":-0.7720854881981989,\"q95\":-0.5727183561389876,\"q975\":-0.5188494099027454,\"quantity\":\"intercept\",\"rhat\":1.0120117532884783,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.21366774118787923},{\"ess_bulk\":1439.065028284614,\"ess_tail\":1747.1295283432985,\"group\":\"g22\",\"label\":\"Slope\",\"mcse\":0.004568930638702541,\"mean\":-0.08226409061566485,\"method\":\"native\",\"q025\":-0.4198549291363499,\"q05\":-0.36185466059736965,\"q25\":-0.19586393197948027,\"q50\":-0.07913769780773126,\"q75\":0.031163240952853524,\"q95\":0.19984241214296444,\"q975\":0.25943168420268903,\"quantity\":\"slope\",\"rhat\":1.003140897539258,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.17210511921180924},{\"ess_bulk\":329.70934581421653,\"ess_tail\":678.6148615644095,\"group\":\"g23\",\"label\":\"Intercept\",\"mcse\":0.012046107245707415,\"mean\":0.1395482432827509,\"method\":\"native\",\"q025\":-0.3125901946371847,\"q05\":-0.21744143983329203,\"q25\":-0.0008610579647917063,\"q50\":0.14398053153502452,\"q75\":0.2912607405386916,\"q95\":0.49319222467659585,\"q975\":0.5575615999981538,\"quantity\":\"intercept\",\"rhat\":1.0119677317479197,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.21934996737567336},{\"ess_bulk\":1298.2745427375564,\"ess_tail\":1536.8437729280474,\"group\":\"g23\",\"label\":\"Slope\",\"mcse\":0.004732122025172018,\"mean\":0.32325612264133163,\"method\":\"native\",\"q025\":-0.011456224316748496,\"q05\":0.04245299650694091,\"q25\":0.21040918417822888,\"q50\":0.32242176769675635,\"q75\":0.4346571941390355,\"q95\":0.606202203380422,\"q975\":0.6676332548531997,\"quantity\":\"slope\",\"rhat\":1.0026744675001182,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.17013115157615644},{\"ess_bulk\":410.03611437350753,\"ess_tail\":830.2699598391581,\"group\":\"g24\",\"label\":\"Intercept\",\"mcse\":0.011459792514017643,\"mean\":-0.769064022207347,\"method\":\"native\",\"q025\":-1.2592739645540034,\"q05\":-1.1632620868464425,\"q25\":-0.9118258163186137,\"q50\":-0.7638837406944783,\"q75\":-0.6109942238912969,\"q95\":-0.39557198936266047,\"q975\":-0.322906121235271,\"quantity\":\"intercept\",\"rhat\":1.010663167751352,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.23568064205560305},{\"ess_bulk\":1537.4220796539323,\"ess_tail\":1762.1782445061137,\"group\":\"g24\",\"label\":\"Slope\",\"mcse\":0.0049303322216100835,\"mean\":-0.3534311842730167,\"method\":\"native\",\"q025\":-0.7390051133209444,\"q05\":-0.6738820016039964,\"q25\":-0.47968627814107656,\"q50\":-0.35098581129138406,\"q75\":-0.226721642776182,\"q95\":-0.034961412042193135,\"q975\":0.03180995835143753,\"quantity\":\"slope\",\"rhat\":1.0017333019508459,\"sampler\":\"WarmupHMC · Julia\",\"sd\":0.1935575423981728},{\"ess_bulk\":1041.8346004286993,\"ess_tail\":1776.787254586452,\"group\":\"g01\",\"label\":\"Intercept\",\"mcse\":0.007906510764329383,\"mean\":0.07772093991253695,\"method\":\"jax\",\"q025\":-0.43907182357854835,\"q05\":-0.35941531025208595,\"q25\":-0.09107895407231772,\"q50\":0.08089805865214243,\"q75\":0.24791107437329257,\"q95\":0.49697432092370264,\"q975\":0.5791891628747843,\"quantity\":\"intercept\",\"rhat\":1.0081517303342062,\"sampler\":\"NumPyro · JAX\",\"sd\":0.25471426040561645},{\"ess_bulk\":3614.1423819350407,\"ess_tail\":2561.519522417764,\"group\":\"g01\",\"label\":\"Slope\",\"mcse\":0.004322663284174325,\"mean\":-0.04221236898028976,\"method\":\"jax\",\"q025\":-0.5632292968156007,\"q05\":-0.46592451545394264,\"q25\":-0.21043411058515,\"q50\":-0.04420764751190144,\"q75\":0.12905945483145595,\"q95\":0.3789903124272993,\"q975\":0.46904106311509186,\"quantity\":\"slope\",\"rhat\":1.0018010628101304,\"sampler\":\"NumPyro · JAX\",\"sd\":0.259650594621579},{\"ess_bulk\":1115.6405614124226,\"ess_tail\":1998.4405660117677,\"group\":\"g02\",\"label\":\"Intercept\",\"mcse\":0.007694668338569597,\"mean\":0.44287934664742956,\"method\":\"jax\",\"q025\":-0.05519696459229261,\"q05\":0.02765394450357699,\"q25\":0.27110669967361223,\"q50\":0.4408862358576604,\"q75\":0.6130298412889141,\"q95\":0.8687946378631629,\"q975\":0.9528956321314611,\"quantity\":\"intercept\",\"rhat\":1.0049291421915831,\"sampler\":\"NumPyro · JAX\",\"sd\":0.2571469382648973},{\"ess_bulk\":3005.985030720629,\"ess_tail\":2835.008842362327,\"group\":\"g02\",\"label\":\"Slope\",\"mcse\":0.004686449610385029,\"mean\":-0.09957622070248191,\"method\":\"jax\",\"q025\":-0.6150645885770382,\"q05\":-0.5292001837637565,\"q25\":-0.27434554108787523,\"q50\":-0.09465568555790722,\"q75\":0.08115563867424386,\"q95\":0.31594345567620297,\"q975\":0.39226262831601727,\"quantity\":\"slope\",\"rhat\":1.0015790427528992,\"sampler\":\"NumPyro · JAX\",\"sd\":0.25641450257617543},{\"ess_bulk\":790.4093304889071,\"ess_tail\":1850.8442819481545,\"group\":\"g03\",\"label\":\"Intercept\",\"mcse\":0.00801290483807834,\"mean\":-0.019309989104395534,\"method\":\"jax\",\"q025\":-0.4728602960191255,\"q05\":-0.3954722139286357,\"q25\":-0.17088854991618024,\"q50\":-0.016931200528298482,\"q75\":0.12913720692395186,\"q95\":0.3473926758830516,\"q975\":0.4085257522686978,\"quantity\":\"intercept\",\"rhat\":1.0077654724417544,\"sampler\":\"NumPyro · JAX\",\"sd\":0.2255503399561331},{\"ess_bulk\":2378.250296514462,\"ess_tail\":2958.4208816271903,\"group\":\"g03\",\"label\":\"Slope\",\"mcse\":0.0034065305816047466,\"mean\":-0.2327842744786701,\"method\":\"jax\",\"q025\":-0.5559345654211102,\"q05\":-0.5078457799937467,\"q25\":-0.3419718127011916,\"q50\":-0.2334571475216191,\"q75\":-0.1277844922682541,\"q95\":0.04158166047060128,\"q975\":0.09417733979006701,\"quantity\":\"slope\",\"rhat\":1.0007623022598016,\"sampler\":\"NumPyro · JAX\",\"sd\":0.16621024803464796},{\"ess_bulk\":708.5376388941852,\"ess_tail\":1375.4330745310997,\"group\":\"g04\",\"label\":\"Intercept\",\"mcse\":0.007710736968145816,\"mean\":-0.8975847238277628,\"method\":\"jax\",\"q025\":-1.318334755227272,\"q05\":-1.2499349326233178,\"q25\":-1.0312974885023214,\"q50\":-0.8914265033535435,\"q75\":-0.7619803783808918,\"q95\":-0.5668997785101437,\"q975\":-0.5048575501539335,\"quantity\":\"intercept\",\"rhat\":1.0080946103530404,\"sampler\":\"NumPyro · JAX\",\"sd\":0.2048593466861575},{\"ess_bulk\":1843.3192100160256,\"ess_tail\":2390.8864956152697,\"group\":\"g04\",\"label\":\"Slope\",\"mcse\":0.003312521991004163,\"mean\":-0.6355871937857818,\"method\":\"jax\",\"q025\":-0.9139721267000233,\"q05\":-0.8741576861746099,\"q25\":-0.7281254686115106,\"q50\":-0.6365391434624486,\"q75\":-0.5423351683794734,\"q95\":-0.402764423952358,\"q975\":-0.35080628759381993,\"quantity\":\"slope\",\"rhat\":1.0017843176790662,\"sampler\":\"NumPyro · JAX\",\"sd\":0.1422205419926378},{\"ess_bulk\":893.4365329547891,\"ess_tail\":1683.1946435976465,\"group\":\"g05\",\"label\":\"Intercept\",\"mcse\":0.0077762167190960334,\"mean\":-0.8256428255127366,\"method\":\"jax\",\"q025\":-1.2952014537432808,\"q05\":-1.209803469318059,\"q25\":-0.9800845563040695,\"q50\":-0.8231456045835281,\"q75\":-0.6770796641794146,\"q95\":-0.44432372764958167,\"q975\":-0.3706113792884188,\"quantity\":\"intercept\",\"rhat\":1.0076580043199206,\"sampler\":\"NumPyro · JAX\",\"sd\":0.23249523005606448},{\"ess_bulk\":2009.693174513548,\"ess_tail\":2180.381436142695,\"group\":\"g05\",\"label\":\"Slope\",\"mcse\":0.0034508958931197633,\"mean\":0.07067114596045924,\"method\":\"jax\",\"q025\":-0.23629648257372765,\"q05\":-0.19087258809430008,\"q25\":-0.027863758391065342,\"q50\":0.07033566343213718,\"q75\":0.1752613054311046,\"q95\":0.32158040581217406,\"q975\":0.3785027882072829,\"quantity\":\"slope\",\"rhat\":1.0020484631865851,\"sampler\":\"NumPyro · JAX\",\"sd\":0.15442542633784775},{\"ess_bulk\":705.8057925624154,\"ess_tail\":1508.176128064515,\"group\":\"g06\",\"label\":\"Intercept\",\"mcse\":0.0077254716894112055,\"mean\":0.377755461985956,\"method\":\"jax\",\"q025\":-0.031821262097241426,\"q05\":0.034749578919076186,\"q25\":0.24390912804554252,\"q50\":0.37519102814541105,\"q75\":0.5114783375537029,\"q95\":0.7201694152948577,\"q975\":0.7874576711291457,\"quantity\":\"intercept\",\"rhat\":1.0084466776511045,\"sampler\":\"NumPyro · JAX\",\"sd\":0.20567594314347235},{\"ess_bulk\":1793.294614816103,\"ess_tail\":2583.6005047238777,\"group\":\"g06\",\"label\":\"Slope\",\"mcse\":0.003276314180853605,\"mean\":-0.16658042797648898,\"method\":\"jax\",\"q025\":-0.43921161560488353,\"q05\":-0.3958299522495266,\"q25\":-0.2584776991032423,\"q50\":-0.16734420851264648,\"q75\":-0.07246841755885258,\"q95\":0.060684273690905344,\"q975\":0.1006880144058763,\"quantity\":\"slope\",\"rhat\":1.0031571174195677,\"sampler\":\"NumPyro · JAX\",\"sd\":0.13882903879789982},{\"ess_bulk\":792.2381411062745,\"ess_tail\":1781.3283346237815,\"group\":\"g07\",\"label\":\"Intercept\",\"mcse\":0.007800185901756107,\"mean\":-0.8051439364253992,\"method\":\"jax\",\"q025\":-1.2263465161396672,\"q05\":-1.171668414608062,\"q25\":-0.9557726465264816,\"q50\":-0.8017998927976672,\"q75\":-0.6580310767140555,\"q95\":-0.44756576705122736,\"q975\":-0.37600331009707005,\"quantity\":\"intercept\",\"rhat\":1.0076215723329411,\"sampler\":\"NumPyro · JAX\",\"sd\":0.21963000810799105},{\"ess_bulk\":2044.9403564369818,\"ess_tail\":2693.7487476974707,\"group\":\"g07\",\"label\":\"Slope\",\"mcse\":0.0034195742694507095,\"mean\":-0.2302568723203564,\"method\":\"jax\",\"q025\":-0.5465688713626043,\"q05\":-0.4907687969273011,\"q25\":-0.3328846043617575,\"q50\":-0.2285497480007403,\"q75\":-0.12704740071189197,\"q95\":0.026916002232691878,\"q975\":0.07513568396528095,\"quantity\":\"slope\",\"rhat\":1.0017131450538568,\"sampler\":\"NumPyro · JAX\",\"sd\":0.154709163501334},{\"ess_bulk\":555.3902132818239,\"ess_tail\":1490.2012060167528,\"group\":\"g08\",\"label\":\"Intercept\",\"mcse\":0.008687015941595353,\"mean\":-1.5257205629372361,\"method\":\"jax\",\"q025\":-1.9294246736650171,\"q05\":-1.8644909542483814,\"q25\":-1.6609849571071973,\"q50\":-1.524600801063965,\"q75\":-1.3896473322656893,\"q95\":-1.1965204552941933,\"q975\":-1.1279444023638525,\"quantity\":\"intercept\",\"rhat\":1.0100477631260072,\"sampler\":\"NumPyro · JAX\",\"sd\":0.20490068552042748},{\"ess_bulk\":1899.943320144924,\"ess_tail\":2867.9907255725366,\"group\":\"g08\",\"label\":\"Slope\",\"mcse\":0.003301826242058397,\"mean\":-0.3167712830627971,\"method\":\"jax\",\"q025\":-0.5989547231573562,\"q05\":-0.5585166939942815,\"q25\":-0.4145377409518508,\"q50\":-0.31697668465689643,\"q75\":-0.21904879533232402,\"q95\":-0.08566558623484928,\"q975\":-0.03361542537947615,\"quantity\":\"slope\",\"rhat\":1.0030835680825723,\"sampler\":\"NumPyro · JAX\",\"sd\":0.1437415281294391},{\"ess_bulk\":724.1150602519476,\"ess_tail\":1315.3511431699128,\"group\":\"g09\",\"label\":\"Intercept\",\"mcse\":0.007918117651831735,\"mean\":0.35849036166704196,\"method\":\"jax\",\"q025\":-0.05790921282812526,\"q05\":0.004532462674128903,\"q25\":0.21986963570459517,\"q50\":0.3596873790657269,\"q75\":0.4960921270807897,\"q95\":0.7183425884547457,\"q975\":0.7836077361448821,\"quantity\":\"intercept\",\"rhat\":1.0109721189923613,\"sampler\":\"NumPyro · JAX\",\"sd\":0.21325788479585805},{\"ess_bulk\":1842.5665618875885,\"ess_tail\":2469.8469087090402,\"group\":\"g09\",\"label\":\"Slope\",\"mcse\":0.0036037413726972374,\"mean\":0.040758373770832856,\"method\":\"jax\",\"q025\":-0.26746498748799336,\"q05\":-0.21743108881378367,\"q25\":-0.06177705319290791,\"q50\":0.04230723191490171,\"q75\":0.1440242083348857,\"q95\":0.2873288358497579,\"q975\":0.33586419886927565,\"quantity\":\"slope\",\"rhat\":1.003056328898556,\"sampler\":\"NumPyro · JAX\",\"sd\":0.15440741979023112},{\"ess_bulk\":795.478051026564,\"ess_tail\":1717.242386599722,\"group\":\"g10\",\"label\":\"Intercept\",\"mcse\":0.007837506594513008,\"mean\":-0.9077614722749022,\"method\":\"jax\",\"q025\":-1.3438620227792342,\"q05\":-1.2838085604035614,\"q25\":-1.0577320324166344,\"q50\":-0.906899562126032,\"q75\":-0.7579867987494955,\"q95\":-0.5345112171583408,\"q975\":-0.46934718767336164,\"quantity\":\"intercept\",\"rhat\":1.0068755333249537,\"sampler\":\"NumPyro · JAX\",\"sd\":0.2212727886102386},{\"ess_bulk\":2656.2856012098155,\"ess_tail\":2919.0402945219935,\"group\":\"g10\",\"label\":\"Slope\",\"mcse\":0.0032915184002034,\"mean\":-0.4354736814239811,\"method\":\"jax\",\"q025\":-0.7649045137972207,\"q05\":-0.7177469435942341,\"q25\":-0.5524452926354358,\"q50\":-0.43412953502504587,\"q75\":-0.3187492150760405,\"q95\":-0.15910755187037304,\"q975\":-0.10157992859994858,\"quantity\":\"slope\",\"rhat\":1.0008181353602563,\"sampler\":\"NumPyro · JAX\",\"sd\":0.16971398407823268},{\"ess_bulk\":871.2703879820124,\"ess_tail\":1768.4426302248924,\"group\":\"g11\",\"label\":\"Intercept\",\"mcse\":0.007684716154160802,\"mean\":0.811413153318835,\"method\":\"jax\",\"q025\":0.37091513589069236,\"q05\":0.4392856675618443,\"q25\":0.6593136764062966,\"q50\":0.8121533926022608,\"q75\":0.9642707246257288,\"q95\":1.1782811518538328,\"q975\":1.2589182159704426,\"quantity\":\"intercept\",\"rhat\":1.007037280314625,\"sampler\":\"NumPyro · JAX\",\"sd\":0.22687960275854746},{\"ess_bulk\":2696.416874096727,\"ess_tail\":2816.477389496744,\"group\":\"g11\",\"label\":\"Slope\",\"mcse\":0.0034065789916792395,\"mean\":0.19150182698567136,\"method\":\"jax\",\"q025\":-0.15537529436488096,\"q05\":-0.09746153434275626,\"q25\":0.07217021498913392,\"q50\":0.19410914664861484,\"q75\":0.3109267356601976,\"q95\":0.4818748799819245,\"q975\":0.5432658207337063,\"quantity\":\"slope\",\"rhat\":1.0010424058181786,\"sampler\":\"NumPyro · JAX\",\"sd\":0.17683674584683026},{\"ess_bulk\":811.6610191116508,\"ess_tail\":1570.0583494919988,\"group\":\"g12\",\"label\":\"Intercept\",\"mcse\":0.007464468644789104,\"mean\":0.4460741992036257,\"method\":\"jax\",\"q025\":0.021419169526844292,\"q05\":0.09284168728123128,\"q25\":0.31071334570229386,\"q50\":0.4483560639154106,\"q75\":0.5890107957128458,\"q95\":0.7977650047875601,\"q975\":0.8637971510800291,\"quantity\":\"intercept\",\"rhat\":1.0081902777004426,\"sampler\":\"NumPyro · JAX\",\"sd\":0.21263010555002593},{\"ess_bulk\":2082.2048110527458,\"ess_tail\":2668.0911874082226,\"group\":\"g12\",\"label\":\"Slope\",\"mcse\":0.0033586071051661917,\"mean\":-0.2239755057046392,\"method\":\"jax\",\"q025\":-0.5217213276908295,\"q05\":-0.4730519746415158,\"q25\":-0.3295310549689332,\"q50\":-0.2252159612453164,\"q75\":-0.11843599224810239,\"q95\":0.028053371320019702,\"q975\":0.06790124829914596,\"quantity\":\"slope\",\"rhat\":1.0019488940982355,\"sampler\":\"NumPyro · JAX\",\"sd\":0.15340425113112263},{\"ess_bulk\":622.2934461524472,\"ess_tail\":1230.1228189553242,\"group\":\"g13\",\"label\":\"Intercept\",\"mcse\":0.008134074614431563,\"mean\":-1.1651482486467049,\"method\":\"jax\",\"q025\":-1.5625165362812594,\"q05\":-1.4993672699058767,\"q25\":-1.296941368288235,\"q50\":-1.1599122708479008,\"q75\":-1.031051549159259,\"q95\":-0.8349029961011103,\"q975\":-0.7689857340188284,\"quantity\":\"intercept\",\"rhat\":1.0087681263855792,\"sampler\":\"NumPyro · JAX\",\"sd\":0.2020987746506104},{\"ess_bulk\":2279.26900779352,\"ess_tail\":2518.455981002249,\"group\":\"g13\",\"label\":\"Slope\",\"mcse\":0.0032883633029284383,\"mean\":-0.1851297675842425,\"method\":\"jax\",\"q025\":-0.4793865321730962,\"q05\":-0.4347734006505494,\"q25\":-0.2941143158031079,\"q50\":-0.18675984099730625,\"q75\":-0.07805533339591625,\"q95\":0.07265323267847645,\"q975\":0.11853778292851025,\"quantity\":\"slope\",\"rhat\":1.0004306130333938,\"sampler\":\"NumPyro · JAX\",\"sd\":0.15694733489688606},{\"ess_bulk\":809.4222234527172,\"ess_tail\":1575.7635679772134,\"group\":\"g14\",\"label\":\"Intercept\",\"mcse\":0.008240800281993768,\"mean\":0.13096272501670536,\"method\":\"jax\",\"q025\":-0.32859327764786594,\"q05\":-0.2534632655284945,\"q25\":-0.029580841924679004,\"q50\":0.133232469212201,\"q75\":0.2905723616729306,\"q95\":0.5098179563864242,\"q975\":0.5798435143017624,\"quantity\":\"intercept\",\"rhat\":1.0078632685054698,\"sampler\":\"NumPyro · JAX\",\"sd\":0.23472910066736616},{\"ess_bulk\":2044.8692469457956,\"ess_tail\":2362.272103318097,\"group\":\"g14\",\"label\":\"Slope\",\"mcse\":0.003775864775746041,\"mean\":-0.1671601303160585,\"method\":\"jax\",\"q025\":-0.49126297766019356,\"q05\":-0.4504951128154039,\"q25\":-0.2837397372848276,\"q50\":-0.16688481086258145,\"q75\":-0.050635323165637486,\"q95\":0.11371583739570763,\"q975\":0.16513747023060268,\"quantity\":\"slope\",\"rhat\":1.0013231339210515,\"sampler\":\"NumPyro · JAX\",\"sd\":0.17071039858991244},{\"ess_bulk\":780.749884220709,\"ess_tail\":1775.1064847193081,\"group\":\"g15\",\"label\":\"Intercept\",\"mcse\":0.007882492198360362,\"mean\":0.924557850041378,\"method\":\"jax\",\"q025\":0.48735722800122744,\"q05\":0.5619712834244789,\"q25\":0.7790023137950819,\"q50\":0.9243996612417036,\"q75\":1.0678563568135333,\"q95\":1.2796381491601565,\"q975\":1.352598141066348,\"quantity\":\"intercept\",\"rhat\":1.0095083186796028,\"sampler\":\"NumPyro · JAX\",\"sd\":0.21923274277201488},{\"ess_bulk\":1825.0112577653338,\"ess_tail\":2600.647675700133,\"group\":\"g15\",\"label\":\"Slope\",\"mcse\":0.003269586842209201,\"mean\":0.5540028283916834,\"method\":\"jax\",\"q025\":0.27732505254866935,\"q05\":0.32128474675571594,\"q25\":0.46059936402410834,\"q50\":0.5536289468658744,\"q75\":0.6496574524402549,\"q95\":0.7770310496304563,\"q975\":0.8247690292822484,\"quantity\":\"slope\",\"rhat\":1.0015652897260015,\"sampler\":\"NumPyro · JAX\",\"sd\":0.13968492573747765},{\"ess_bulk\":1046.4265769016215,\"ess_tail\":1725.734029318537,\"group\":\"g16\",\"label\":\"Intercept\",\"mcse\":0.007848311953836454,\"mean\":0.2879117376529673,\"method\":\"jax\",\"q025\":-0.22477379583328908,\"q05\":-0.14092265256452158,\"q25\":0.12117310323549424,\"q50\":0.29243554173260644,\"q75\":0.4597434219652603,\"q95\":0.700211420418246,\"q975\":0.78133042754841,\"quantity\":\"intercept\",\"rhat\":1.0085281063712412,\"sampler\":\"NumPyro · JAX\",\"sd\":0.25352764010263185},{\"ess_bulk\":3134.0212646946698,\"ess_tail\":2902.6594360287254,\"group\":\"g16\",\"label\":\"Slope\",\"mcse\":0.003622181259196582,\"mean\":-0.3801131470434708,\"method\":\"jax\",\"q025\":-0.7742340127017178,\"q05\":-0.7184412760670776,\"q25\":-0.5194135146883183,\"q50\":-0.3772975480036675,\"q75\":-0.23939554662008034,\"q95\":-0.05339887179213435,\"q975\":0.013209035812291136,\"quantity\":\"slope\",\"rhat\":1.0011573690228799,\"sampler\":\"NumPyro · JAX\",\"sd\":0.20288823409218526},{\"ess_bulk\":695.3706327184484,\"ess_tail\":1481.0069086408037,\"group\":\"g17\",\"label\":\"Intercept\",\"mcse\":0.00791462445027351,\"mean\":1.1741246319398835,\"method\":\"jax\",\"q025\":0.7607190530090759,\"q05\":0.8234100021806345,\"q25\":1.037336245379486,\"q50\":1.1747090789425214,\"q75\":1.3080541234540246,\"q95\":1.5208024314538147,\"q975\":1.6030851163610493,\"quantity\":\"intercept\",\"rhat\":1.0099168242785763,\"sampler\":\"NumPyro · JAX\",\"sd\":0.20859275203759403},{\"ess_bulk\":2260.511741126967,\"ess_tail\":3093.814068877465,\"group\":\"g17\",\"label\":\"Slope\",\"mcse\":0.003396012105109958,\"mean\":0.5065204747171291,\"method\":\"jax\",\"q025\":0.18513428408500643,\"q05\":0.23694033667310174,\"q25\":0.3993680365259672,\"q50\":0.5083738545608488,\"q75\":0.6138216379163273,\"q95\":0.7649776465480077,\"q975\":0.8281965243220174,\"quantity\":\"slope\",\"rhat\":1.00292199037216,\"sampler\":\"NumPyro · JAX\",\"sd\":0.16156150944829656},{\"ess_bulk\":919.1606241438824,\"ess_tail\":1765.4989558220311,\"group\":\"g18\",\"label\":\"Intercept\",\"mcse\":0.007646593499279364,\"mean\":0.8015860708030093,\"method\":\"jax\",\"q025\":0.34206282156756235,\"q05\":0.42181788618128613,\"q25\":0.6488329158922223,\"q50\":0.8042261404940598,\"q75\":0.952846208162742,\"q95\":1.1909807596251485,\"q975\":1.2587639454898123,\"quantity\":\"intercept\",\"rhat\":1.006830525452297,\"sampler\":\"NumPyro · JAX\",\"sd\":0.23158592767991368},{\"ess_bulk\":2660.561754925241,\"ess_tail\":2493.643578450697,\"group\":\"g18\",\"label\":\"Slope\",\"mcse\":0.0032815090671382565,\"mean\":-0.10018071602019166,\"method\":\"jax\",\"q025\":-0.4309308793228254,\"q05\":-0.3779280847750146,\"q25\":-0.21774979356232718,\"q50\":-0.10001431743290351,\"q75\":0.013874195391400706,\"q95\":0.18101087773485938,\"q975\":0.24493850441818654,\"quantity\":\"slope\",\"rhat\":1.000827231521025,\"sampler\":\"NumPyro · JAX\",\"sd\":0.1688953638755713},{\"ess_bulk\":765.6825293276826,\"ess_tail\":1551.7210993348986,\"group\":\"g19\",\"label\":\"Intercept\",\"mcse\":0.0075989539688179055,\"mean\":0.7887017107689762,\"method\":\"jax\",\"q025\":0.37650978262745394,\"q05\":0.44125693192854604,\"q25\":0.651013683836803,\"q50\":0.789849992752003,\"q75\":0.928338601049916,\"q95\":1.1282807477163008,\"q975\":1.2121598784273386,\"quantity\":\"intercept\",\"rhat\":1.010398242573521,\"sampler\":\"NumPyro · JAX\",\"sd\":0.2102192973484032},{\"ess_bulk\":2082.4586762524123,\"ess_tail\":2564.6049167145748,\"group\":\"g19\",\"label\":\"Slope\",\"mcse\":0.0035627026933367435,\"mean\":0.6143302140091779,\"method\":\"jax\",\"q025\":0.30001856196995774,\"q05\":0.3472029537957073,\"q25\":0.5050939669027523,\"q50\":0.6106614632744418,\"q75\":0.7187025800681397,\"q95\":0.8835987143836476,\"q975\":0.9392377185760681,\"quantity\":\"slope\",\"rhat\":1.002178113593845,\"sampler\":\"NumPyro · JAX\",\"sd\":0.16260949163772698},{\"ess_bulk\":839.709836418408,\"ess_tail\":1635.8673270164957,\"group\":\"g20\",\"label\":\"Intercept\",\"mcse\":0.007871614344733244,\"mean\":1.3706113648646892,\"method\":\"jax\",\"q025\":0.9209944590864972,\"q05\":0.9955556120952315,\"q25\":1.2178331912163989,\"q50\":1.3731210188030558,\"q75\":1.5245018542058215,\"q95\":1.7415658550984703,\"q975\":1.8167744798038168,\"quantity\":\"intercept\",\"rhat\":1.0084388170185146,\"sampler\":\"NumPyro · JAX\",\"sd\":0.2280983744112038},{\"ess_bulk\":2001.3529061827176,\"ess_tail\":2659.9967722691513,\"group\":\"g20\",\"label\":\"Slope\",\"mcse\":0.0032539479079219903,\"mean\":0.5094037825659836,\"method\":\"jax\",\"q025\":0.23458343385683275,\"q05\":0.27656915204369575,\"q25\":0.4113972272286548,\"q50\":0.5070501290944847,\"q75\":0.604782729428269,\"q95\":0.748449382517596,\"q975\":0.8018999535004672,\"quantity\":\"slope\",\"rhat\":1.0021466000531862,\"sampler\":\"NumPyro · JAX\",\"sd\":0.14524533432910597},{\"ess_bulk\":660.1555540022179,\"ess_tail\":1370.2260193639231,\"group\":\"g21\",\"label\":\"Intercept\",\"mcse\":0.007914398058212485,\"mean\":0.057749265652510845,\"method\":\"jax\",\"q025\":-0.3432462897035148,\"q05\":-0.2883287980762973,\"q25\":-0.07469354217236146,\"q50\":0.06148282046531926,\"q75\":0.19266007091244036,\"q95\":0.3911429151904274,\"q975\":0.4524431549582936,\"quantity\":\"intercept\",\"rhat\":1.0094923680108927,\"sampler\":\"NumPyro · JAX\",\"sd\":0.20289538608545993},{\"ess_bulk\":1789.0037883494604,\"ess_tail\":2701.411193963363,\"group\":\"g21\",\"label\":\"Slope\",\"mcse\":0.003631763987357099,\"mean\":0.8280523668533185,\"method\":\"jax\",\"q025\":0.5364557741956093,\"q05\":0.5773118874151055,\"q25\":0.723759229179795,\"q50\":0.8231862304726182,\"q75\":0.9317987056053114,\"q95\":1.0824233374799135,\"q975\":1.1368617472205478,\"quantity\":\"slope\",\"rhat\":1.0009831108350729,\"sampler\":\"NumPyro · JAX\",\"sd\":0.1530942988860447},{\"ess_bulk\":637.9324710523306,\"ess_tail\":1345.7550063392098,\"group\":\"g22\",\"label\":\"Intercept\",\"mcse\":0.008231709837398836,\"mean\":-0.9135474798382244,\"method\":\"jax\",\"q025\":-1.3256498316549148,\"q05\":-1.2551405251318204,\"q25\":-1.0533046127524965,\"q50\":-0.9076193598077894,\"q75\":-0.7716355930947995,\"q95\":-0.5714922541049472,\"q975\":-0.5204578822877377,\"quantity\":\"intercept\",\"rhat\":1.0080815574261992,\"sampler\":\"NumPyro · JAX\",\"sd\":0.20786111897276718},{\"ess_bulk\":2287.9076161003663,\"ess_tail\":2496.2659268387915,\"group\":\"g22\",\"label\":\"Slope\",\"mcse\":0.0034462038797428447,\"mean\":-0.08189817982269884,\"method\":\"jax\",\"q025\":-0.3994623380237164,\"q05\":-0.3483394443555924,\"q25\":-0.19227812994926627,\"q50\":-0.08506811028350586,\"q75\":0.02967453597589501,\"q95\":0.1880499032672342,\"q975\":0.24250073076318898,\"quantity\":\"slope\",\"rhat\":0.9998537675182699,\"sampler\":\"NumPyro · JAX\",\"sd\":0.16486812063422623},{\"ess_bulk\":773.9065375387303,\"ess_tail\":1384.7157327100958,\"group\":\"g23\",\"label\":\"Intercept\",\"mcse\":0.007745954839082059,\"mean\":0.14194368750817854,\"method\":\"jax\",\"q025\":-0.3058689287828657,\"q05\":-0.2290550660984132,\"q25\":0.005112546394392633,\"q50\":0.14642027299227064,\"q75\":0.279693287926769,\"q95\":0.48770312479963024,\"q975\":0.562233656416621,\"quantity\":\"intercept\",\"rhat\":1.0095263566602197,\"sampler\":\"NumPyro · JAX\",\"sd\":0.21419408626626},{\"ess_bulk\":2160.2464303895126,\"ess_tail\":2472.8634727606754,\"group\":\"g23\",\"label\":\"Slope\",\"mcse\":0.003534350196285693,\"mean\":0.32526035709800566,\"method\":\"jax\",\"q025\":0.011054648750331889,\"q05\":0.052424166135948455,\"q25\":0.2113721322543614,\"q50\":0.32444466184977705,\"q75\":0.4362325706273442,\"q95\":0.6011165621799988,\"q975\":0.6596173794087017,\"quantity\":\"slope\",\"rhat\":1.002718485750732,\"sampler\":\"NumPyro · JAX\",\"sd\":0.1641222024228342},{\"ess_bulk\":794.6777474433843,\"ess_tail\":1569.9701384974167,\"group\":\"g24\",\"label\":\"Intercept\",\"mcse\":0.008024621607945915,\"mean\":-0.7678674522606489,\"method\":\"jax\",\"q025\":-1.2228360201734434,\"q05\":-1.1494206107663203,\"q25\":-0.9167882883471555,\"q50\":-0.7659591768684963,\"q75\":-0.6149009228136926,\"q95\":-0.40448858378836483,\"q975\":-0.3344578652855175,\"quantity\":\"intercept\",\"rhat\":1.0072041858197924,\"sampler\":\"NumPyro · JAX\",\"sd\":0.22581602233924827},{\"ess_bulk\":2776.3411975010117,\"ess_tail\":3011.1276254197255,\"group\":\"g24\",\"label\":\"Slope\",\"mcse\":0.003490335400647077,\"mean\":-0.35252808447667017,\"method\":\"jax\",\"q025\":-0.7158400739412822,\"q05\":-0.6596525184012454,\"q25\":-0.47977440380197367,\"q50\":-0.3459774559349169,\"q75\":-0.2266259437927347,\"q95\":-0.05067015737785274,\"q975\":0.011734628911457639,\"quantity\":\"slope\",\"rhat\":1.0020103824580777,\"sampler\":\"NumPyro · JAX\",\"sd\":0.1840909505736393}]},\"facet\":{\"column\":{\"field\":\"label\",\"title\":\"\",\"type\":\"nominal\"}},\"resolve\":{\"scale\":{\"x\":\"independent\"}},\"spec\":{\"height\":460,\"layer\":[{\"_aovLegend\":{\"dimmed\":true,\"filtered\":false,\"opacity\":null,\"params\":[\"legend_selection\"],\"transform\":[]},\"encoding\":{\"color\":{\"field\":\"sampler\",\"scale\":{\"domain\":[\"WarmupHMC · Julia\",\"NumPyro · JAX\"],\"range\":[\"#2a78d6\",\"#eb6834\"]},\"title\":\"Sampler\",\"type\":\"nominal\"},\"opacity\":{\"condition\":{\"test\":{\"and\":[{\"or\":[\"!isValid(datum[\\\"sampler\\\"])\",{\"empty\":true,\"param\":\"legend_selection\"}]}]},\"value\":1},\"value\":0.15},\"tooltip\":[{\"field\":\"q50\",\"title\":\"Deviation (estimate)\",\"type\":\"quantitative\"},{\"field\":\"group\",\"type\":\"nominal\"},{\"field\":\"sampler\",\"type\":\"nominal\"},{\"field\":\"q025\",\"title\":\"q025\",\"type\":\"quantitative\"},{\"field\":\"q975\",\"title\":\"q975\",\"type\":\"quantitative\"}],\"x\":{\"field\":\"q025\",\"scale\":{\"zero\":false},\"title\":\"Deviation\",\"type\":\"quantitative\"},\"x2\":{\"field\":\"q975\"},\"y\":{\"axis\":{\"title\":null},\"field\":\"group\",\"title\":\"Group\",\"type\":\"nominal\"},\"yOffset\":{\"field\":\"sampler\",\"type\":\"nominal\"}},\"mark\":{\"strokeWidth\":1.5,\"type\":\"rule\"},\"params\":[{\"bind\":\"scales\",\"name\":\"grid\",\"select\":{\"encodings\":[\"x\"],\"type\":\"interval\"}},{\"bind\":\"legend\",\"name\":\"legend_selection\",\"select\":{\"fields\":[\"sampler\"],\"type\":\"point\"}}]},{\"_aovLegend\":{\"dimmed\":true,\"filtered\":false,\"opacity\":null,\"params\":[],\"transform\":[]},\"encoding\":{\"color\":{\"field\":\"sampler\",\"scale\":{\"domain\":[\"WarmupHMC · Julia\",\"NumPyro · JAX\"],\"range\":[\"#2a78d6\",\"#eb6834\"]},\"title\":\"Sampler\",\"type\":\"nominal\"},\"opacity\":{\"condition\":{\"test\":{\"and\":[{\"or\":[\"!isValid(datum[\\\"sampler\\\"])\",{\"empty\":true,\"param\":\"legend_selection\"}]}]},\"value\":1},\"value\":0.15},\"tooltip\":[{\"field\":\"q50\",\"title\":\"Deviation (estimate)\",\"type\":\"quantitative\"},{\"field\":\"group\",\"type\":\"nominal\"},{\"field\":\"sampler\",\"type\":\"nominal\"},{\"field\":\"q025\",\"title\":\"q025\",\"type\":\"quantitative\"},{\"field\":\"q975\",\"title\":\"q975\",\"type\":\"quantitative\"}],\"x\":{\"field\":\"q25\",\"scale\":{\"zero\":false},\"title\":\"Deviation\",\"type\":\"quantitative\"},\"x2\":{\"field\":\"q75\"},\"y\":{\"axis\":{\"title\":null},\"field\":\"group\",\"title\":\"Group\",\"type\":\"nominal\"},\"yOffset\":{\"field\":\"sampler\",\"type\":\"nominal\"}},\"mark\":{\"strokeWidth\":8.0,\"type\":\"rule\"}},{\"_aovLegend\":{\"dimmed\":true,\"filtered\":false,\"opacity\":null,\"params\":[],\"transform\":[]},\"encoding\":{\"opacity\":{\"condition\":{\"test\":{\"and\":[{\"or\":[\"!isValid(datum[\\\"sampler\\\"])\",{\"empty\":true,\"param\":\"legend_selection\"}]}]},\"value\":1},\"value\":0.15},\"tooltip\":[{\"field\":\"q50\",\"title\":\"Deviation (estimate)\",\"type\":\"quantitative\"},{\"field\":\"group\",\"type\":\"nominal\"},{\"field\":\"sampler\",\"type\":\"nominal\"},{\"field\":\"q025\",\"title\":\"q025\",\"type\":\"quantitative\"},{\"field\":\"q975\",\"title\":\"q975\",\"type\":\"quantitative\"}],\"x\":{\"field\":\"q50\",\"scale\":{\"zero\":false},\"type\":\"quantitative\"},\"y\":{\"field\":\"group\",\"type\":\"nominal\"},\"yOffset\":{\"field\":\"sampler\",\"type\":\"nominal\"}},\"mark\":{\"color\":\"white\",\"filled\":true,\"size\":80,\"stroke\":\"#333\",\"strokeWidth\":1.5,\"type\":\"point\"}}],\"width\":240},\"description\":\"Group intercept and slope deviations on the response scale. Both samplers give similar medians and central 50% and 95% intervals; groups retain their data labels.\"}","caption":"Group intercept and slope deviations on the response scale. Both samplers give similar medians and central 50% and 95% intervals; groups retain their data labels.","alt":"Group intercept and slope deviations on the response scale. Both samplers give similar medians and central 50% and 95% intervals; groups retain their data labels."}

These are deviations from the population intercept or slope, after transforming the standardized effects by their scales and correlation factor.

New designs ​

Use reprocess to keep fitted preprocessing when changing the design:

julia
training = varying_slopes_data().data
new_data = merge(training, (; x=training.x .+ 0.5))
replay = reprocess(rk, new_data)
replay_source = jax_source(replay.model, rk_bound_plan(replay); values=(:mu,))
replay_inputs = rk_bound_data(replay, replay_source)

The replay binds 320 predictor values.

A saved fitted state can also reconstruct a replay without the training rows: RKBRMI(builder(new_data), brm_fitted_state(rk)), where builder is the original data-free BRM builder. Collect its inputs with rk_bound_data(replay, replay_source) and pass them to prepare_data by name. A replay that omits a response needed by log_density is refused with a ContractValidationError; retaining that response and requesting values is different from exporting a response-free predictive program.

Reproduce

The reproduction notes cover the synthetic data, environment, cached fits, export limitations and value/gradient checks. Rebuilding this page exports the model and renders figures from the stored summaries; it does not repeat sampling.

sh
julia --startup-file=no --project=test test/setup_env.jl
RK_JAX_PYTHON=/path/to/python julia --startup-file=no --threads=1 --project=test research/jax/reproduce.jl
WarmupHMCNumPyro
keylegacy/8e47ee5aa54edadc9d5337d5fcf0b92366fe5fb00c56d8ca88f573db754315fb/nativelegacy/8e47ee5aa54edadc9d5337d5fcf0b92366fe5fb00c56d8ca88f573db754315fb/jax
key_contractLegacy cache signature covers emitted Python and encoded inputs; sampler settings recorded separately; no immutable research-driver snapshot was saved.Legacy cache signature covers emitted Python and encoded inputs; sampler settings recorded separately; no immutable research-driver snapshot was saved.
commit5e123ba714554d6fcc8434eef388e8973354599a5e123ba714554d6fcc8434eef388e8973354599a
commit_scopePackage base reconstructed from reflog; research drivers were uncommitted.Package base reconstructed from reflog; research drivers were uncommitted.
uncommitted_changesyes; untracked research scripts; exact contemporaneous diff unavailableyes; untracked research scripts; exact contemporaneous diff unavailable
started2026-11-10T22:41:56Z2026-11-10T22:41:56Z
started_scopewhole Julia command; sampler absolute start unavailablewhole Julia command; sampler absolute start unavailable
hosta Linux fleet hosta Linux fleet host
julia1.10.121.10.12
harnessresearch/jax/reproduce.jlresearch/jax/sample_numpyro.py
harness_versionuncommitted research driver; first captured in 99e4b1a16937d588f87b00c8a0eb630a2f660e15 after fittinguncommitted research driver; first captured in 99e4b1a16937d588f87b00c8a0eb630a2f660e15 after fitting
samplerWarmupHMC completion_warmup_mcmc on RK/Enzyme densityNumPyro NUTS on exported JAX density, x64, sequential chains
settings"{""chains"":4,""min_completed"":3,""n_draws"":1000,""monitor_ess"":true,""target_acceptance_rate"":0.8,""max_tree_depth"":10,""n_evaluations"":1000,""stepsize_adaptation_limit"":50,""nonlinear_adapt"":true,""completion_policy"":""finish_current_round""}""{""chains"":4,""warmup"":1000,""samples"":1000,""target_accept"":0.8,""chain_method"":""sequential""}"
seeddata Xoshiro(2026); original chain RNGs Xoshiro(101), Xoshiro(102), Xoshiro(103), Xoshiro(104)data Xoshiro(2026); NumPy default_rng(7) for initial positions; JAX PRNGKey(7) for sampling
seconds106.22737753715.246987581253052
seconds_scopeincludes initialization, compilation and adaptation; not a controlled speed comparisonincludes initialization, compilation and adaptation; not a controlled speed comparison
divergent00
omitted_chainsunavailable: one original slot omitted; compacted cache did not retain identitiesnone
chains_requested44
chains_kept34
draws_per_chain10001000
dimension5454
native_warmup_iterationsadaptive; not recordednot applicable
fit_command_exit1 after both fits and parity; reporting failed on an MCSE keyword, corrected without refitting1 after both fits and parity; reporting failed on an MCSE keyword, corrected without refitting
reporting_recovered2026-11-10T22:48:04Z command start; --reuse-draws, no sampler rerun2026-11-10T22:48:04Z command start; --reuse-draws, no sampler rerun
statuscompleted; provenance reconstructed from retained logs, caches and git reflogcompleted; provenance reconstructed from retained logs, caches and git reflog
BayesianRegressionModels0.2.2720.2.272
ReactiveKernels0.1.1430.1.143
ReactiveKernelsPPL0.1.1450.1.145
WarmupHMC0.2.110.2.11
python_version3.14.43.14.4
jax_version0.12.0.10.12.0.1
numpyro_version0.22.00.22.0
numpy_version2.5.42.5.4