Compute the Neyman precision constant
\(\kappa = (1/p + 1/(1 - p))(1 - R^2)\,\mathrm{Var}(Y)\) that maps
per-site sample size to per-site sampling variance through
\(\widehat{se}_j^2 = \kappa / n_j\). Use this to inspect or sweep
\(\kappa\) for a planned design — compute_kappa() is also called
internally by gen_site_sizes when constructing the
Layer 2 SE column.
Value
A numeric vector. Inputs are recycled by base R rules — pass
scalars for a scalar \kappa, or matched vectors to sweep a grid.
Details
The defaults (p = 0.5, R2 = 0, var_outcome = 1) give
\(\kappa = 4\), matching the JEBS reference design. Increasing
R2 shrinks \(\kappa\) (covariates buy precision); imbalanced p
inflates it.
References
Lee, J., Che, J., Rabe-Hesketh, S., Feller, A., & Miratrix, L. (2025). Improving the estimation of site-specific effects and their distribution in multisite trials. Journal of Educational and Behavioral Statistics, 50(5), 731–764. doi:10.3102/10769986241254286 .
See also
gen_site_sizes for the Layer 2 generator that consumes
\kappa;
compute_I for the realized informativeness diagnostic.
Other family-diagnostics:
bhattacharyya_coef(),
compute_I(),
compute_shrinkage(),
default_thresholds(),
feasibility_index(),
heterogeneity_ratio(),
informativeness(),
ks_distance(),
mean_shrinkage(),
realized_rank_corr(),
realized_rank_corr_marginal(),
scenario_audit()
Examples
# JEBS baseline: balanced assignment, no covariates, unit outcome variance.
compute_kappa() # 4
#> [1] 4
# Covariates buy precision: kappa shrinks with R^2.
compute_kappa(p = 0.5, R2 = 0.2, var_outcome = 1) # 3.2
#> [1] 3.2
# Imbalanced assignment inflates kappa.
compute_kappa(p = 0.3, R2 = 0, var_outcome = 1) # ~ 4.76
#> [1] 4.761905