Computes ESS from importance weights: ESS = (sum(w))^2 / sum(w^2).
See also
Other density ratio and propensity:
assess_overlap(),
estimate_density_ratio(),
estimate_propensity(),
fit_density_ratio(),
plot_weights(),
predict_density_ratio()
Examples
w <- runif(100, 0.5, 2)
effective_sample_size(w)
#> [1] 88.3534
