Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 771 Bytes

File metadata and controls

28 lines (20 loc) · 771 Bytes

Best Linear Unbiased Prediction (BLUP)

Under the infinitesimal model, with per-s.d. effect sizes β ~ N(0, D), BLUP effect sizes are:

$$ E(\beta) = \sqrt{n} D (nD + R^{-1})^{-1} R^{-1}z $$

where GraphLD approximates $R^{-1}$ with the LDGM precision matrix.

import polars as pl
import graphld as gld

sumstats_with_weights: pl.DataFrame = gld.run_blup(
    ldgm_metadata_path="data/metadata.csv",
    sumstats=sumstats_dataframe_with_z_scores,
    heritability=0.1,
)

This workflow assumes heritability is equally distributed among the variants with Z scores provided, corresponding to $D = m^{-1} h^2 I$.

See also: