| overlap_coef | R Documentation |
Two calling conventions are provided:
Supply ps and Z. The empirical formula is
\hat\phi = \frac{\mathrm{E}[\sqrt{e(1-e)}]}{\sqrt{r(1-r)}},
where r = \mathrm{E}[Z]. This is the sample mean of
\sqrt{e_i(1-e_i)} divided by \sqrt{\hat r(1-\hat r)}.
Supply a and b. Under the
\mathrm{Beta}(a,b) approximation,
\phi = \exp\!\Bigl[
\log\Gamma(a+\tfrac12) - \tfrac12\log a - \log\Gamma(a)
+ \log\Gamma(b+\tfrac12) - \tfrac12\log b - \log\Gamma(b)
\Bigr].
overlap_coef(ps = NULL, Z = NULL, a = NULL, b = NULL)
ps |
Numeric vector of estimated propensity scores
|
Z |
Integer or numeric vector of treatment indicators
( |
a |
Shape parameter |
b |
Shape parameter |
Computes the Bhattacharyya overlap coefficient \phi, a scalar
measure of propensity score overlap between the treatment and control
groups. Values close to 1 indicate near-complete overlap (little
confounding); values well below 1 indicate poor overlap.
A list with components:
phiThe overlap coefficient \hat\phi.
rTreatment proportion: mean(Z) (empirical) or
a / (a + b) (analytical).
Chengxin Yang, Bo Liu, and Fan Li. Sample size and power calculations for causal inference with time-to-event outcomes. arXiv preprint arXiv:2605.10088 (2026).
Bo Liu, Chengxin Yang, and Fan Li. Sample size and power calculations for causal inference with continuous and binary outcomes. Annals of Statistics (2026).
power_ps, power_cox
# From propensity scores
set.seed(1)
n <- 500
X <- rnorm(n)
ps <- plogis(0.5 * X)
Z <- rbinom(n, 1, ps)
overlap_coef(ps = ps, Z = Z)
# From Beta parameters
overlap_coef(a = 2, b = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.