|
271 | 271 | % For residual correlations between outcomes, credible intervals are |
272 | 272 | % computed in closed form using Fisher’s z-transform with effective degrees |
273 | 273 | % of freedom df_t, symmetric intervals on the z-scale, and back- |
274 | | -% transformation [15]. Bayes factors for H0: rho = 0 use the exact change- |
| 274 | +% transformation [15]. Bayes factors for H0: r = 0 use the exact change- |
275 | 275 | % of-variables prior induced by a flat prior on the correlation coefficient: |
276 | | -% rho ~ Uniform(-1, 1) ==> z = atanh(rho) ~ Logistic(0, 1/2), |
| 276 | +% r ~ Uniform (-1, 1) ==> z = atanh (r) ~ Logistic (0, 1/2), |
277 | 277 | % so the prior density at z = 0 equals 0.5. Posterior densities on z are |
278 | 278 | % t-marginal with df_t, providing a closed-form, non-arbitrary Savage– |
279 | 279 | % Dickey BF for residual correlations [3, 16]. |
|
298 | 298 | % Inv-Gamma(df_t/2, Sigma_Y_hat), induced by variance estimation |
299 | 299 | % and marginalization and used to generate the t-layer. |
300 | 300 | % |
301 | | -% o Correlations: Flat/Uniform prior, U(-1, 1), on the correlation |
302 | | -% coefficient scale. |
| 301 | +% o Correlations: Flat/Uniform prior, U(-1, 1), on the correlation |
| 302 | +% coefficient scale. While non-informative for r, this induces a |
| 303 | +% weakly informative Logistic prior on the Fisher’s z scale. At the |
| 304 | +% point null (0), the prior density is 0.5, approximately equivalent |
| 305 | +% to a N(0, 0.8) prior. |
303 | 306 | % |
304 | 307 | % UNCERTAINTY AND CLUSTERING: |
305 | 308 | % The design effect specified by DEFF is integrated throughout the model |
|
777 | 780 |
|
778 | 781 | % Assemble table-like cell array for correlations |
779 | 782 | R_table = cat (1, ... |
780 | | - {'Correlation', 'R', 'CI_lower', 'CI_upper', 'BF10', 'lnBF10'}, ... |
| 783 | + {'Correlation', 'r', 'CI_lower', 'CI_upper', 'BF10', 'lnBF10'}, ... |
781 | 784 | [labels(:), num2cell([R(:), R_CI_lower(:), R_CI_upper(:), ... |
782 | 785 | BF10_R(:), lnBF10_R(:)])])'; |
783 | 786 |
|
|
1126 | 1129 | %! Var_true = var (BOOTSTAT, 0, 2); |
1127 | 1130 | %! Var_iid = var (BOOTSTAT_SRS, 0, 2); |
1128 | 1131 | %! DEFF = mean (Var_true ./ Var_iid); |
1129 | | -%! % Or more simply, we can use the deffcalc function, which does the same thing |
| 1132 | +%! % Or more simply, we can use the deffcalc function, which does the same thing. |
| 1133 | +%! % We take the mean DEFF across all contrasts for a stable global penalty. |
1130 | 1134 | %! DEFF = mean (deffcalc (BOOTSTAT, BOOTSTAT_SRS)) |
1131 | 1135 | %! |
1132 | 1136 | %! % Fit a cluster-robust empirical Bayes model |
|
0 commit comments