Tutorial 7 — Bayesian Hierarchical Meta-d'¶
This tutorial uses exactly the same data as the
metadpy Bayesian tutorial
and comparison with HMeta-d toolbox (3-Comparison with the hmeta-d toolbox.ipynb; GitHub's notebook viewer currently fails to render this specific file due to an upstream metadata.widgets bug — download it directly to view)
notebook, so outputs can be compared directly.
| Section | Data | What runs |
|---|---|---|
| 1–3 | Canonical single-subject (nR_S1, nR_S2) |
MLE + all 3 Bayesian parameterizations |
| 4–6 | rm.txt (20 subjects × 2 conditions, metadpy dataset) |
Group MLE + group Bayesian |
metadpy reference values (from their published tutorial):
d1 = 1.534 ± 0.135,c1 = -0.006 ± 0.066,meta_d = 1.567 ± 0.201
Backend: fit_group(..., method='bayesian') delegates to
fit_meta_formula via cmdstanpy — no R required.
pip install cmdstanpy
python -c "import cmdstanpy; cmdstanpy.install_cmdstan()"
1. Setup¶
import warnings
warnings.filterwarnings("ignore")
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import arviz as az
from metasignal import stdpy
from metasignal.stdpy import fit_group
RNG = np.random.default_rng(42)
plt.rcParams.update({
"figure.dpi": 110,
"axes.spines.right": False,
"axes.spines.top": False,
"font.size": 11,
})
2. Canonical Dataset (same as metadpy tutorial)¶
From Fleming (2017) / metadpy Example 2 and Tutorial 3.
Single subject, 4 confidence levels → 8-element count arrays.
# Identical to metadpy tutorial data
nR_S1 = np.array([52, 32, 35, 37, 26, 12, 4, 2], dtype=float)
nR_S2 = np.array([ 2, 5, 15, 22, 33, 38, 40, 45], dtype=float)
n_ratings = 4
print("nR_S1:", nR_S1)
print("nR_S2:", nR_S2)
print(f"Total S1 trials: {nR_S1.sum():.0f} | Total S2 trials: {nR_S2.sum():.0f}")
nR_S1: [52. 32. 35. 37. 26. 12. 4. 2.] nR_S2: [ 2. 5. 15. 22. 33. 38. 40. 45.] Total S1 trials: 200 | Total S2 trials: 200
# Confidence histogram + Type-2 ROC (mirrors metadpy plotting style)
fig, axes = plt.subplots(1, 2, figsize=(11, 4))
ratings = np.arange(1, n_ratings + 1)
w = 0.35
ax = axes[0]
ax.bar(ratings - w/2, nR_S1[:n_ratings][::-1], w, label="CR", color="#4C72B0", alpha=0.85)
ax.bar(ratings - w/2, nR_S2[:n_ratings][::-1], w, label="Miss", color="#DD8452", alpha=0.85)
ax.bar(ratings + w/2, nR_S1[n_ratings:], w, label="FA", color="#4C72B0", alpha=0.45)
ax.bar(ratings + w/2, nR_S2[n_ratings:], w, label="Hit", color="#DD8452", alpha=0.45)
ax.set_xlabel("Confidence rating"); ax.set_ylabel("Count")
ax.set_title("Response counts (canonical dataset)")
ax.set_xticks(ratings); ax.legend(fontsize=9)
ax2 = axes[1]
n_S1, n_S2 = nR_S1.sum(), nR_S2.sum()
hr2 = [nR_S2[n_ratings:][k:].sum() / n_S2 for k in range(n_ratings)]
fr2 = [nR_S1[n_ratings:][k:].sum() / n_S1 for k in range(n_ratings)]
ax2.plot([0] + fr2[::-1] + [1], [0] + hr2[::-1] + [1], "o-", color="#4C72B0", lw=2, label="Type-2 ROC")
ax2.plot([0, 1], [0, 1], "k--", lw=0.8)
ax2.set_xlabel("Type-2 FA rate"); ax2.set_ylabel("Type-2 hit rate")
ax2.set_title("Type-2 ROC"); ax2.set_aspect("equal")
plt.tight_layout()
plt.show()
3. MLE Baseline¶
Compare metasignal MLE with metadpy's published values.
mle = stdpy.fit_meta_d_mle(nR_S1, nR_S2)
# metadpy published MLE values (Example 1 / Tutorial 2)
metadpy_mle = dict(dprime=1.5350, meta_d=1.6338, m_ratio=1.0643, m_diff=0.0988)
print("=== metasignal MLE ===")
print(f" da : {mle['da']:.4f}")
print(f" meta_da : {mle['meta_da']:.4f}")
print(f" M_ratio : {mle['M_ratio']:.4f}")
print(f" M_diff : {mle['M_diff']:.4f}")
print()
print("=== metadpy MLE (reference) ===")
for k, v in metadpy_mle.items():
print(f" {k:<10}: {v:.4f}")
print()
print(f"Δ M_ratio: {abs(mle['M_ratio'] - metadpy_mle['m_ratio']):.4f}")
print("(minor difference: equal- vs unequal-variance SDT parameterisation)")
=== metasignal MLE === da : 1.5444 meta_da : 1.6538 M_ratio : 1.0709 M_diff : 0.1095 === metadpy MLE (reference) === dprime : 1.5350 meta_d : 1.6338 m_ratio : 1.0643 m_diff : 0.0988 Δ M_ratio: 0.0066 (minor difference: equal- vs unequal-variance SDT parameterisation)
4. Bayesian Subject-Level — All Three Parameterizations¶
We call fit_group(nR_S1=..., nR_S2=..., method='bayesian') which delegates
to fit_meta_formula via cmdstanpy.
parameterization |
Model | Group parameter |
|---|---|---|
'mratio' |
Fleming (2017) HMeta-d | log M-ratio = log(meta-d'/d') |
'meta_noise' |
Maniscalco & Lau (2014) / Guggenmos (2022) | log σ_meta |
'casandre' |
Boundy-Singer et al. (2023) | log φ (meta-uncertainty) |
Comparison target (metadpy
Example 2, PyMC NUTS, 4 chains × 1000 draws):meta_d = 1.567 ± 0.201,d1 = 1.534 ± 0.135,c1 = -0.006 ± 0.066
# --- mratio (Fleming HMeta-d, same model as metadpy hmetad()) ---
fit_mratio = fit_group(
nR_S1=nR_S1, nR_S2=nR_S2, nRatings=n_ratings,
method="bayesian", parameterization="mratio",
chains=4, n_iter=2000, warmup=1000, seed=42,
)
print("mratio fit complete:", type(fit_mratio).__name__)
21:41:30 - cmdstanpy - INFO - CmdStan start processing
21:41:30 - cmdstanpy - INFO - CmdStan done processing.
mratio fit complete: FitResult
# --- meta_noise ---
fit_noise = fit_group(
nR_S1=nR_S1, nR_S2=nR_S2, nRatings=n_ratings,
method="bayesian", parameterization="meta_noise",
chains=4, n_iter=2000, warmup=1000, seed=42,
)
print("meta_noise fit complete:", type(fit_noise).__name__)
21:41:32 - cmdstanpy - INFO - CmdStan start processing
21:41:33 - cmdstanpy - INFO - CmdStan done processing.
meta_noise fit complete: FitResult
# --- casandre ---
fit_casandre = fit_group(
nR_S1=nR_S1, nR_S2=nR_S2, nRatings=n_ratings,
method="bayesian", parameterization="casandre",
chains=4, n_iter=2000, warmup=1000, seed=42,
)
print("casandre fit complete:", type(fit_casandre).__name__)
21:41:33 - cmdstanpy - INFO - CmdStan start processing
21:41:35 - cmdstanpy - INFO - CmdStan done processing.
casandre fit complete: FitResult
5. Posterior Summary — Comparison with metadpy¶
The mratio model is the direct Stan equivalent of metadpy's PyMC hmetad().
We compare the key parameters.
# ArviZ summary for the mratio model
if fit_mratio.idata is not None:
summary = az.summary(fit_mratio.idata, round_to=3)
print("=== mratio posterior summary ===")
print(summary.to_string())
else:
print("idata not available — check fit_mratio.r for raw Stan output")
=== mratio posterior summary ===
mean sd hdi_3% hdi_97% mcse_mean mcse_sd ess_bulk ess_tail r_hat
d1 1.537 0.136 1.301 1.803 0.002 0.002 6081.931 2795.146 1.000
c1 -0.008 0.068 -0.139 0.116 0.001 0.001 4421.861 3389.952 1.000
meta_d 1.573 0.201 1.212 1.959 0.003 0.003 4356.819 2958.426 1.000
cS1_offsets[0] 0.493 0.059 0.383 0.605 0.001 0.001 4884.383 3385.448 1.001
cS1_offsets[1] 0.965 0.084 0.809 1.119 0.001 0.001 4876.485 3441.421 1.002
cS1_offsets[2] 1.415 0.105 1.220 1.608 0.001 0.001 4875.111 3473.791 1.001
cS2_offsets[0] 0.505 0.061 0.393 0.621 0.001 0.001 4843.989 2831.307 1.001
cS2_offsets[1] 0.990 0.086 0.828 1.148 0.001 0.001 4066.323 3135.886 1.001
cS2_offsets[2] 1.538 0.109 1.334 1.741 0.002 0.002 4005.435 3551.483 1.001
cS1[0] -1.423 0.097 -1.603 -1.240 0.001 0.001 4869.747 3522.429 1.000
cS1[1] -0.973 0.083 -1.134 -0.822 0.001 0.001 5430.151 3355.449 1.000
cS1[2] -0.501 0.073 -0.637 -0.362 0.001 0.001 5444.049 3688.569 1.000
cS2[0] 0.497 0.073 0.360 0.634 0.001 0.001 5425.971 3459.620 1.001
cS2[1] 0.982 0.084 0.828 1.148 0.001 0.001 4830.183 3254.296 1.003
cS2[2] 1.530 0.101 1.351 1.729 0.002 0.001 4289.237 2872.267 1.000
Mratio 1.030 0.156 0.750 1.334 0.002 0.003 4503.100 2695.403 1.000
# Trace plots for mratio model
if fit_mratio.idata is not None:
az.plot_trace(fit_mratio.idata, compact=True)
plt.suptitle("mratio model — trace plots (canonical dataset)", y=1.01)
plt.tight_layout()
plt.show()
# metadpy published Bayesian posterior (Example 2, PyMC NUTS)
metadpy_bayes = {"meta_d": (1.567, 0.201), "d1": (1.534, 0.135), "c1": (-0.006, 0.066)}
print("Parameter comparison — metasignal (mratio/Stan) vs metadpy (PyMC):")
print(f"{'Parameter':<14} {'metasignal mean':>17} {'metadpy mean':>14} {'metadpy SD':>12}")
print("-" * 60)
if fit_mratio.idata is not None:
sumdf = az.summary(fit_mratio.idata, round_to=4)
for param, (ref_mean, ref_sd) in metadpy_bayes.items():
# try to find the variable in summary
matches = [v for v in sumdf.index if param in v.lower()]
our_mean = sumdf.loc[matches[0], "mean"] if matches else float("nan")
print(f"{param:<14} {our_mean:>17.3f} {ref_mean:>14.3f} {ref_sd:>12.3f}")
else:
print("(run cell above to get idata)")
print()
print("Both samplers use the same priors and multinomial SDT likelihood.")
print("Differences arise only from MCMC noise between NUTS samplers.")
Parameter comparison — metasignal (mratio/Stan) vs metadpy (PyMC): Parameter metasignal mean metadpy mean metadpy SD ------------------------------------------------------------ meta_d 1.573 1.567 0.201 d1 1.537 1.534 0.135 c1 -0.008 -0.006 0.066 Both samplers use the same priors and multinomial SDT likelihood. Differences arise only from MCMC noise between NUTS samplers.
# Posterior density overlay: mratio model vs metadpy reference
from scipy import stats as scipy_stats
metadpy_meta_d_mean, metadpy_meta_d_sd = 1.567, 0.201
x_m = np.linspace(0.8, 2.8, 400)
fig, axes = plt.subplots(1, 2, figsize=(12, 4.5))
# Extract mratio samples
if fit_mratio.idata is not None:
post = az.extract(fit_mratio.idata)
# find meta_d variable
meta_d_var = [v for v in post.data_vars if "meta" in v.lower()]
if meta_d_var:
our_meta_d = post[meta_d_var[0]].values.ravel()
else:
our_meta_d = None
else:
our_meta_d = None
# Simulate metadpy reference
ref_meta_d = RNG.normal(metadpy_meta_d_mean, metadpy_meta_d_sd, 4000)
ax = axes[0]
kde_ref = scipy_stats.gaussian_kde(ref_meta_d, bw_method=0.25)
ax.fill_between(x_m, kde_ref(x_m), alpha=0.35, color="#C44E52",
label="metadpy (PyMC reference)")
ax.plot(x_m, kde_ref(x_m), lw=2, color="#C44E52", ls="--")
if our_meta_d is not None:
kde_ours = scipy_stats.gaussian_kde(our_meta_d, bw_method=0.25)
ax.fill_between(x_m, kde_ours(x_m), alpha=0.35, color="#4C72B0",
label="metasignal mratio (Stan)")
ax.plot(x_m, kde_ours(x_m), lw=2, color="#4C72B0")
ax.axvline(mle["meta_da"], color="black", lw=1.5, ls=":",
label=f"MLE meta_da = {mle['meta_da']:.3f}")
ax.set_xlabel("meta-d'"); ax.set_ylabel("Density")
ax.set_title("meta-d' posterior")
ax.legend(fontsize=9)
# All 3 parameterizations: extract group meta parameter
ax = axes[1]
colors = {"mratio": "#4C72B0", "meta_noise": "#55A868", "casandre": "#DD8452"}
for label, fit_obj in [("mratio", fit_mratio), ("meta_noise", fit_noise), ("casandre", fit_casandre)]:
if fit_obj.idata is None:
continue
p = az.extract(fit_obj.idata)
# get the first group-level parameter
group_vars = [v for v in p.data_vars]
if not group_vars:
continue
vals = p[group_vars[0]].values.ravel()
if len(vals) == 0:
continue
x_range = np.linspace(vals.min() - 0.5, vals.max() + 0.5, 400)
kde = scipy_stats.gaussian_kde(vals, bw_method=0.3)
ax.fill_between(x_range, kde(x_range), alpha=0.25, color=colors[label])
ax.plot(x_range, kde(x_range), lw=2, color=colors[label], label=f"{label} ({group_vars[0]})")
ax.set_xlabel("Group-level parameter"); ax.set_ylabel("Density")
ax.set_title("All 3 parameterizations — group posterior")
ax.legend(fontsize=8)
plt.suptitle("Canonical dataset: metasignal Bayesian vs metadpy reference", fontsize=12, y=1.01)
plt.tight_layout()
plt.show()
6. Group-Level Analysis — rm Dataset¶
Same repeated-measures dataset as metadpy's group-level examples: 20 subjects × 2 conditions, ~100 trials each.
import pathlib
rm_path = pathlib.Path("rm.txt")
if not rm_path.exists():
rm_path = pathlib.Path(__file__).parent / "rm.txt" if "__file__" in dir() else pathlib.Path("docs/tutorials/rm.txt")
rm = pd.read_csv(rm_path)
print(rm.head())
print(f"\n{rm['Subject'].nunique()} subjects × {rm['Condition'].nunique()} conditions")
print(f"{len(rm)} total trials")
Stimuli Responses Accuracy Confidence nTrial Subject Condition 0 0 0 1 4 0 0 0 1 1 1 1 4 1 0 0 2 0 1 0 4 2 0 0 3 1 0 0 1 3 0 0 4 1 1 1 2 4 0 0 20 subjects × 2 conditions 4000 total trials
# MLE per subject × condition
mle_results = stdpy.fit_group(
rm,
stimuli="Stimuli", responses="Responses", confidence="Confidence",
nRatings=n_ratings, subject="Subject", within="Condition",
)
print(mle_results[["Subject", "Condition", "dprime", "meta_d", "M_ratio"]].to_string())
Subject Condition dprime meta_d M_ratio 0 0 0 1.001804 0.796462 0.795028 1 0 1 1.050540 0.880347 0.837994 2 1 0 1.167746 1.134184 0.993105 3 1 1 1.011783 0.908388 0.918209 4 2 0 0.826158 0.699682 0.864891 5 2 1 0.992099 0.410329 0.413596 6 3 0 1.107242 1.526084 1.408829 7 3 1 0.936864 0.889264 0.969679 8 4 0 0.995305 0.747512 0.751039 9 4 1 0.826158 0.703400 0.869486 10 5 0 0.941300 0.902319 0.979499 11 5 1 0.948826 0.864262 0.931105 12 6 0 1.001804 1.155290 1.178826 13 6 1 0.935398 1.058575 1.156023 14 7 0 1.048801 0.880394 0.839429 15 7 1 1.107242 0.677863 0.612209 16 8 0 0.941300 1.236445 1.342204 17 8 1 0.935398 0.535700 0.585015 18 9 0 0.936864 0.733926 0.783386 19 9 1 0.888322 0.509473 0.573523 20 10 0 1.174001 1.305821 1.137624 21 10 1 1.011783 0.495502 0.489732 22 11 0 0.959650 0.574656 0.598819 23 11 1 1.107242 -0.220691 -0.199316 24 12 0 0.936864 0.692985 0.739686 25 12 1 1.050540 0.510465 0.496597 26 13 0 1.001804 1.186415 1.210584 27 13 1 0.941300 1.246491 1.324222 28 14 0 0.857272 0.736640 0.879062 29 14 1 1.048801 0.104758 0.099884 30 15 0 0.888322 0.897940 1.032850 31 15 1 1.001804 0.519637 0.518701 32 16 0 1.111044 1.323661 1.217993 33 16 1 1.055809 -0.038430 -0.036398 34 17 0 1.107242 1.248881 1.152925 35 17 1 0.882859 0.644834 0.746089 36 18 0 1.111044 1.849473 1.701829 37 18 1 1.167746 1.486606 1.301689 38 19 0 0.948826 0.546544 0.588814 39 19 1 1.167746 0.710332 0.621975
# Per-condition MLE summary
summary = mle_results.groupby("Condition")[["dprime", "M_ratio", "meta_d"]].agg(["mean", "std"])
print(summary.round(3))
dprime M_ratio meta_d
mean std mean std mean std
Condition
0 1.003 0.100 1.010 0.286 1.009 0.343
1 1.003 0.093 0.662 0.404 0.645 0.406
# Violin + strip: MLE M-ratio by condition
fig, ax = plt.subplots(figsize=(6, 5))
for i, cond in enumerate(sorted(rm["Condition"].unique())):
vals = mle_results.loc[mle_results["Condition"] == cond, "M_ratio"].dropna().values
vals = vals[vals > 0]
parts = ax.violinplot([vals], positions=[i], widths=0.5,
showmeans=False, showmedians=False)
for body in parts["bodies"]:
body.set_facecolor(["#4C72B0", "#DD8452"][i])
body.set_alpha(0.4)
jitter = RNG.uniform(-0.06, 0.06, len(vals))
ax.scatter(np.full(len(vals), i) + jitter, vals,
color=["#4C72B0", "#DD8452"][i], s=30, zorder=3)
ax.axhline(vals.mean(), xmin=i/2 + 0.05, xmax=(i+1)/2 - 0.05,
color=["#4C72B0", "#DD8452"][i], lw=2, ls="--",
label=f"Cond {cond} mean = {vals.mean():.3f}")
ax.axhline(1.0, color="gray", lw=0.8, ls=":")
ax.set_xticks([0, 1]); ax.set_xticklabels(["Condition 0", "Condition 1"])
ax.set_ylabel("MLE M-ratio"); ax.set_title("Per-subject M-ratio by condition (rm dataset)")
ax.legend(fontsize=9)
plt.tight_layout()
plt.show()
7. Group Bayesian — mratio (rm dataset)¶
Fit a hierarchical mratio model across all subjects with Condition as a
between-/within-subject predictor.
# Fit separately per condition for interpretability (mirrors metadpy group tutorial)
cond0 = rm[rm["Condition"] == 0].copy()
cond1 = rm[rm["Condition"] == 1].copy()
fit_grp0 = fit_group(
cond0,
stimuli="Stimuli", responses="Responses", confidence="Confidence",
nRatings=n_ratings, subject="Subject",
method="bayesian", parameterization="mratio",
chains=4, n_iter=2000, warmup=1000, seed=42,
)
print("Condition 0 fit:", type(fit_grp0).__name__)
21:43:07 - cmdstanpy - INFO - CmdStan start processing
21:43:27 - cmdstanpy - INFO - CmdStan done processing.
21:43:27 - cmdstanpy - WARNING - Non-fatal error during sampling: Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[1] is -inf, but must be finite! (in 'hmeta_d.stan', line 221, column 8 to column 105) Exception: multinomial_logit_lpmf: log-probabilities parameter[1] is -inf, but must be finite! (in 'hmeta_d.stan', line 221, column 8 to column 105) Exception: multinomial_logit_lpmf: log-probabilities parameter[4] is -inf, but must be finite! (in 'hmeta_d.stan', line 221, column 8 to column 105) Exception: normal_lpdf: Location parameter is inf, but must be finite! (in 'hmeta_d.stan', line 164, column 8 to column 49) Exception: multinomial_logit_lpmf: log-probabilities parameter[1] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[4] is -inf, but must be finite! (in 'hmeta_d.stan', line 221, column 8 to column 105) Exception: normal_lcdf: Location parameter is inf, but must be finite! (in 'hmeta_d.stan', line 189, column 8 to column 52) Exception: multinomial_logit_lpmf: log-probabilities parameter[1] is -inf, but must be finite! (in 'hmeta_d.stan', line 221, column 8 to column 105) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[1] is -inf, but must be finite! (in 'hmeta_d.stan', line 221, column 8 to column 105) Exception: multinomial_logit_lpmf: log-probabilities parameter[3] is -inf, but must be finite! (in 'hmeta_d.stan', line 221, column 8 to column 105) Exception: normal_lpdf: Location parameter is inf, but must be finite! (in 'hmeta_d.stan', line 164, column 8 to column 49) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 221, column 8 to column 105) Exception: multinomial_logit_lpmf: log-probabilities parameter[1] is -inf, but must be finite! (in 'hmeta_d.stan', line 221, column 8 to column 105) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[1] is -inf, but must be finite! (in 'hmeta_d.stan', line 221, column 8 to column 105) Exception: multinomial_logit_lpmf: log-probabilities parameter[4] is -inf, but must be finite! (in 'hmeta_d.stan', line 221, column 8 to column 105) Exception: normal_lpdf: Location parameter is inf, but must be finite! (in 'hmeta_d.stan', line 164, column 8 to column 49) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[4] is -inf, but must be finite! (in 'hmeta_d.stan', line 221, column 8 to column 105) Exception: multinomial_logit_lpmf: log-probabilities parameter[1] is -inf, but must be finite! (in 'hmeta_d.stan', line 221, column 8 to column 105) Exception: multinomial_logit_lpmf: log-probabilities parameter[4] is -inf, but must be finite! (in 'hmeta_d.stan', line 221, column 8 to column 105) Exception: multinomial_logit_lpmf: log-probabilities parameter[1] is -inf, but must be finite! (in 'hmeta_d.stan', line 221, column 8 to column 105) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[1] is -inf, but must be finite! (in 'hmeta_d.stan', line 221, column 8 to column 105) Exception: multinomial_logit_lpmf: log-probabilities parameter[1] is -inf, but must be finite! (in 'hmeta_d.stan', line 221, column 8 to column 105) Exception: normal_lpdf: Location parameter is inf, but must be finite! (in 'hmeta_d.stan', line 164, column 8 to column 49) Exception: multinomial_logit_lpmf: log-probabilities parameter[1] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[4] is -inf, but must be finite! (in 'hmeta_d.stan', line 221, column 8 to column 105) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Consider re-running with show_console=True if the above output is unclear!
Condition 0 fit: FitResult
fit_grp1 = fit_group(
cond1,
stimuli="Stimuli", responses="Responses", confidence="Confidence",
nRatings=n_ratings, subject="Subject",
method="bayesian", parameterization="mratio",
chains=4, n_iter=2000, warmup=1000, seed=42,
)
print("Condition 1 fit:", type(fit_grp1).__name__)
21:43:27 - cmdstanpy - INFO - CmdStan start processing
21:43:53 - cmdstanpy - INFO - CmdStan done processing.
21:43:53 - cmdstanpy - WARNING - Non-fatal error during sampling: Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[1] is -inf, but must be finite! (in 'hmeta_d.stan', line 221, column 8 to column 105) Exception: multinomial_logit_lpmf: log-probabilities parameter[1] is -inf, but must be finite! (in 'hmeta_d.stan', line 221, column 8 to column 105) Exception: normal_lpdf: Location parameter is inf, but must be finite! (in 'hmeta_d.stan', line 164, column 8 to column 49) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[1] is -inf, but must be finite! (in 'hmeta_d.stan', line 221, column 8 to column 105) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[1] is -inf, but must be finite! (in 'hmeta_d.stan', line 221, column 8 to column 105) Exception: normal_lpdf: Location parameter is inf, but must be finite! (in 'hmeta_d.stan', line 164, column 8 to column 49) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[4] is -inf, but must be finite! (in 'hmeta_d.stan', line 221, column 8 to column 105) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[1] is -inf, but must be finite! (in 'hmeta_d.stan', line 221, column 8 to column 105) Exception: normal_lpdf: Location parameter is inf, but must be finite! (in 'hmeta_d.stan', line 164, column 8 to column 49) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[1] is -inf, but must be finite! (in 'hmeta_d.stan', line 221, column 8 to column 105) Exception: normal_lcdf: Location parameter is -inf, but must be finite! (in 'hmeta_d.stan', line 189, column 8 to column 52) Exception: multinomial_logit_lpmf: log-probabilities parameter[1] is -inf, but must be finite! (in 'hmeta_d.stan', line 221, column 8 to column 105) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[1] is -inf, but must be finite! (in 'hmeta_d.stan', line 221, column 8 to column 105) Exception: normal_lpdf: Location parameter is inf, but must be finite! (in 'hmeta_d.stan', line 164, column 8 to column 49) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Exception: multinomial_logit_lpmf: log-probabilities parameter[2] is -inf, but must be finite! (in 'hmeta_d.stan', line 220, column 8 to column 104) Consider re-running with show_console=True if the above output is unclear!
21:43:53 - cmdstanpy - WARNING - Some chains may have failed to converge. Chain 2 had 5 divergent transitions (0.5%) Chain 3 had 3 divergent transitions (0.3%) Chain 4 had 1 divergent transitions (0.1%) Use the "diagnose()" method on the CmdStanMCMC object to see further information.
Condition 1 fit: FitResult
# Posterior summaries
for label, fit_obj in [("Condition 0", fit_grp0), ("Condition 1", fit_grp1)]:
if fit_obj.idata is not None:
print(f"\n=== {label} ===")
print(az.summary(fit_obj.idata, round_to=3).to_string())
=== Condition 0 ===
mean sd hdi_3% hdi_97% mcse_mean mcse_sd ess_bulk ess_tail r_hat mu_d1 0.997 0.061 0.883 1.111 0.001 0.001 5962.616 3430.514 1.000 sigma_d1 0.057 0.044 0.000 0.135 0.001 0.001 2669.280 2199.950 1.000 d1_z[0] -0.060 0.959 -1.833 1.790 0.011 0.019 7268.657 2671.177 1.003 d1_z[1] 0.152 0.969 -1.689 1.927 0.011 0.020 7458.055 2946.436 1.004 d1_z[2] -0.228 0.965 -2.218 1.444 0.011 0.016 7375.839 2989.221 1.000 d1_z[3] 0.239 0.951 -1.500 1.997 0.010 0.016 8345.298 2829.070 1.000 d1_z[4] -0.084 0.982 -1.931 1.659 0.013 0.018 5703.472 2347.803 0.999 d1_z[5] -0.091 0.993 -1.990 1.740 0.012 0.022 7017.681 2298.342 1.001 d1_z[6] 0.021 0.967 -1.708 1.909 0.012 0.017 6850.336 2955.540 1.001 d1_z[7] 0.010 0.955 -1.751 1.799 0.012 0.017 5889.177 2622.712 1.000 d1_z[8] 0.030 0.963 -1.803 1.861 0.010 0.018 9104.857 2584.817 1.002 d1_z[9] -0.131 0.961 -1.954 1.667 0.011 0.019 7464.914 2643.555 1.002 d1_z[10] 0.182 0.940 -1.588 1.994 0.010 0.017 8253.277 2825.018 1.001 d1_z[11] -0.159 0.972 -2.115 1.527 0.011 0.017 7182.972 3031.027 1.002 d1_z[12] -0.153 0.979 -1.962 1.696 0.011 0.016 8063.431 3066.571 1.002 d1_z[13] 0.048 0.960 -1.790 1.887 0.012 0.020 6115.981 2471.136 1.004 d1_z[14] -0.201 0.964 -2.005 1.594 0.011 0.016 8063.818 3099.032 1.000 d1_z[15] -0.089 0.904 -1.778 1.549 0.011 0.015 6951.024 3344.802 1.000 d1_z[16] 0.149 0.962 -1.722 1.887 0.011 0.017 7122.857 2987.552 1.001 d1_z[17] 0.154 0.984 -1.663 2.024 0.013 0.019 6184.501 2426.768 1.001 d1_z[18] 0.307 0.969 -1.544 2.056 0.012 0.017 6411.005 3005.289 1.000 d1_z[19] -0.160 0.969 -1.903 1.674 0.011 0.017 7400.244 3180.264 1.001 mu_c1 -0.017 0.031 -0.074 0.045 0.000 0.000 4851.013 3203.680 1.000 sigma_c1 0.058 0.040 0.000 0.127 0.001 0.001 1336.682 1835.819 1.001 c1_z[0] -0.281 0.937 -2.040 1.452 0.013 0.017 5136.060 2869.890 1.000 c1_z[1] -0.173 0.896 -1.952 1.476 0.012 0.015 5932.738 3011.009 1.002 c1_z[2] -0.186 0.909 -1.778 1.648 0.011 0.016 6480.806 2759.638 1.000 c1_z[3] -0.098 0.894 -1.772 1.579 0.011 0.016 7168.368 2987.037 1.002 c1_z[4] -0.159 0.886 -1.840 1.436 0.011 0.015 6792.033 2945.306 1.001 c1_z[5] -0.103 0.896 -1.748 1.588 0.010 0.016 8516.260 3164.701 1.002 c1_z[6] 0.517 0.952 -1.324 2.237 0.012 0.017 6058.094 2662.189 1.000 c1_z[7] 0.109 0.902 -1.712 1.708 0.013 0.016 5201.402 2615.529 1.001 c1_z[8] -0.207 0.892 -1.941 1.389 0.011 0.016 7007.416 3106.876 1.002 c1_z[9] -0.203 0.903 -1.944 1.440 0.011 0.016 6970.716 2611.453 1.001 c1_z[10] 0.418 0.929 -1.300 2.191 0.012 0.016 5733.166 3066.503 1.002 c1_z[11] -0.551 0.943 -2.343 1.223 0.013 0.014 5336.364 3120.551 1.001 c1_z[12] 0.203 0.911 -1.499 1.879 0.012 0.016 5934.583 2904.188 1.001 c1_z[13] 0.330 0.892 -1.418 1.911 0.011 0.015 6817.407 2984.144 1.000 c1_z[14] 0.899 0.995 -0.974 2.817 0.015 0.015 4237.545 2955.049 1.002 c1_z[15] 0.315 0.915 -1.399 2.024 0.011 0.019 6431.179 2435.133 1.001 c1_z[16] -0.161 0.901 -1.938 1.504 0.011 0.016 6176.923 3065.140 1.000 c1_z[17] -0.114 0.870 -1.684 1.593 0.012 0.017 5707.436 2753.485 1.003 c1_z[18] -0.303 0.948 -1.977 1.584 0.012 0.017 6020.549 2727.020 1.001 c1_z[19] -0.291 0.901 -2.012 1.403 0.012 0.016 5971.503 2831.900 1.001 alpha_logMratio -0.004 0.111 -0.215 0.192 0.002 0.002 4827.642 3134.643 1.001 sigma_logMratio 0.121 0.093 0.000 0.294 0.002 0.002 2128.775 2598.946 1.002 logMratio_z[0] -0.129 0.961 -1.885 1.736 0.011 0.017 8271.770 2974.891 1.003 logMratio_z[1] 0.081 0.942 -1.736 1.834 0.010 0.017 8241.494 2859.736 1.003 logMratio_z[2] -0.203 0.941 -1.923 1.577 0.011 0.016 7494.107 2684.686 1.002 logMratio_z[3] 0.376 0.980 -1.449 2.201 0.012 0.017 6364.190 2682.382 1.001 logMratio_z[4] -0.136 0.968 -1.911 1.715 0.011 0.018 7750.401 3013.068 1.005 logMratio_z[5] -0.028 0.967 -1.781 1.824 0.011 0.018 8432.598 2897.674 1.002 logMratio_z[6] 0.033 0.952 -1.646 1.840 0.010 0.017 8520.494 2954.370 0.999 logMratio_z[7] -0.092 0.926 -1.783 1.709 0.011 0.018 7745.987 2938.893 1.001 logMratio_z[8] 0.119 0.972 -1.645 2.015 0.011 0.019 7440.214 2783.535 1.002 logMratio_z[9] -0.199 0.965 -2.059 1.521 0.011 0.017 7555.503 3025.703 1.002 logMratio_z[10] 0.142 0.928 -1.588 1.848 0.011 0.016 7291.406 3027.254 1.003 logMratio_z[11] -0.280 0.950 -2.043 1.557 0.011 0.017 7430.195 2817.848 1.000 logMratio_z[12] -0.213 0.940 -2.095 1.457 0.010 0.017 8557.031 2880.444 1.001 logMratio_z[13] 0.108 0.922 -1.597 1.805 0.012 0.015 6058.000 3078.919 1.000 logMratio_z[14] -0.192 0.922 -1.910 1.574 0.010 0.016 8664.040 2870.367 1.000 logMratio_z[15] -0.019 0.950 -1.852 1.708 0.011 0.016 7972.500 3158.300 1.000 logMratio_z[16] 0.198 0.953 -1.662 1.916 0.012 0.017 6823.566 3008.839 1.001 logMratio_z[17] 0.151 0.917 -1.580 1.865 0.011 0.016 6638.913 3360.163 1.002 logMratio_z[18] 0.537 1.001 -1.359 2.409 0.013 0.016 6274.039 3001.951 1.000 logMratio_z[19] -0.227 0.929 -1.827 1.683 0.011 0.017 7170.145 2944.685 1.001 mu_c2 1.005 0.046 0.909 1.086 0.001 0.001 5087.315 3328.612 1.000 sigma_c2 0.460 0.034 0.399 0.525 0.000 0.001 5969.464 3048.409 0.999 cS1_offsets[0, 0] 0.416 0.100 0.237 0.605 0.001 0.002 7057.611 2618.434 1.001 cS1_offsets[0, 1] 1.038 0.137 0.776 1.291 0.002 0.002 6528.458 2703.035 1.000 cS1_offsets[0, 2] 1.485 0.166 1.174 1.790 0.002 0.003 6291.434 3091.426 1.001 cS1_offsets[1, 0] 0.590 0.107 0.393 0.799 0.001 0.002 6466.135 2433.926 1.002 cS1_offsets[1, 1] 1.033 0.133 0.770 1.269 0.002 0.002 7436.312 2990.761 1.001 cS1_offsets[1, 2] 1.665 0.185 1.323 2.025 0.002 0.003 7425.107 3068.666 1.000 cS1_offsets[2, 0] 0.682 0.107 0.492 0.888 0.002 0.002 4655.851 2890.211 1.000 cS1_offsets[2, 1] 1.145 0.139 0.882 1.409 0.002 0.002 5631.089 2960.887 1.001 cS1_offsets[2, 2] 1.758 0.196 1.409 2.126 0.003 0.003 5568.246 3116.229 0.999 cS1_offsets[3, 0] 0.527 0.101 0.341 0.727 0.001 0.002 6323.008 2796.745 1.000 cS1_offsets[3, 1] 0.929 0.125 0.709 1.172 0.002 0.002 5690.867 3245.121 1.002 cS1_offsets[3, 2] 1.422 0.162 1.147 1.747 0.002 0.003 6344.644 3315.519 1.001 cS1_offsets[4, 0] 0.570 0.103 0.389 0.761 0.001 0.002 6033.824 2668.098 1.002 cS1_offsets[4, 1] 0.945 0.125 0.724 1.191 0.002 0.002 6262.593 3181.442 1.001 cS1_offsets[4, 2] 1.400 0.159 1.114 1.703 0.002 0.003 5580.955 3010.376 1.001 cS1_offsets[5, 0] 0.534 0.104 0.343 0.725 0.001 0.002 6199.053 2708.359 1.001 cS1_offsets[5, 1] 0.962 0.130 0.714 1.198 0.002 0.002 6338.190 3257.336 1.000 cS1_offsets[5, 2] 1.365 0.154 1.074 1.643 0.002 0.002 7072.443 3453.787 1.000 cS1_offsets[6, 0] 0.295 0.079 0.148 0.441 0.001 0.001 6619.701 2545.313 1.002 cS1_offsets[6, 1] 0.726 0.112 0.521 0.929 0.001 0.002 5644.376 2898.588 1.000 cS1_offsets[6, 2] 1.503 0.158 1.215 1.802 0.002 0.002 5316.838 3383.876 1.002 cS1_offsets[7, 0] 0.401 0.095 0.230 0.580 0.001 0.002 7104.439 2742.488 1.000 cS1_offsets[7, 1] 1.000 0.131 0.771 1.260 0.002 0.002 6044.187 3137.394 1.000 cS1_offsets[7, 2] 1.453 0.165 1.164 1.769 0.002 0.003 6092.101 3339.114 1.000 cS1_offsets[8, 0] 0.581 0.106 0.389 0.779 0.001 0.002 6178.086 2956.415 1.001 cS1_offsets[8, 1] 1.171 0.140 0.914 1.439 0.002 0.002 6650.092 3300.189 1.001 cS1_offsets[8, 2] 1.494 0.169 1.181 1.824 0.002 0.003 5955.043 3134.272 1.002 cS1_offsets[9, 0] 0.546 0.102 0.358 0.732 0.001 0.002 6639.922 2927.647 1.003 cS1_offsets[9, 1] 1.034 0.133 0.787 1.290 0.002 0.002 6480.330 3066.886 1.000 cS1_offsets[9, 2] 1.667 0.185 1.327 2.018 0.002 0.003 6290.169 3212.298 1.002 cS1_offsets[10, 0] 0.382 0.087 0.224 0.547 0.001 0.002 6651.261 2717.008 1.000 cS1_offsets[10, 1] 0.856 0.117 0.630 1.072 0.001 0.002 6110.954 3307.810 1.000 cS1_offsets[10, 2] 1.600 0.164 1.301 1.912 0.002 0.002 5518.251 3102.541 1.000 cS1_offsets[11, 0] 0.729 0.122 0.499 0.958 0.002 0.002 5630.839 2501.858 1.000 cS1_offsets[11, 1] 1.094 0.143 0.826 1.352 0.002 0.002 5551.857 3419.153 1.001 cS1_offsets[11, 2] 1.489 0.176 1.181 1.839 0.002 0.003 6153.372 2852.985 1.002 cS1_offsets[12, 0] 0.461 0.095 0.279 0.635 0.001 0.001 6243.495 3001.816 1.000 cS1_offsets[12, 1] 0.968 0.123 0.739 1.195 0.002 0.002 6107.366 3134.709 1.001 cS1_offsets[12, 2] 1.489 0.163 1.184 1.788 0.002 0.003 7176.556 2938.602 1.001 cS1_offsets[13, 0] 0.511 0.096 0.341 0.701 0.001 0.001 6509.971 3162.390 1.001 cS1_offsets[13, 1] 1.157 0.134 0.902 1.410 0.002 0.002 6582.009 3030.816 1.001 cS1_offsets[13, 2] 1.661 0.176 1.333 1.990 0.002 0.003 6724.167 3327.813 1.000 cS1_offsets[14, 0] 0.460 0.090 0.304 0.640 0.001 0.002 5529.161 2933.014 1.000 cS1_offsets[14, 1] 0.936 0.118 0.713 1.152 0.002 0.002 5704.883 2959.060 1.000 cS1_offsets[14, 2] 1.197 0.135 0.947 1.453 0.002 0.002 5671.546 3350.647 1.001 cS1_offsets[15, 0] 0.455 0.089 0.303 0.630 0.001 0.001 5665.255 2788.201 1.000 cS1_offsets[15, 1] 1.090 0.128 0.846 1.324 0.002 0.002 6181.757 3066.002 1.002 cS1_offsets[15, 2] 1.447 0.155 1.155 1.737 0.002 0.002 6666.289 3120.676 1.000 cS1_offsets[16, 0] 0.431 0.099 0.253 0.621 0.001 0.002 6683.746 2722.489 1.005 cS1_offsets[16, 1] 0.880 0.127 0.649 1.121 0.002 0.002 6594.003 2973.640 1.000 cS1_offsets[16, 2] 1.528 0.173 1.201 1.846 0.002 0.003 6116.969 3091.795 1.000 cS1_offsets[17, 0] 0.406 0.091 0.230 0.569 0.001 0.002 5830.899 2884.534 1.001 cS1_offsets[17, 1] 0.980 0.128 0.742 1.221 0.002 0.002 6150.957 2963.000 1.000 cS1_offsets[17, 2] 1.673 0.187 1.344 2.042 0.002 0.003 6681.207 3250.625 1.001 cS1_offsets[18, 0] 0.546 0.105 0.338 0.730 0.001 0.002 6785.555 3325.815 1.001 cS1_offsets[18, 1] 1.173 0.144 0.895 1.438 0.002 0.002 6313.905 3296.375 1.000 cS1_offsets[18, 2] 1.769 0.198 1.410 2.151 0.002 0.003 6286.288 3182.170 1.000 cS1_offsets[19, 0] 0.559 0.110 0.354 0.764 0.001 0.002 5526.684 3042.398 1.001 cS1_offsets[19, 1] 1.040 0.140 0.793 1.317 0.002 0.002 6196.154 3109.807 0.999 cS1_offsets[19, 2] 1.423 0.163 1.127 1.737 0.002 0.003 6248.918 2942.929 1.000 cS2_offsets[0, 0] 0.370 0.084 0.221 0.532 0.001 0.001 6483.108 2640.571 1.002 cS2_offsets[0, 1] 0.964 0.120 0.745 1.192 0.001 0.002 6219.698 2686.419 1.001 cS2_offsets[0, 2] 1.390 0.149 1.123 1.685 0.002 0.002 6285.240 3191.981 1.000 cS2_offsets[1, 0] 0.403 0.089 0.244 0.576 0.001 0.001 6868.933 2920.747 1.002 cS2_offsets[1, 1] 1.022 0.133 0.779 1.277 0.002 0.002 6360.068 2801.557 1.002 cS2_offsets[1, 2] 1.450 0.160 1.161 1.750 0.002 0.003 6745.979 3066.313 1.000 cS2_offsets[2, 0] 0.462 0.095 0.281 0.632 0.001 0.002 7430.235 2933.003 1.002 cS2_offsets[2, 1] 0.976 0.123 0.746 1.209 0.002 0.002 6290.460 3177.024 1.000 cS2_offsets[2, 2] 1.399 0.151 1.112 1.666 0.002 0.002 6130.093 3318.203 1.000 cS2_offsets[3, 0] 0.305 0.084 0.152 0.462 0.001 0.001 6668.953 2856.327 1.001 cS2_offsets[3, 1] 0.701 0.114 0.496 0.921 0.001 0.002 6013.935 2821.001 1.000 cS2_offsets[3, 2] 1.078 0.135 0.823 1.332 0.002 0.002 5603.156 3204.260 0.999 cS2_offsets[4, 0] 0.469 0.094 0.292 0.642 0.001 0.002 6595.890 3017.514 1.000 cS2_offsets[4, 1] 1.040 0.124 0.810 1.269 0.002 0.002 6531.290 3109.124 1.002 cS2_offsets[4, 2] 1.361 0.147 1.083 1.626 0.002 0.002 5843.890 3128.581 1.002 cS2_offsets[5, 0] 0.544 0.095 0.377 0.726 0.001 0.002 6140.240 2908.078 1.000 cS2_offsets[5, 1] 1.094 0.130 0.859 1.348 0.002 0.002 5940.904 2936.019 1.002 cS2_offsets[5, 2] 1.692 0.176 1.364 2.017 0.002 0.003 5763.843 3035.730 1.000 cS2_offsets[6, 0] 0.524 0.104 0.331 0.716 0.001 0.002 6590.998 3235.103 1.000 cS2_offsets[6, 1] 1.061 0.140 0.811 1.332 0.002 0.002 6220.041 3124.814 1.002 cS2_offsets[6, 2] 2.097 0.244 1.610 2.523 0.003 0.004 6249.029 3119.350 1.000 cS2_offsets[7, 0] 0.661 0.110 0.448 0.858 0.001 0.002 6169.150 2936.448 1.001 cS2_offsets[7, 1] 0.955 0.127 0.711 1.181 0.002 0.002 6699.701 3236.828 1.001 cS2_offsets[7, 2] 1.604 0.175 1.272 1.920 0.002 0.003 5744.851 2901.165 1.000 cS2_offsets[8, 0] 0.610 0.103 0.416 0.799 0.001 0.002 6666.153 3136.750 1.003 cS2_offsets[8, 1] 1.096 0.132 0.867 1.363 0.002 0.002 6441.177 3362.703 1.001 cS2_offsets[8, 2] 1.743 0.183 1.393 2.078 0.002 0.003 6641.334 3452.377 1.002 cS2_offsets[9, 0] 0.392 0.089 0.233 0.564 0.001 0.002 5932.252 3004.041 1.005 cS2_offsets[9, 1] 0.861 0.122 0.641 1.093 0.001 0.002 6976.444 3112.219 1.000 cS2_offsets[9, 2] 1.423 0.156 1.139 1.711 0.002 0.002 6967.649 3271.770 1.000 cS2_offsets[10, 0] 0.560 0.107 0.362 0.760 0.001 0.002 6814.818 3526.481 1.001 cS2_offsets[10, 1] 1.202 0.144 0.952 1.493 0.002 0.002 5627.561 2846.159 1.001 cS2_offsets[10, 2] 1.483 0.170 1.180 1.824 0.002 0.003 5716.351 2975.564 1.000 cS2_offsets[11, 0] 0.422 0.088 0.270 0.598 0.001 0.002 6540.446 2906.741 1.001 cS2_offsets[11, 1] 0.896 0.116 0.684 1.116 0.002 0.002 5922.540 2997.224 1.001 cS2_offsets[11, 2] 1.368 0.148 1.099 1.651 0.002 0.002 6175.037 3352.391 1.001 cS2_offsets[12, 0] 0.622 0.110 0.420 0.827 0.001 0.002 5503.157 2633.185 1.002 cS2_offsets[12, 1] 0.987 0.130 0.756 1.243 0.002 0.002 6633.614 3361.332 1.000 cS2_offsets[12, 2] 1.448 0.160 1.138 1.738 0.002 0.003 6205.183 2960.318 1.003 cS2_offsets[13, 0] 0.636 0.111 0.434 0.850 0.001 0.002 6201.049 2344.717 1.002 cS2_offsets[13, 1] 1.095 0.141 0.818 1.343 0.002 0.002 5875.352 3045.103 1.003 cS2_offsets[13, 2] 1.348 0.159 1.052 1.647 0.002 0.002 6195.672 3090.926 1.002 cS2_offsets[14, 0] 0.675 0.117 0.465 0.897 0.002 0.002 5698.490 3223.055 1.000 cS2_offsets[14, 1] 1.333 0.162 1.029 1.632 0.002 0.002 4991.385 2761.632 1.003 cS2_offsets[14, 2] 1.852 0.234 1.421 2.299 0.003 0.004 5357.844 2901.842 1.001 cS2_offsets[15, 0] 0.436 0.099 0.242 0.613 0.001 0.002 7150.734 3062.383 0.999 cS2_offsets[15, 1] 1.043 0.139 0.785 1.297 0.002 0.002 6232.009 3204.318 1.003 cS2_offsets[15, 2] 1.401 0.165 1.100 1.711 0.002 0.003 6404.587 3486.219 1.000 cS2_offsets[16, 0] 0.526 0.098 0.345 0.708 0.001 0.002 6489.051 2932.876 1.000 cS2_offsets[16, 1] 1.102 0.133 0.863 1.353 0.002 0.002 6496.286 2634.398 1.000 cS2_offsets[16, 2] 1.516 0.164 1.225 1.839 0.002 0.003 7101.420 3294.869 1.001 cS2_offsets[17, 0] 0.500 0.101 0.311 0.688 0.001 0.002 7302.463 2687.556 1.001 cS2_offsets[17, 1] 1.025 0.130 0.784 1.259 0.002 0.002 5588.241 3161.472 1.001 cS2_offsets[17, 2] 1.359 0.151 1.084 1.646 0.002 0.003 5874.699 3018.652 1.000 cS2_offsets[18, 0] 0.466 0.098 0.285 0.649 0.001 0.002 6378.210 3082.753 1.000 cS2_offsets[18, 1] 0.805 0.120 0.581 1.034 0.002 0.002 5847.478 2891.874 1.001 cS2_offsets[18, 2] 1.202 0.145 0.933 1.476 0.002 0.002 5713.411 2714.326 1.001 cS2_offsets[19, 0] 0.417 0.087 0.251 0.579 0.001 0.002 6640.470 3022.366 1.002 cS2_offsets[19, 1] 0.900 0.113 0.710 1.131 0.001 0.002 6100.745 3315.545 1.002 cS2_offsets[19, 2] 1.513 0.157 1.222 1.804 0.002 0.002 6358.929 3242.561 1.000 d1[0] 0.992 0.085 0.836 1.155 0.001 0.002 5414.381 3106.489 1.000 d1[1] 1.008 0.086 0.846 1.162 0.001 0.002 5257.847 3444.420 1.001 d1[2] 0.978 0.090 0.808 1.145 0.001 0.002 4983.952 3308.310 1.001 d1[3] 1.017 0.086 0.849 1.174 0.001 0.002 5865.750 3639.525 1.000 d1[4] 0.989 0.087 0.823 1.156 0.001 0.002 5280.525 3052.094 1.000 d1[5] 0.990 0.086 0.826 1.146 0.001 0.002 5321.036 3322.321 1.001 d1[6] 0.998 0.086 0.833 1.153 0.001 0.002 5176.754 3181.077 1.001 d1[7] 0.997 0.085 0.839 1.162 0.001 0.001 5169.427 3489.391 1.000 d1[8] 0.999 0.086 0.843 1.166 0.001 0.002 5364.540 3485.249 1.000 d1[9] 0.986 0.087 0.810 1.139 0.001 0.001 5394.315 3134.444 1.000 d1[10] 1.013 0.087 0.844 1.167 0.001 0.002 5972.276 3520.009 1.001 d1[11] 0.983 0.089 0.815 1.152 0.001 0.002 5206.275 3218.459 1.000 d1[12] 0.985 0.086 0.818 1.142 0.001 0.002 5506.654 3331.689 1.000 d1[13] 1.000 0.085 0.834 1.153 0.001 0.002 5504.614 3220.104 1.000 d1[14] 0.980 0.089 0.812 1.147 0.001 0.002 5319.434 3301.542 1.000 d1[15] 0.990 0.083 0.834 1.146 0.001 0.001 5527.938 3275.365 1.000 d1[16] 1.010 0.086 0.854 1.173 0.001 0.001 5535.423 3371.033 1.001 d1[17] 1.009 0.088 0.842 1.174 0.001 0.002 5823.682 2982.596 1.000 d1[18] 1.023 0.090 0.854 1.186 0.001 0.002 5442.795 3277.701 1.000 d1[19] 0.984 0.088 0.808 1.140 0.001 0.002 5659.071 3214.764 1.001 c1[0] -0.039 0.063 -0.162 0.078 0.001 0.001 3856.641 3195.936 1.000 c1[1] -0.030 0.060 -0.154 0.081 0.001 0.001 5060.197 3688.377 1.000 c1[2] -0.031 0.061 -0.157 0.078 0.001 0.001 4875.500 2806.327 1.000 c1[3] -0.025 0.060 -0.139 0.098 0.001 0.001 6089.488 3201.181 1.000 c1[4] -0.029 0.058 -0.158 0.070 0.001 0.001 5279.538 3535.073 1.001 c1[5] -0.025 0.061 -0.144 0.092 0.001 0.001 6697.841 3505.418 1.002 c1[6] 0.022 0.068 -0.089 0.167 0.001 0.001 3743.827 3374.723 1.000 c1[7] -0.009 0.061 -0.119 0.117 0.001 0.001 5693.290 3513.037 1.000 c1[8] -0.033 0.060 -0.152 0.083 0.001 0.001 5827.362 3373.225 1.001 c1[9] -0.032 0.063 -0.163 0.081 0.001 0.001 5523.771 3105.843 1.000 c1[10] 0.015 0.067 -0.097 0.156 0.001 0.001 3650.563 3018.163 1.000 c1[11] -0.059 0.071 -0.201 0.061 0.001 0.001 3415.030 3473.493 1.001 c1[12] -0.002 0.062 -0.112 0.128 0.001 0.001 5263.478 2694.457 1.000 c1[13] 0.008 0.063 -0.108 0.132 0.001 0.001 4561.657 3413.809 1.000 c1[14] 0.051 0.084 -0.081 0.217 0.002 0.001 2298.754 3184.069 1.000 c1[15] 0.007 0.063 -0.102 0.133 0.001 0.001 4523.893 3217.754 1.002 c1[16] -0.030 0.061 -0.155 0.084 0.001 0.001 5368.273 3354.607 1.000 c1[17] -0.025 0.059 -0.147 0.087 0.001 0.001 5472.461 3188.257 1.000 c1[18] -0.040 0.064 -0.164 0.075 0.001 0.001 4582.964 3374.863 1.000 c1[19] -0.040 0.063 -0.167 0.071 0.001 0.001 4660.396 3351.130 1.001 Mratio[0] 0.987 0.162 0.670 1.289 0.002 0.003 5555.755 2805.664 0.999 Mratio[1] 1.023 0.167 0.710 1.351 0.002 0.003 5281.501 3767.418 1.000 Mratio[2] 0.974 0.157 0.647 1.246 0.002 0.003 4430.295 3208.344 1.000 Mratio[3] 1.081 0.196 0.730 1.438 0.003 0.004 4515.522 3541.227 1.000 Mratio[4] 0.986 0.161 0.674 1.279 0.002 0.003 5162.144 3481.106 1.000 Mratio[5] 1.003 0.160 0.708 1.319 0.002 0.003 5432.885 3269.878 1.001 Mratio[6] 1.014 0.166 0.717 1.349 0.002 0.003 5690.972 3314.681 1.000 Mratio[7] 0.992 0.156 0.692 1.282 0.002 0.003 5638.118 3615.686 1.001 Mratio[8] 1.028 0.170 0.687 1.347 0.002 0.003 5107.281 3390.521 1.000 Mratio[9] 0.980 0.160 0.660 1.275 0.002 0.003 5581.931 3452.157 1.001 Mratio[10] 1.032 0.166 0.739 1.378 0.002 0.003 5578.524 3217.069 1.000 Mratio[11] 0.966 0.159 0.658 1.258 0.002 0.003 4917.545 3526.556 1.001 Mratio[12] 0.974 0.158 0.682 1.270 0.002 0.003 4905.277 3246.391 1.000 Mratio[13] 1.029 0.166 0.717 1.344 0.002 0.003 5469.264 3080.475 1.001 Mratio[14] 0.978 0.154 0.660 1.257 0.002 0.002 4763.231 3296.060 1.000 Mratio[15] 1.006 0.165 0.700 1.329 0.002 0.003 5594.826 3033.919 1.000 Mratio[16] 1.042 0.177 0.739 1.392 0.002 0.003 5161.180 3602.584 1.001 Mratio[17] 1.033 0.167 0.738 1.361 0.002 0.003 5256.405 3415.255 1.000 Mratio[18] 1.114 0.226 0.757 1.557 0.004 0.005 3838.592 3210.155 1.000 Mratio[19] 0.973 0.157 0.661 1.257 0.002 0.003 4547.488 3486.128 1.000 meta_d[0] 0.975 0.159 0.653 1.269 0.002 0.003 5226.335 3093.250 1.000 meta_d[1] 1.027 0.165 0.704 1.335 0.002 0.003 4929.359 3544.502 1.001 meta_d[2] 0.948 0.152 0.647 1.218 0.002 0.002 4621.121 3507.407 1.001 meta_d[3] 1.096 0.196 0.761 1.477 0.003 0.004 4465.762 3124.279 1.000 meta_d[4] 0.972 0.156 0.668 1.260 0.002 0.002 4969.086 3643.228 1.000 meta_d[5] 0.990 0.157 0.691 1.294 0.002 0.003 5473.215 3164.960 1.000 meta_d[6] 1.008 0.162 0.713 1.332 0.002 0.003 5450.365 3167.838 1.000 meta_d[7] 0.985 0.153 0.704 1.277 0.002 0.002 5574.946 3623.055 1.001 meta_d[8] 1.023 0.166 0.743 1.384 0.002 0.003 5192.433 3216.837 1.000 meta_d[9] 0.963 0.157 0.656 1.249 0.002 0.003 5439.611 3382.908 1.001 meta_d[10] 1.041 0.165 0.729 1.355 0.002 0.003 5396.816 3331.608 1.001 meta_d[11] 0.945 0.156 0.647 1.232 0.002 0.002 4847.358 3619.054 1.001 meta_d[12] 0.956 0.153 0.656 1.245 0.002 0.002 4811.534 3338.431 1.000 meta_d[13] 1.025 0.164 0.694 1.325 0.002 0.003 5148.299 3131.713 1.001 meta_d[14] 0.954 0.150 0.666 1.237 0.002 0.002 4783.151 3176.709 1.002 meta_d[15] 0.992 0.160 0.671 1.282 0.002 0.003 5894.806 3119.923 1.001 meta_d[16] 1.049 0.176 0.709 1.367 0.002 0.003 5141.258 3793.343 1.000 meta_d[17] 1.038 0.168 0.744 1.381 0.002 0.003 5025.705 3614.737 1.000 meta_d[18] 1.135 0.225 0.786 1.583 0.004 0.005 3693.469 3504.214 1.001 meta_d[19] 0.954 0.151 0.662 1.233 0.002 0.003 4746.594 3526.567 1.000 group_Mratio 1.003 0.110 0.807 1.212 0.002 0.002 4827.642 3134.643 1.001 mu_logMratio -0.004 0.111 -0.215 0.192 0.002 0.002 4827.642 3134.643 1.001 === Condition 1 ===
mean sd hdi_3% hdi_97% mcse_mean mcse_sd ess_bulk ess_tail r_hat mu_d1 0.997 0.060 0.889 1.114 0.001 0.001 5739.285 2987.523 1.001 sigma_d1 0.053 0.042 0.000 0.128 0.001 0.001 2623.702 1873.776 1.002 d1_z[0] 0.054 0.986 -1.732 1.941 0.013 0.018 5581.926 2666.493 1.000 d1_z[1] 0.033 0.979 -1.876 1.765 0.013 0.017 6034.026 3004.749 1.002 d1_z[2] -0.021 0.964 -1.871 1.805 0.013 0.017 5491.334 2822.833 1.001 d1_z[3] 0.014 0.957 -1.755 1.849 0.013 0.016 5108.998 2713.104 1.000 d1_z[4] -0.099 0.967 -2.052 1.593 0.014 0.017 5042.345 2276.555 1.001 d1_z[5] -0.009 0.944 -1.706 1.828 0.012 0.016 5735.497 2777.059 1.000 d1_z[6] 0.051 0.984 -1.872 1.825 0.012 0.017 6298.309 2776.279 1.003 d1_z[7] 0.078 0.931 -1.574 1.921 0.012 0.015 5743.447 3206.171 1.002 d1_z[8] -0.062 0.992 -1.996 1.736 0.013 0.018 6253.613 2533.859 1.003 d1_z[9] -0.107 0.964 -1.968 1.613 0.013 0.016 5470.428 3015.065 1.001 d1_z[10] -0.039 0.962 -1.809 1.788 0.012 0.019 6237.561 2981.405 1.003 d1_z[11] -0.087 0.986 -1.902 1.786 0.011 0.020 7501.191 2556.132 1.001 d1_z[12] 0.020 0.976 -1.779 1.802 0.014 0.018 5130.224 2837.182 1.000 d1_z[13] 0.068 0.974 -1.712 1.940 0.013 0.015 5317.649 2680.753 1.002 d1_z[14] -0.059 0.951 -1.865 1.686 0.013 0.017 5307.335 2816.226 1.001 d1_z[15] -0.018 0.958 -1.893 1.683 0.013 0.017 5361.185 2706.319 1.001 d1_z[16] -0.062 0.953 -1.875 1.726 0.013 0.017 5243.183 2671.678 1.001 d1_z[17] -0.077 0.995 -2.004 1.747 0.013 0.020 5446.350 2189.296 1.002 d1_z[18] 0.245 0.995 -1.729 2.000 0.014 0.017 4895.326 3002.602 1.000 d1_z[19] 0.134 0.985 -1.636 2.035 0.014 0.017 5195.891 2707.495 1.001 mu_c1 -0.025 0.029 -0.081 0.028 0.000 0.000 4699.628 3085.879 1.000 sigma_c1 0.042 0.031 0.000 0.097 0.001 0.001 1838.016 2032.050 1.001 c1_z[0] 0.181 0.921 -1.609 1.856 0.013 0.016 5238.828 2827.362 1.001 c1_z[1] -0.381 0.941 -2.157 1.362 0.014 0.015 4851.753 2918.758 1.002 c1_z[2] 0.017 0.935 -1.726 1.775 0.012 0.016 6030.943 2950.652 1.002 c1_z[3] 0.156 0.963 -1.697 1.926 0.012 0.016 6125.913 3012.663 1.001 c1_z[4] 0.196 0.941 -1.577 1.948 0.012 0.017 5878.265 3015.124 1.001 c1_z[5] 0.446 0.934 -1.305 2.234 0.014 0.015 4493.497 3070.189 1.001 c1_z[6] 0.027 0.942 -1.732 1.747 0.013 0.017 5608.790 2725.374 1.002 c1_z[7] -0.075 0.945 -1.766 1.783 0.013 0.015 5616.281 3148.048 1.000 c1_z[8] 0.019 0.925 -1.779 1.661 0.013 0.017 5230.616 2696.729 1.001 c1_z[9] -0.257 0.945 -2.003 1.570 0.013 0.016 4952.028 2480.937 1.000 c1_z[10] 0.504 0.964 -1.295 2.307 0.015 0.015 4148.104 3072.245 1.000 c1_z[11] -0.014 0.977 -1.947 1.718 0.013 0.017 5998.112 2931.282 1.001 c1_z[12] 0.189 0.968 -1.611 2.043 0.013 0.017 5183.144 2823.075 1.001 c1_z[13] -0.242 0.964 -2.146 1.465 0.013 0.016 5241.972 2979.713 1.003 c1_z[14] -0.020 0.940 -1.778 1.740 0.013 0.016 5318.742 2874.788 1.001 c1_z[15] -0.307 0.945 -2.183 1.333 0.013 0.016 5199.984 2801.566 1.000 c1_z[16] -0.126 0.921 -1.914 1.612 0.013 0.019 5076.400 2507.981 1.001 c1_z[17] -0.067 0.921 -1.835 1.663 0.012 0.017 6042.930 2523.991 1.004 c1_z[18] -0.107 0.945 -1.984 1.617 0.013 0.016 5435.506 2810.567 1.001 c1_z[19] -0.090 0.939 -1.881 1.661 0.013 0.016 5396.946 3070.482 1.001 alpha_logMratio -0.487 0.174 -0.814 -0.183 0.003 0.004 3727.615 2196.569 1.002 sigma_logMratio 0.234 0.176 0.000 0.545 0.004 0.003 1423.073 1709.724 1.002 logMratio_z[0] 0.104 0.932 -1.692 1.809 0.012 0.017 6050.908 3135.756 1.000 logMratio_z[1] 0.169 0.918 -1.528 1.906 0.013 0.015 5166.589 2874.343 1.000 logMratio_z[2] -0.150 0.887 -1.789 1.472 0.012 0.016 5282.893 3310.825 1.000 logMratio_z[3] 0.166 0.918 -1.523 1.925 0.012 0.016 5582.777 3101.236 1.002 logMratio_z[4] -0.036 0.936 -1.759 1.784 0.012 0.017 6132.229 3015.904 1.001 logMratio_z[5] 0.135 0.898 -1.579 1.841 0.011 0.017 6409.928 2725.371 1.001 logMratio_z[6] 0.309 0.940 -1.390 2.048 0.013 0.015 5516.869 3158.655 1.001 logMratio_z[7] 0.015 0.963 -1.769 1.773 0.013 0.016 5487.910 2791.646 1.001 logMratio_z[8] -0.122 0.935 -1.812 1.758 0.012 0.019 5886.101 2691.711 1.001 logMratio_z[9] -0.147 0.933 -1.838 1.661 0.013 0.017 5445.035 3008.420 1.000 logMratio_z[10] -0.177 0.945 -1.920 1.600 0.014 0.016 4796.185 3032.639 1.001 logMratio_z[11] -0.583 0.944 -2.416 1.154 0.014 0.016 4480.514 2936.135 1.002 logMratio_z[12] -0.083 0.945 -1.739 1.765 0.012 0.019 6108.564 2769.641 1.001 logMratio_z[13] 0.427 0.983 -1.473 2.239 0.014 0.017 4750.500 2612.826 1.000 logMratio_z[14] -0.384 0.941 -2.257 1.337 0.014 0.018 4629.483 2513.714 1.000 logMratio_z[15] -0.111 0.914 -1.760 1.630 0.013 0.016 5305.517 2295.493 1.002 logMratio_z[16] -0.479 0.949 -2.179 1.440 0.014 0.017 4604.379 2805.935 1.000 logMratio_z[17] -0.042 0.926 -1.934 1.619 0.013 0.017 5052.410 2722.024 1.000 logMratio_z[18] 0.666 0.969 -1.226 2.318 0.016 0.014 3977.615 3335.227 1.000 logMratio_z[19] 0.037 0.956 -1.874 1.737 0.013 0.018 5871.122 2443.050 1.001 mu_c2 1.027 0.045 0.943 1.111 0.001 0.001 4823.775 2809.679 1.001 sigma_c2 0.443 0.032 0.382 0.502 0.000 0.001 4481.253 2838.820 1.002 cS1_offsets[0, 0] 0.616 0.101 0.444 0.824 0.001 0.002 4548.448 2418.735 1.000 cS1_offsets[0, 1] 1.020 0.125 0.787 1.260 0.002 0.002 5164.927 2634.673 1.001 cS1_offsets[0, 2] 1.448 0.154 1.153 1.730 0.002 0.003 5242.565 2452.090 1.001 cS1_offsets[1, 0] 0.633 0.112 0.434 0.843 0.002 0.002 5052.674 2974.504 1.001 cS1_offsets[1, 1] 0.966 0.134 0.706 1.206 0.002 0.002 5784.366 3225.602 1.000 cS1_offsets[1, 2] 1.777 0.204 1.400 2.145 0.003 0.003 4838.836 2859.698 1.000 cS1_offsets[2, 0] 0.540 0.100 0.350 0.733 0.001 0.002 5232.333 2723.749 1.000 cS1_offsets[2, 1] 0.851 0.118 0.621 1.066 0.002 0.002 5451.392 2900.713 1.002 cS1_offsets[2, 2] 1.321 0.151 1.064 1.619 0.002 0.002 5891.567 3323.136 1.001 cS1_offsets[3, 0] 0.492 0.096 0.321 0.677 0.001 0.002 5352.503 2785.260 1.000 cS1_offsets[3, 1] 0.904 0.120 0.682 1.141 0.002 0.002 5141.899 2705.444 1.000 cS1_offsets[3, 2] 1.580 0.176 1.253 1.908 0.002 0.003 5451.896 3060.212 1.001 cS1_offsets[4, 0] 0.508 0.095 0.336 0.691 0.001 0.002 4795.380 2712.308 1.001 cS1_offsets[4, 1] 1.199 0.136 0.954 1.461 0.002 0.002 5157.657 3135.383 1.000 cS1_offsets[4, 2] 1.742 0.190 1.371 2.089 0.002 0.003 5742.248 3114.895 1.000 cS1_offsets[5, 0] 0.441 0.086 0.284 0.608 0.001 0.002 5183.968 2186.040 1.001 cS1_offsets[5, 1] 0.904 0.116 0.695 1.120 0.002 0.002 5401.610 3311.092 1.001 cS1_offsets[5, 2] 1.493 0.156 1.203 1.782 0.002 0.003 6341.980 2865.605 1.000 cS1_offsets[6, 0] 0.519 0.097 0.346 0.701 0.001 0.001 5317.107 3084.835 1.003 cS1_offsets[6, 1] 1.032 0.127 0.806 1.280 0.002 0.002 5584.581 2588.789 1.001 cS1_offsets[6, 2] 1.568 0.169 1.240 1.879 0.002 0.003 5299.904 2960.044 1.001 cS1_offsets[7, 0] 0.605 0.102 0.431 0.810 0.001 0.002 5062.186 3017.373 1.001 cS1_offsets[7, 1] 1.235 0.141 0.961 1.494 0.002 0.002 5137.808 2502.828 1.001 cS1_offsets[7, 2] 1.453 0.161 1.142 1.743 0.002 0.003 5146.727 2750.157 1.001 cS1_offsets[8, 0] 0.638 0.102 0.457 0.838 0.001 0.002 5054.616 2708.293 1.001 cS1_offsets[8, 1] 1.133 0.130 0.891 1.368 0.002 0.002 5452.844 3353.248 1.000 cS1_offsets[8, 2] 1.496 0.165 1.180 1.800 0.002 0.003 5384.382 3273.501 1.002 cS1_offsets[9, 0] 0.474 0.098 0.295 0.656 0.001 0.002 4902.576 2539.809 1.001 cS1_offsets[9, 1] 1.007 0.134 0.774 1.277 0.002 0.002 5253.320 2641.684 1.000 cS1_offsets[9, 2] 1.756 0.205 1.373 2.140 0.003 0.003 5556.257 2535.211 1.000 cS1_offsets[10, 0] 0.458 0.088 0.297 0.629 0.001 0.002 5251.085 2677.231 1.000 cS1_offsets[10, 1] 0.911 0.115 0.692 1.122 0.002 0.002 5599.419 3397.890 1.002 cS1_offsets[10, 2] 1.443 0.150 1.165 1.721 0.002 0.002 5102.464 3043.259 1.003 cS1_offsets[11, 0] 0.544 0.099 0.357 0.725 0.001 0.002 4354.103 2201.115 1.000 cS1_offsets[11, 1] 1.214 0.138 0.961 1.473 0.002 0.002 4572.770 2899.470 1.001 cS1_offsets[11, 2] 1.550 0.171 1.216 1.855 0.002 0.003 5257.701 2544.675 1.003 cS1_offsets[12, 0] 0.404 0.089 0.249 0.577 0.001 0.001 5558.298 3113.615 1.000 cS1_offsets[12, 1] 0.789 0.113 0.567 0.998 0.002 0.002 5615.307 2829.581 1.001 cS1_offsets[12, 2] 1.390 0.154 1.097 1.673 0.002 0.002 5239.147 3184.703 1.002 cS1_offsets[13, 0] 0.473 0.098 0.288 0.654 0.001 0.002 5124.640 2625.024 1.000 cS1_offsets[13, 1] 1.081 0.136 0.833 1.330 0.002 0.002 5569.467 3350.225 1.001 cS1_offsets[13, 2] 1.429 0.170 1.097 1.736 0.002 0.003 5439.121 2605.884 1.000 cS1_offsets[14, 0] 0.675 0.110 0.475 0.883 0.001 0.002 5392.327 2648.592 1.000 cS1_offsets[14, 1] 1.105 0.132 0.854 1.350 0.002 0.002 4837.874 2393.047 1.001 cS1_offsets[14, 2] 1.644 0.175 1.321 1.975 0.002 0.003 5306.086 2859.991 1.000 cS1_offsets[15, 0] 0.587 0.104 0.394 0.780 0.001 0.002 5110.639 2292.563 1.001 cS1_offsets[15, 1] 1.258 0.149 0.973 1.524 0.002 0.002 5581.243 3138.330 1.004 cS1_offsets[15, 2] 1.581 0.179 1.255 1.919 0.002 0.003 5433.652 3273.478 1.001 cS1_offsets[16, 0] 0.270 0.079 0.123 0.413 0.001 0.001 4778.845 2970.633 1.000 cS1_offsets[16, 1] 1.031 0.132 0.768 1.260 0.002 0.002 4655.284 3168.297 1.004 cS1_offsets[16, 2] 1.424 0.163 1.119 1.728 0.002 0.002 5594.638 3086.696 1.000 cS1_offsets[17, 0] 0.659 0.109 0.452 0.866 0.001 0.002 6162.398 2614.620 1.000 cS1_offsets[17, 1] 1.180 0.142 0.916 1.448 0.002 0.002 5218.031 2958.173 1.001 cS1_offsets[17, 2] 1.518 0.173 1.200 1.862 0.002 0.003 4981.406 2609.242 1.001 cS1_offsets[18, 0] 0.526 0.101 0.334 0.708 0.001 0.002 5197.612 2999.449 1.001 cS1_offsets[18, 1] 1.026 0.136 0.787 1.283 0.002 0.002 4902.264 3186.926 1.003 cS1_offsets[18, 2] 1.395 0.162 1.121 1.723 0.002 0.003 5077.101 3101.801 1.000 cS1_offsets[19, 0] 0.638 0.106 0.446 0.837 0.002 0.002 4634.361 2784.388 1.000 cS1_offsets[19, 1] 0.978 0.128 0.732 1.207 0.002 0.002 5317.344 2746.665 1.001 cS1_offsets[19, 2] 1.484 0.167 1.173 1.794 0.002 0.003 5493.395 3172.484 1.002 cS2_offsets[0, 0] 0.645 0.108 0.449 0.854 0.001 0.002 5744.626 3007.822 1.000 cS2_offsets[0, 1] 0.982 0.129 0.741 1.221 0.002 0.002 4799.917 3483.630 1.000 cS2_offsets[0, 2] 1.691 0.183 1.362 2.042 0.002 0.003 5949.579 3265.825 1.002 cS2_offsets[1, 0] 0.396 0.084 0.235 0.548 0.001 0.001 4157.084 2746.445 1.001 cS2_offsets[1, 1] 0.866 0.111 0.671 1.091 0.002 0.002 4837.207 3223.799 1.001 cS2_offsets[1, 2] 1.530 0.160 1.242 1.840 0.002 0.002 4805.522 2827.053 1.000 cS2_offsets[2, 0] 0.389 0.089 0.225 0.552 0.001 0.002 5334.324 2772.663 1.000 cS2_offsets[2, 1] 0.952 0.123 0.713 1.173 0.002 0.002 5389.675 3194.889 1.000 cS2_offsets[2, 2] 1.306 0.141 1.046 1.576 0.002 0.002 5880.192 3132.876 1.002 cS2_offsets[3, 0] 0.699 0.111 0.499 0.911 0.002 0.002 5218.210 2768.701 1.002 cS2_offsets[3, 1] 1.089 0.134 0.842 1.339 0.002 0.002 5441.815 2757.398 1.001 cS2_offsets[3, 2] 1.321 0.150 1.042 1.605 0.002 0.002 4988.398 2956.128 1.001 cS2_offsets[4, 0] 0.675 0.105 0.484 0.877 0.001 0.002 5481.046 3193.734 1.001 cS2_offsets[4, 1] 1.270 0.145 1.001 1.553 0.002 0.002 5457.969 3273.034 1.002 cS2_offsets[4, 2] 1.913 0.211 1.510 2.291 0.003 0.003 5707.566 2847.583 1.001 cS2_offsets[5, 0] 0.647 0.113 0.436 0.857 0.002 0.002 4645.044 2439.003 1.000 cS2_offsets[5, 1] 1.284 0.150 0.995 1.560 0.002 0.002 4989.176 2497.168 1.001 cS2_offsets[5, 2] 1.700 0.199 1.342 2.090 0.003 0.003 5360.343 2734.097 1.003 cS2_offsets[6, 0] 0.511 0.100 0.329 0.697 0.001 0.002 4963.832 2890.951 1.000 cS2_offsets[6, 1] 0.877 0.119 0.652 1.094 0.002 0.002 4818.583 2860.325 1.001 cS2_offsets[6, 2] 1.409 0.157 1.127 1.707 0.002 0.003 4710.460 3167.643 1.001 cS2_offsets[7, 0] 0.443 0.092 0.266 0.610 0.001 0.002 4739.508 2717.777 1.000 cS2_offsets[7, 1] 0.958 0.122 0.729 1.185 0.002 0.002 5166.045 3235.847 1.000 cS2_offsets[7, 2] 1.325 0.142 1.078 1.600 0.002 0.002 5188.648 3225.069 1.000 cS2_offsets[8, 0] 0.634 0.110 0.423 0.829 0.001 0.002 5346.334 2481.070 1.003 cS2_offsets[8, 1] 1.112 0.140 0.853 1.371 0.002 0.002 5958.338 2900.511 1.001 cS2_offsets[8, 2] 1.577 0.172 1.280 1.930 0.002 0.003 5410.028 3457.490 1.001 cS2_offsets[9, 0] 0.434 0.090 0.260 0.594 0.001 0.001 5390.300 2550.551 1.000 cS2_offsets[9, 1] 0.937 0.121 0.725 1.176 0.002 0.002 5391.701 2508.193 1.001 cS2_offsets[9, 2] 1.446 0.154 1.174 1.750 0.002 0.003 5419.044 2807.153 1.002 cS2_offsets[10, 0] 0.699 0.118 0.504 0.947 0.002 0.002 4698.006 2492.518 1.000 cS2_offsets[10, 1] 1.374 0.155 1.081 1.652 0.002 0.002 5205.333 3187.193 1.000 cS2_offsets[10, 2] 1.581 0.179 1.236 1.903 0.003 0.003 4930.489 2856.926 1.000 cS2_offsets[11, 0] 0.514 0.096 0.343 0.696 0.001 0.002 4192.436 2731.289 1.001 cS2_offsets[11, 1] 1.108 0.131 0.866 1.355 0.002 0.002 5582.272 2751.725 1.001 cS2_offsets[11, 2] 1.541 0.162 1.243 1.851 0.002 0.003 5599.762 2671.770 1.001 cS2_offsets[12, 0] 0.553 0.101 0.373 0.745 0.001 0.002 5319.133 2849.963 1.000 cS2_offsets[12, 1] 1.005 0.130 0.770 1.253 0.002 0.002 5459.670 2785.630 1.000 cS2_offsets[12, 2] 1.604 0.179 1.283 1.947 0.002 0.003 5088.632 3036.461 1.000 cS2_offsets[13, 0] 0.482 0.091 0.315 0.655 0.001 0.002 4787.845 3066.783 1.001 cS2_offsets[13, 1] 0.804 0.113 0.588 1.013 0.002 0.002 4999.358 3036.571 1.000 cS2_offsets[13, 2] 1.273 0.143 1.014 1.547 0.002 0.002 4967.676 3145.111 1.002 cS2_offsets[14, 0] 0.536 0.102 0.353 0.727 0.001 0.002 5849.417 2710.702 1.001 cS2_offsets[14, 1] 0.967 0.127 0.737 1.208 0.002 0.002 5911.174 3040.308 1.001 cS2_offsets[14, 2] 1.335 0.149 1.061 1.615 0.002 0.003 5761.085 2937.459 1.001 cS2_offsets[15, 0] 0.603 0.098 0.417 0.786 0.001 0.002 5118.079 2973.247 1.001 cS2_offsets[15, 1] 0.894 0.113 0.683 1.104 0.002 0.002 5182.291 3093.389 1.001 cS2_offsets[15, 2] 1.283 0.136 1.033 1.540 0.002 0.002 5462.345 3114.477 1.000 cS2_offsets[16, 0] 0.614 0.098 0.444 0.814 0.001 0.002 4944.839 2405.911 1.000 cS2_offsets[16, 1] 0.954 0.115 0.746 1.165 0.002 0.002 5227.784 2705.629 1.000 cS2_offsets[16, 2] 1.554 0.164 1.265 1.865 0.002 0.003 5576.137 2579.365 1.001 cS2_offsets[17, 0] 0.513 0.093 0.335 0.685 0.001 0.001 5194.926 2789.295 1.000 cS2_offsets[17, 1] 1.154 0.131 0.913 1.405 0.002 0.002 5211.549 2498.410 1.002 cS2_offsets[17, 2] 1.688 0.181 1.344 2.019 0.002 0.003 5120.884 2699.503 1.001 cS2_offsets[18, 0] 0.471 0.096 0.298 0.648 0.001 0.002 4933.015 2415.164 1.000 cS2_offsets[18, 1] 0.904 0.124 0.680 1.142 0.002 0.002 4621.264 2875.198 1.001 cS2_offsets[18, 2] 1.495 0.166 1.162 1.787 0.002 0.003 5032.053 2779.625 1.000 cS2_offsets[19, 0] 0.469 0.095 0.294 0.650 0.001 0.002 5596.002 2747.700 1.000 cS2_offsets[19, 1] 0.878 0.122 0.641 1.095 0.002 0.002 5522.625 2946.059 1.000 cS2_offsets[19, 2] 1.339 0.148 1.056 1.611 0.002 0.002 5455.727 2839.418 1.002 d1[0] 1.001 0.083 0.853 1.165 0.001 0.002 5293.336 3134.502 1.002 d1[1] 1.000 0.083 0.841 1.158 0.001 0.001 4809.086 2622.852 1.001 d1[2] 0.996 0.081 0.840 1.146 0.001 0.001 5185.476 3590.348 1.002 d1[3] 0.998 0.083 0.833 1.149 0.001 0.001 5072.645 3158.750 1.001 d1[4] 0.988 0.082 0.834 1.142 0.001 0.001 4887.517 3302.129 1.001 d1[5] 0.996 0.081 0.843 1.143 0.001 0.001 4732.456 3178.255 1.000 d1[6] 1.001 0.083 0.834 1.149 0.001 0.001 5118.480 2535.554 1.001 d1[7] 1.003 0.082 0.851 1.165 0.001 0.002 4714.049 2927.791 1.001 d1[8] 0.993 0.084 0.839 1.156 0.001 0.002 4904.613 3376.839 0.999 d1[9] 0.989 0.085 0.830 1.144 0.001 0.002 5032.825 3010.877 1.001 d1[10] 0.994 0.084 0.840 1.153 0.001 0.001 5337.947 3142.113 1.000 d1[11] 0.990 0.085 0.826 1.152 0.001 0.002 5181.711 2714.829 1.000 d1[12] 1.000 0.083 0.845 1.163 0.001 0.001 5162.412 3365.331 1.003 d1[13] 1.002 0.083 0.843 1.160 0.001 0.001 4778.690 2879.987 1.001 d1[14] 0.991 0.084 0.829 1.150 0.001 0.002 5189.878 3304.953 1.001 d1[15] 0.997 0.083 0.841 1.154 0.001 0.001 5075.840 3000.670 1.001 d1[16] 0.992 0.082 0.825 1.138 0.001 0.001 5072.347 3408.365 1.001 d1[17] 0.992 0.084 0.827 1.140 0.001 0.001 4383.100 2924.587 1.000 d1[18] 1.017 0.086 0.862 1.183 0.001 0.001 4804.351 3657.833 1.000 d1[19] 1.008 0.085 0.846 1.167 0.001 0.001 4561.864 3660.149 1.000 c1[0] -0.014 0.052 -0.107 0.092 0.001 0.001 4430.639 3470.043 1.001 c1[1] -0.047 0.055 -0.161 0.047 0.001 0.001 3890.179 3625.114 1.000 c1[2] -0.025 0.050 -0.125 0.067 0.001 0.001 4939.736 3478.065 1.000 c1[3] -0.016 0.051 -0.106 0.092 0.001 0.001 4479.885 3418.660 1.000 c1[4] -0.015 0.051 -0.112 0.079 0.001 0.001 4566.840 2663.647 1.000 c1[5] 0.000 0.055 -0.095 0.114 0.001 0.001 3347.941 3093.013 1.000 c1[6] -0.023 0.050 -0.112 0.084 0.001 0.001 5167.581 3362.538 1.000 c1[7] -0.030 0.051 -0.127 0.065 0.001 0.001 5066.544 3277.841 1.001 c1[8] -0.024 0.050 -0.120 0.073 0.001 0.001 4429.300 2230.669 1.000 c1[9] -0.041 0.053 -0.141 0.061 0.001 0.001 4298.547 2689.724 1.000 c1[10] 0.004 0.060 -0.092 0.126 0.001 0.001 3188.063 2940.648 1.000 c1[11] -0.027 0.051 -0.127 0.073 0.001 0.001 4843.291 3440.739 1.000 c1[12] -0.015 0.052 -0.107 0.092 0.001 0.001 4699.045 3205.481 1.001 c1[13] -0.041 0.053 -0.142 0.059 0.001 0.001 4315.581 3267.772 1.001 c1[14] -0.027 0.051 -0.131 0.067 0.001 0.001 5896.614 3511.306 1.000 c1[15] -0.043 0.053 -0.151 0.055 0.001 0.001 4236.868 3100.334 1.000 c1[16] -0.032 0.052 -0.136 0.062 0.001 0.001 4601.447 2873.365 0.999 c1[17] -0.029 0.051 -0.131 0.064 0.001 0.001 5286.714 3451.780 1.001 c1[18] -0.031 0.052 -0.136 0.066 0.001 0.001 5045.219 3476.996 1.000 c1[19] -0.030 0.051 -0.130 0.068 0.001 0.001 4870.470 3330.085 1.000 Mratio[0] 0.660 0.181 0.322 1.006 0.003 0.003 4864.645 2694.054 1.000 Mratio[1] 0.672 0.185 0.317 1.007 0.003 0.004 3564.153 2365.749 1.001 Mratio[2] 0.606 0.160 0.284 0.905 0.003 0.003 3962.320 2577.789 1.001 Mratio[3] 0.671 0.181 0.354 1.040 0.003 0.004 4154.568 2813.038 1.001 Mratio[4] 0.628 0.166 0.293 0.937 0.003 0.003 4307.224 2270.052 1.000 Mratio[5] 0.660 0.177 0.360 1.029 0.003 0.003 4695.256 2750.826 1.000 Mratio[6] 0.702 0.201 0.381 1.131 0.004 0.004 3265.966 2238.616 1.000 Mratio[7] 0.640 0.177 0.300 0.995 0.003 0.003 4391.118 3192.352 1.000 Mratio[8] 0.614 0.163 0.272 0.902 0.002 0.003 4472.434 3008.074 1.001 Mratio[9] 0.608 0.159 0.294 0.901 0.002 0.003 4168.557 2443.419 1.001 Mratio[10] 0.604 0.162 0.287 0.899 0.003 0.003 4113.397 2627.335 1.000 Mratio[11] 0.542 0.157 0.231 0.818 0.003 0.002 2966.770 2463.820 1.002 Mratio[12] 0.620 0.166 0.284 0.932 0.003 0.003 4156.288 2668.267 1.000 Mratio[13] 0.734 0.226 0.386 1.219 0.004 0.005 3320.756 3029.003 1.002 Mratio[14] 0.571 0.159 0.249 0.861 0.003 0.003 3754.901 2516.288 1.002 Mratio[15] 0.614 0.162 0.297 0.921 0.003 0.003 3880.624 2611.062 1.000 Mratio[16] 0.557 0.159 0.250 0.854 0.003 0.002 3028.733 2803.580 1.000 Mratio[17] 0.628 0.167 0.278 0.926 0.003 0.003 4227.752 2696.042 1.000 Mratio[18] 0.797 0.269 0.392 1.344 0.005 0.006 2545.796 3037.553 1.001 Mratio[19] 0.649 0.176 0.339 1.007 0.003 0.003 4217.932 2749.825 1.001 meta_d[0] 0.658 0.177 0.334 1.001 0.003 0.003 4587.521 2789.859 1.000 meta_d[1] 0.669 0.180 0.312 1.001 0.003 0.003 3840.604 2454.512 1.000 meta_d[2] 0.601 0.158 0.290 0.898 0.003 0.003 4007.663 2802.463 1.001 meta_d[3] 0.666 0.177 0.329 0.996 0.003 0.003 4164.355 3037.509 1.000 meta_d[4] 0.618 0.162 0.295 0.918 0.002 0.003 4221.348 2465.190 1.000 meta_d[5] 0.655 0.172 0.329 0.975 0.003 0.003 4512.534 2729.023 1.000 meta_d[6] 0.701 0.199 0.343 1.075 0.004 0.004 3284.780 2566.123 1.000 meta_d[7] 0.639 0.173 0.325 1.005 0.003 0.003 4398.917 3193.624 1.000 meta_d[8] 0.608 0.162 0.286 0.903 0.002 0.003 4335.852 3031.703 1.000 meta_d[9] 0.599 0.155 0.281 0.878 0.002 0.003 4157.588 2459.262 1.001 meta_d[10] 0.598 0.160 0.286 0.899 0.003 0.003 3775.970 2625.670 1.000 meta_d[11] 0.535 0.154 0.238 0.806 0.003 0.002 2858.803 2687.121 1.001 meta_d[12] 0.618 0.164 0.315 0.955 0.003 0.003 4023.037 2447.664 1.001 meta_d[13] 0.733 0.225 0.368 1.212 0.004 0.005 3266.268 2870.090 1.001 meta_d[14] 0.563 0.154 0.256 0.834 0.003 0.003 3760.604 2523.282 1.001 meta_d[15] 0.610 0.159 0.296 0.908 0.003 0.003 3947.250 2439.828 1.001 meta_d[16] 0.550 0.155 0.247 0.834 0.003 0.002 3094.676 2747.182 1.000 meta_d[17] 0.620 0.162 0.295 0.913 0.003 0.003 3912.644 2793.686 1.000 meta_d[18] 0.807 0.269 0.392 1.353 0.005 0.006 2585.961 3022.560 1.001 meta_d[19] 0.651 0.173 0.323 0.973 0.003 0.003 4096.437 2707.658 1.001 group_Mratio 0.624 0.105 0.435 0.823 0.002 0.002 3727.615 2196.569 1.002 mu_logMratio -0.487 0.174 -0.814 -0.183 0.003 0.004 3727.615 2196.569 1.002
# Trace plots
for label, fit_obj in [("Condition 0", fit_grp0), ("Condition 1", fit_grp1)]:
if fit_obj.idata is not None:
az.plot_trace(fit_obj.idata, compact=True)
plt.suptitle(f"{label} — trace plots", y=1.01)
plt.tight_layout()
plt.show()
8. Group Comparison — Posterior Difference (Cond 1 − Cond 0)¶
if fit_grp0.idata is not None and fit_grp1.idata is not None:
p0 = az.extract(fit_grp0.idata)
p1 = az.extract(fit_grp1.idata)
# find group-level log M-ratio variable (first variable in each)
g0_var = list(p0.data_vars)[0]
g1_var = list(p1.data_vars)[0]
s0 = p0[g0_var].values.ravel()
s1 = p1[g1_var].values.ravel()
# match sample sizes
n = min(len(s0), len(s1))
delta = s1[:n] - s0[:n]
p_lower = (delta < 0).mean()
print(f"Group-level variable: Cond0={g0_var}, Cond1={g1_var}")
print(f"delta mean = {delta.mean():.3f} SD = {delta.std():.3f}")
print(f"95% HDI: {np.percentile(delta, 2.5):.3f} – {np.percentile(delta, 97.5):.3f}")
print(f"P(Cond1 < Cond0) = {p_lower:.3f}")
fig, ax = plt.subplots(figsize=(8, 4.5))
x_d = np.linspace(delta.min() - 0.2, delta.max() + 0.2, 400)
kde_d = scipy_stats.gaussian_kde(delta, bw_method=0.3)
ax.fill_between(x_d, kde_d(x_d), alpha=0.35, color="#4C72B0")
ax.plot(x_d, kde_d(x_d), lw=2.5, color="#4C72B0",
label=f"P(delta<0) = {p_lower:.2f}")
x_neg = x_d[x_d < 0]
ax.fill_between(x_neg, kde_d(x_neg), alpha=0.5, color="#C44E52", hatch="///")
ax.axvline(0, color="black", lw=1)
ax.axvline(delta.mean(), color="#4C72B0", lw=1.5, ls="--",
label=f"mean = {delta.mean():.3f}")
ax.set_xlabel("delta (Condition 1 − Condition 0)")
ax.set_ylabel("Density")
ax.set_title("Group comparison: posterior of delta log M-ratio")
ax.legend(fontsize=10)
plt.tight_layout()
plt.show()
Group-level variable: Cond0=mu_d1, Cond1=mu_d1 delta mean = 0.000 SD = 0.085 95% HDI: -0.169 – 0.164 P(Cond1 < Cond0) = 0.496
9. Summary¶
| Method | API | Backend | Notes |
|---|---|---|---|
| MLE | fit_meta_d_mle / fit_group |
scipy | Fast point estimates, no uncertainty |
| Bayesian mratio | fit_group(..., parameterization='mratio') |
cmdstanpy Stan | Direct equivalent of metadpy hmetad() |
| Bayesian meta_noise | fit_group(..., parameterization='meta_noise') |
cmdstanpy Stan | Additive-noise parameterization |
| Bayesian casandre | fit_group(..., parameterization='casandre') |
cmdstanpy Stan | Meta-uncertainty (Boundy-Singer 2023) |
All Bayesian fits return a FitResult with .idata (ArviZ InferenceData)
so any ArviZ diagnostic function works directly:
az.plot_trace(fit.idata)
az.summary(fit.idata)
az.plot_posterior(fit.idata)