Fits the LD Score regression of single-variant chi-square statistics on their
LD scores, returning the intercept (the confounding-only inflation
factor), the slope (polygenicity), and the confounding ratio, each with a
chromosome block-jackknife standard error. The intercept is the principled
calibration factor for calibrate_pvalues (method =
"ldsc_intercept") and the GLOW M2 Z-scaling.
ldsc_regression(chi2, ld, chr, winsorize = 80, two_pass = TRUE)Numeric vector of single-variant chi-square statistics (\(Z^2\)).
Numeric vector of LD scores (from compute_ld_scores),
aligned to chi2.
Vector (character/integer) of chromosomes, aligned to chi2;
defines the jackknife blocks.
Numeric cap applied to \(\chi^2\) inside the fit (default
80).
Logical; if TRUE (default) use the heteroskedasticity-
weighted second pass, else stop after pass 1.
A one-row data.frame: n_variants, lambda_gc,
mean_chi2, intercept, intercept_se, slope,
slope_se, confounding_ratio, ratio_se. The
intercept is the confounding-only inflation factor.
The model (Bulik-Sullivan et al. 2015) is $$E[\chi^2_j] = 1 + N a + \frac{N h^2}{M}\,\ell_j,$$ where \(\ell_j\) is the LD score. The fitted intercept estimates \(1 + Na\) (here \(a\) is the model's confounding parameter – not the intercept itself); \((\mathrm{intercept} - 1)\) is the confounding contribution and the slope \(\propto h^2/M\) is polygenicity. The confounding ratio $$\mathrm{ratio} = \frac{\mathrm{intercept} - 1}{\overline{\chi^2} - 1}$$ is the fraction of the inflation due to confounding rather than polygenicity – a more robust read-out than \(\lambda_{\mathrm{GC}}\), which itself grows with \(N\) under pure polygenicity.
The fit is weighted two-pass least squares: pass 1 weights by
\(1/\max(\ell, 1)\) (LD double-counting); pass 2 multiplies in a
\((1 + \max(\widehat{\mathrm{slope}}, 0)\,\ell)^{-2}\) heteroskedasticity
weight. Standard errors (intercept, slope, ratio) come from a
chromosome block jackknife over unique(chr). \(\chi^2\) is
winsorised at winsorize inside the fit for robustness; the reported
lambda_gc uses the un-winsorised \(\chi^2\).
QC is the caller's responsibility. Pass already-QC'd, matched
(chi2, ld, chr) (standard LDSC QC: common variants, e.g.
\(\mathrm{MAF} \ge 0.01\); exclude the MHC; keys matched to the LD-score
table). Non-finite (chi2, ld) pairs are dropped.
Bulik-Sullivan B. et al. (2015). LD Score regression distinguishes confounding from polygenicity in GWAS. Nat Genet 47:291.