Skip to contents

Computes the effective sample size N_eff = 4 / (1/nCase + 1/nControl) = 4 * nCase * nControl / (nCase + nControl) for case/control GWAS. Balanced studies (nCase == nControl) recover the total nCase + nControl; imbalanced studies give a smaller value, which is the statistically correct sample size for the RSS likelihood, residual-variance estimation, kriging, and the N-cutoff filter. Vectorized over nCase / nControl; entries where either count is NA or <= 0 return NA_real_.

Usage

effectiveN(nCase, nControl)

Arguments

nCase

Numeric vector of case counts.

nControl

Numeric vector of control counts.

Value

Numeric vector of effective sample sizes (NA_real_ where a count is missing or non-positive).

References

Privé et al., "Identifying and correcting for misspecifications in GWAS summary statistics and polygenic scores", HGG Advances 2022.