[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EBQ8XRNMTVJBQDPGYXK8A8":3,"skill-same:01M7EBQ8XRNMTVJBQDPGYXK8A8":78},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":14,"repositoryHtmlUrl":33,"repositoryHomepageUrl":33,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":35,"install":36,"resources":49},"01M7EBQ8XRNMTVJBQDPGYXK8A8","bio-causal-genomics-pleiotropy-detection",null,"Detect and adjust for horizontal pleiotropy in two-sample Mendelian randomization by distinguishing uncorrelated (UHP) from correlated (CHP) pleiotropy and choosing among Egger, MR-PRESSO, MR-RAPS, CAUSE, LHC-MR, LCV, MR-Clust, MR-Mix, and contamination-mixture methods. Use when validating an MR causal claim, running the STROBE-MR sensitivity battery, suspecting a shared heritable confounder, working under weak-instrument or polygenic-exposure regimes, or reconciling discordant estimates across robust methods.","Mr-Nobody-Anonymous\u002FAll-skills","Mr-Nobody-Anonymous","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F184253119?v=4","01M7AEXFJHKTYQW5R0ZCQQTWFV","anonymous","01M7C00M3GQR4QKP9GZA42GFAK",0,"MIT","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-causal-genomics-pleiotropy-detection\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: bio-causal-genomics-pleiotropy-detection\ndescription: Detect and adjust for horizontal pleiotropy in two-sample Mendelian randomization by distinguishing uncorrelated (UHP) from correlated (CHP) pleiotropy and choosing among Egger, MR-PRESSO, MR-RAPS, CAUSE, LHC-MR, LCV, MR-Clust, MR-Mix, and contamination-mixture methods. Use when validating an MR causal claim, running the STROBE-MR sensitivity battery, suspecting a shared heritable confounder, working under weak-instrument or polygenic-exposure regimes, or reconciling discordant estimates across robust methods.\ntool_type: r\nprimary_tool: TwoSampleMR\nsource: \"https:\u002F\u002Fgithub.com\u002FGPTomics\u002FbioSkills\"\nsource_repository: \"GPTomics\u002FbioSkills\"\nsource_path: \"causal-genomics\u002Fpleiotropy-detection\u002FSKILL.md\"\nlicense: \"MIT\"\nimported_at: \"2026-09-20\"\n---\n\n## Version Compatibility\n\nReference examples tested with: TwoSampleMR 0.5.11+, MendelianRandomization 0.9.0+, MR-PRESSO 1.0+, CAUSE 1.2.0+, MR-Clust 0.1.0+, MRMix 0.1+, mr.raps 0.4.1+ (GitHub), LHC-MR 0.0.0.9000+ (GitHub), LCV (script-based, no version tag), simex 1.8+.\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- R: `packageVersion('\u003Cpkg>')` then `?function_name` to verify parameters\n- For GitHub-only packages, check the repo HEAD vs the local install date\n\nIf code throws errors, introspect the installed package and adapt the example rather than retrying.\n\n# Pleiotropy Detection in Mendelian Randomization\n\n**\"Validate my MR result against pleiotropic bias\"** -> Decompose violations of the exclusion-restriction assumption into uncorrelated horizontal pleiotropy (UHP, addressable by Egger \u002F median \u002F mode \u002F MR-PRESSO) and correlated horizontal pleiotropy (CHP, addressable only by CAUSE \u002F LHC-MR \u002F LCV), then run a method battery whose assumptions span both regimes.\n\n- R: `TwoSampleMR::mr()` (IVW + Egger + median + mode), `mr_pleiotropy_test()`, `mr_heterogeneity()`, `mr_leaveoneout()`, `directionality_test()`\n- R: `MRPRESSO::mr_presso()` for UHP outlier removal + distortion test\n- R: `cause::cause()` for CHP-aware estimation; `mrclust::mr_clust_em()` for mechanism-heterogeneous instruments\n- R: `MendelianRandomization::mr_conmix()` for contamination mixture; `MRMix::MRMix()` for mixture-of-distributions\n\n## UHP vs CHP: The Central Postdoc-Grade Distinction\n\nHorizontal pleiotropy comes in two regimes, and most \"standard\" MR sensitivity methods address only one of them.\n\n| Regime | Definition | InSIDE assumption | Methods that handle it |\n|--------|------------|--------------------|------------------------|\n| UHP (uncorrelated horizontal pleiotropy) | Pleiotropic effect alpha_j independent of instrument-exposure effect gamma_j | Holds | IVW (balanced UHP only), MR-Egger, weighted median, weighted mode, MR-PRESSO, MR-RAPS, MR-Mix, contamination mixture |\n| CHP (correlated horizontal pleiotropy) | alpha_j correlates with gamma_j through a shared upstream factor (heritable confounder, network mediator) | Violated | CAUSE, LHC-MR, LCV, MR-Clust (partial), Steiger-filtered MR (partial) |\n\n**InSIDE = INstrument Strength Independent of Direct Effect** (Bowden 2015 IJE 44:512). Plain English: across SNPs, the per-SNP pleiotropic effect alpha and per-SNP instrument-exposure effect gamma are treated as independent random variables. CHP is the case where they covary because both flow from a shared upstream genetic factor.\n\n**The trap (Morrison 2020 Nat Genet 52:740):** IVW, MR-Egger, MR-PRESSO, and GSMR are all blind to CHP. Under a shared heritable confounder they each return a plausible-looking corrected causal estimate that is systematically biased in the direction of the confounder. The MR-PRESSO global test does not flag CHP because correlated pleiotropy is not an outlier pattern, it is a population mean shift in the alpha distribution conditional on gamma.\n\n**Operational rule:** If genetic correlation rg(exposure, outcome) is high (LDSC `>= 0.3`) or biology strongly suggests a shared upstream factor, the IVW \u002F Egger \u002F PRESSO triple is insufficient. Add CAUSE (preferred when sig SNPs `>= 100`) or LHC-MR (preferred for polygenic genome-wide IVs).\n\n## Operational Decision Flow (4 Steps)\n\n1. **Compute genetic correlation (LDSC).** Run `ldsc.py --rg \u003Cexposure.sumstats.gz>,\u003Coutcome.sumstats.gz>` (see causal-genomics\u002Fgenetic-correlation). If `|rg| > 0.3`, CHP is plausible -> flag for Step 3 escalation. If the LDSC rg standard error spans zero broadly, treat low-rg evidence as weak rather than confirming absence of CHP.\n2. **Standard battery.** IVW (random-effects when Cochran Q p \u003C 0.05) + MR-Egger (with NOME I^2_GX check) + weighted median + weighted mode + MR-PRESSO (NbDistribution `>= 10000` for stringent reporting). Report all five with point estimate, SE, p, 95% CI, and n_SNPs_used. Compute Egger I^2_GX; apply SIMEX if I^2_GX \u003C 0.9 (see examples\u002Fsimex_egger_correction.R).\n3. **CHP escalation.** Trigger when rg > 0.3 OR PRESSO global p \u003C 0.05 with > 50% nominal outliers OR Egger \u002F median \u002F mode disagree by > 2 SE. Run CAUSE (if `>= 100` significant SNPs after pruning) or LHC-MR (any N; uses genome-wide sumstats). Report ELPD delta + z + q (CHP fraction) + gamma (CHP-adjusted causal estimate).\n4. **Triangulate.** Pre-MR Steiger filter; bidirectional MR (examples\u002Fbidirectional_mr.R); LCV gcp; LDSC rg report. Consensus across methods supports a publication-ready claim. Disagreement requires narrowing the scope (e.g., subgroup, cis-MR, time-varying analysis) rather than reporting a single point estimate.\n\n## Algorithmic Taxonomy\n\n| Method | Models | UHP-robust | CHP-robust | Min #SNPs | Fails when | Citation |\n|--------|--------|-----------|-----------|-----------|------------|----------|\n| Inverse-variance weighted (IVW) | Weighted regression through origin | Balanced UHP only | No | 3 | Directional UHP; CHP; weak IV bias; heterogeneity | Burgess 2013 Genet Epidemiol 37:658 |\n| MR-Egger intercept + slope | IVW + free intercept | Directional UHP | No | >=10 for power | NOME violated (I^2_GX \u003C 0.9); \u003C10 SNPs; CHP | Bowden 2015 IJE 44:512 |\n| Weighted median | Median of Wald ratios | Up to 50% invalid | No | >=10 | >50% invalid; CHP | Bowden 2016 Genet Epidemiol 40:304 |\n| Weighted mode (MBE) | Mode of estimate density | Plurality valid | Partial | >=10 | Multimodal estimates from CHP clusters | Hartwig 2017 IJE 46:1985 |\n| Cochran Q | Heterogeneity across Wald ratios | Total heterogeneity flag, not direction-specific | No | 3 | Cannot distinguish UHP from heterogeneity from CHP | Del Greco M F 2015 Stat Med 34:2926 |\n| MR-PRESSO | Detect + remove UHP outliers via RSS-out | Yes (assumes majority valid) | No | >=4 | >50% pleiotropic; any CHP; small n | Verbanck 2018 Nat Genet 50:693 |\n| GSMR + HEIDI-outlier | Outlier removal via single-instrument estimate heterogeneity | Yes | No | >=10 | CHP (HEIDI-outlier is heterogeneity-driven) | Zhu 2018 Nat Commun 9:224 |\n| MR-RAPS | Profile likelihood with overdispersion + Huber\u002FTukey loss | Yes; weak-IV robust | Partial via overdispersion | >=10 | Strong CHP | Zhao 2020 Ann Stat 48:1742 |\n| MR-Mix | Mixture-of-distributions over valid + invalid | Yes | Partial | >=20 | Few SNPs; very heterogeneous CHP | Qi & Chatterjee 2019 Nat Commun 10:1941 |\n| Contamination mixture | Profile likelihood over contamination fraction | Yes | Partial | >=20 | Few SNPs | Burgess 2020 Nat Commun 11:376 |\n| MR-Clust | k-means over Wald estimates with NULL cluster | Yes | Diagnostic for CHP via clusters | >=20 | Single-mechanism exposure (no clustering signal) | Foley 2021 Bioinformatics 37:531 |\n| CAUSE | Bayesian mixture: shared causal + shared-factor (CHP) components | Yes | Yes (explicit) | >=100 sig SNPs at p\u003C5e-8 | \u003C100 sig SNPs; non-overlapping GWAS samples | Morrison 2020 Nat Genet 52:740 |\n| LHC-MR | Latent heritable confounder + bidirectional + heritability | Yes | Yes | Genome-wide GWAS sumstats | Heritability mis-estimated; severe sample overlap | Darrous 2021 Nat Commun 12:7274 |\n| LCV (latent causal variable) | gcp parameter on genome-wide rg | N\u002FA (not an MR method) | Diagnostic | Genome-wide GWAS sumstats | Heritability low; non-Gaussian effect distribution | O'Connor & Price 2018 Nat Genet 50:1728 |\n\nMethodology evolves; verify against the Burgess & Thompson textbook (2nd ed 2021), Hemani 2018 (basic four-method battery), and Sanderson 2022 Nat Rev Methods Primers 2:6 before locking a sensitivity battery.\n\n## Decision Tree by Scenario\n\n| Scenario | Primary estimator | Sensitivity \u002F triangulation |\n|----------|-------------------|----------------------------|\n| Many strong IVs, no biological shared trait suspected | IVW + Egger + weighted median + weighted mode + PRESSO | Cochran Q; leave-one-out; F-stat; Steiger filtering |\n| LDSC rg(exposure, outcome) `>= 0.3` or strong shared-factor biology | CAUSE (if sig SNPs `>= 100`) OR LHC-MR | LCV gcp; cross-check IVW after Steiger filter |\n| Many weak IVs (mean F \u003C 20) | MR-RAPS with overdispersion + robust Huber loss | MR-Mix or contamination mixture; report F-stat range |\n| Suspected heterogeneous causal mechanisms (e.g. LDL on CHD via multiple lipoprotein pathways) | MR-Clust; report per-cluster IVW | Pathway annotation of cluster instruments; Bayesian mixture |\n| Cis-MR drug target (single locus, few SNPs in LD) | Colocalization (causal-genomics\u002Fcolocalization-analysis) + Steiger | PWCoCo; conditional analysis; not Egger (low SNP count) |\n| Polygenic exposure (heritability spread genome-wide; few significant loci) | LHC-MR (uses all SNPs) | LDSC rg; genome-wide IVW with weak-IV-aware methods (RAPS) |\n| Reverse causation suspected | Bidirectional MR with Steiger filter; LHC-MR (jointly estimates both directions) | directionality_test; effect-size r2 comparison |\n| Population-level summary discordant with biology | Re-examine instrument selection; check Winner's curse; LD pruning settings | Triangulate with cis-MR; family-based MR if available |\n\n## Per-Method Failure Modes\n\n### MR-Egger NOME violation\n\n**Trigger:** I^2_GX = (Q_GX - df) \u002F Q_GX is below 0.9, indicating measurement-error attenuation of the Egger slope (NOME = \"no measurement error\" in the exposure GWAS effect sizes).\n\n**Mechanism:** MR-Egger regresses outcome effects on exposure effects with a free intercept. Imprecise exposure effects (high beta.exposure SE relative to beta.exposure variability across instruments) introduce regression dilution that pulls the Egger slope toward the null and inflates the intercept.\n\n**Symptom:** Egger slope much closer to zero than IVW, weighted median, and weighted mode estimates; large Egger SE.\n\n**Fix:** Apply SIMEX correction (Bowden 2016 IJE 45:1961; Cook & Stefanski 1994 JASA 89:1314 SIMEX framework) using the `simex` package on the Egger regression, treating beta.exposure SE as measurement error. See examples\u002Fsimex_egger_correction.R. Alternative: use MR-RAPS, which models the exposure-effect error explicitly via profile likelihood and does not suffer the NOME failure.\n\n### MR-PRESSO majority-outlier breakdown\n\n**Trigger:** More than 50% of instruments are pleiotropic (UHP), e.g. when instrument set was loosely selected (genome-wide significant but unfiltered).\n\n**Mechanism:** MR-PRESSO's global RSS-out statistic and outlier detection both assume a majority-valid set; outliers are defined relative to that majority. With a pleiotropic majority, PRESSO removes the valid minority.\n\n**Symptom:** PRESSO-corrected estimate is similar in magnitude (and sign) to the uncorrected estimate even after dropping nominally \"outlier\" SNPs; distortion-test p-value paradoxically non-significant; few or no outliers detected despite obvious global-test significance.\n\n**Fix:** Do not trust PRESSO corrected estimate. Re-examine instrument selection (drop loose p-thresholds, prune LD harder); switch to CAUSE or LHC-MR; consider weighted-mode estimator which is plurality-valid rather than majority-valid.\n\n### MR-PRESSO false negative under CHP\n\n**Trigger:** Strong shared heritable confounder (high rg) producing CHP. Confirmed by significant LDSC rg or LCV gcp.\n\n**Mechanism:** Correlated pleiotropy is a population-level mean shift in alpha conditional on gamma; it is not an outlier pattern. PRESSO's RSS-out distance is invariant under such a mean shift, so the global test is not powered against CHP.\n\n**Symptom:** PRESSO global p > 0.05 (no detected pleiotropy) while a CHP-aware method (CAUSE, LHC-MR) returns a substantially different (often null) causal estimate.\n\n**Fix:** When CHP is plausible, ALWAYS run CAUSE or LHC-MR in addition to PRESSO; do not rely on PRESSO global non-significance as evidence of no pleiotropy.\n\n### MR-Egger underpowered with few SNPs\n\n**Trigger:** Fewer than 10 instruments.\n\n**Mechanism:** Egger's intercept variance is driven by the spread of beta.exposure across instruments; with few SNPs the intercept CI is so wide that even strongly pleiotropic data give non-significant intercepts.\n\n**Symptom:** Non-significant Egger intercept p-value alongside obviously discordant IVW and weighted-median estimates.\n\n**Fix:** Report intercept point estimate and CI rather than a binary \"pleiotropy present \u002F absent\" verdict; do not use Egger as the only sensitivity method when SNP count is low; weight evidence toward weighted-median, weighted-mode, and CAUSE \u002F LHC-MR.\n\n### Steiger filter inverted by exposure measurement error (Hemani 2017)\n\n**Trigger:** Exposure is imprecisely measured (lower heritability ascertained in the exposure GWAS) and outcome is well-measured.\n\n**Mechanism:** Steiger compares r^2_GX vs r^2_GY per SNP. Measurement error in the exposure underestimates r^2_GX; well-measured outcome captures r^2_GY accurately. Per-SNP, the inequality can flip even when the true causal direction is exposure -> outcome.\n\n**Symptom:** A large fraction of instruments fail Steiger (`steiger_dir == FALSE`) in a direction that conflicts with biological plausibility.\n\n**Fix:** Interpret Steiger as one signal among many, not a hard gate; cross-check with bidirectional MR; verify exposure GWAS heritability and sample size; switch to LHC-MR which models both directions jointly and accounts for heritability.\n\n### CAUSE underpowered with few significant SNPs\n\n**Trigger:** Fewer than 100 genome-wide-significant instruments (p \u003C 5e-8) after harmonization and LD pruning.\n\n**Mechanism:** CAUSE fits a Bayesian mixture model over a shared-factor (CHP) component, a shared-causal component, and a null component. Posterior identification of the mixture weights requires substantial signal across many SNPs.\n\n**Symptom:** CAUSE delta_ELPD CI crosses zero; Pareto-k diagnostic flags unstable points; posterior intervals on q (CHP fraction) span [0, 1].\n\n**Fix:** Use LCV gcp for genome-wide directional inference (does not require many significant SNPs); use LHC-MR if heritability and sumstats are available; or report CAUSE alongside an explicit caveat about its underpowered regime.\n\n### LCV gcp under non-Gaussian effect distributions\n\n**Trigger:** Highly polygenic trait with substantial sparsity in true effects (mixture of large-effect and zero-effect loci).\n\n**Mechanism:** LCV assumes a bivariate normal model for effect sizes after LDSC adjustment. Sparse architectures (e.g. immune traits with HLA dominance) violate this and bias gcp estimates.\n\n**Symptom:** LCV gcp point estimate appears extreme but heritability LDSC z-scores are modest; partitioned heritability shows extreme HLA enrichment.\n\n**Fix:** Exclude HLA region from LDSC inputs; complement with CAUSE \u002F LHC-MR; report gcp with awareness of the polygenicity caveat.\n\n## Quantitative Thresholds\n\n| Metric | Threshold | Source \u002F rationale |\n|--------|-----------|--------------------|\n| F-statistic per SNP | `>=10` strong; `\u003C10` weak | Burgess 2011 IJE 40:755 (rule of thumb); weak-IV bias toward observational confounded estimate |\n| I^2_GX (NOME) | `>=0.9` Egger reliable | Bowden 2016 IJE 45:1961 |\n| I^2_GX (NOME) intermediate | 0.6-0.9 SIMEX-corrected Egger | Bowden 2016 IJE |\n| I^2_GX (NOME) severe | `\u003C0.6` drop Egger; use MR-RAPS or CAUSE | Bowden 2016 IJE; SIMEX unreliable below 0.6 |\n| Egger min SNP count for adequate power | `>=10` | Bowden 2015 IJE 44:512 |\n| Cochran Q significance | p \u003C 0.05 indicates heterogeneity | Del Greco M F 2015 Stat Med 34:2926 |\n| MR-PRESSO NbDistribution | 1000 exploratory; `>=5000` publication; `>=10000` stringent | Verbanck 2018 Nat Genet 50:693 (Methods) |\n| MR-PRESSO global test p | \u003C 0.05 -> heterogeneity \u002F outliers present | Verbanck 2018 Nat Genet |\n| MR-PRESSO distortion test p | \u003C 0.05 -> outliers materially shifted estimate; if `>= 0.05` report uncorrected IVW | Verbanck 2018 Nat Genet |\n| MR-PRESSO min instruments | `>=4` to run; `>=10` for non-degenerate global test | Verbanck 2018 Nat Genet |\n| MR-PRESSO SignifThreshold | 0.05 default | Verbanck 2018 Nat Genet |\n| MR-PRESSO majority-valid breakdown | Fails when `>50%` instruments pleiotropic | Verbanck 2018 Nat Genet (theoretical limit) |\n| Weighted median validity | Robust to `\u003C=50%` invalid IVs | Bowden 2016 Genet Epidemiol 40:304 |\n| Weighted mode validity | Plurality-valid (largest valid subset is most common estimate) | Hartwig 2017 IJE 46:1985 |\n| CAUSE min #SNPs | `>=100` p \u003C 5e-8 SNPs after pruning | Morrison 2020 Nat Genet 52:740 (Supplement) |\n| CAUSE delta_ELPD criterion | one-sided p \u003C 0.05; z = delta_elpd \u002F se(delta_elpd); z > 1.96 standard; z > 3.0 stringent | Morrison 2020 Nat Genet |\n| LDSC rg suggesting CHP | `>= 0.3` flags need for CAUSE \u002F LHC-MR | Operational rule; see causal-genomics\u002Fgenetic-correlation |\n| Steiger r^2 difference | Reverse-causal flag at any per-SNP r2_GY > r2_GX | Hemani 2017 PLoS Genet 13:e1007081 |\n| Standard sensitivity battery | IVW + Egger + median + mode + PRESSO + Steiger + LOO | Hemani 2018 eLife 7:e34408 \u002F STROBE-MR 2021 |\n\nLCV gcp interpretation thresholds (0, 0.5, 0.6, 1) are tabulated in usage-guide.md.\n\n## Standard Sensitivity Battery (Working Reference)\n\n**Goal:** Run the canonical UHP-focused MR sensitivity suite on harmonized two-sample data.\n\n**Approach:** Compute IVW + Egger + median + mode side-by-side; test Egger intercept and heterogeneity; run MR-PRESSO with `>=5000` distributions for publication or `>=10000` for stringent reporting; apply Steiger filter; leave-one-out; report all estimates.\n\n```r\nlibrary(TwoSampleMR)\nlibrary(MRPRESSO)\n\nmethods \u003C- c('mr_ivw', 'mr_egger_regression', 'mr_weighted_median', 'mr_weighted_mode')\nres_mr \u003C- mr(dat, method_list = methods)\n\nhet \u003C- mr_heterogeneity(dat)\npleio \u003C- mr_pleiotropy_test(dat)\nloo \u003C- mr_leaveoneout(dat)\nsteiger \u003C- directionality_test(dat)\n\nisq \u003C- Isq(dat$beta.exposure, dat$se.exposure)\nnome_pass \u003C- isq >= 0.9\n\npresso \u003C- mr_presso(\n    BetaOutcome='beta.outcome', BetaExposure='beta.exposure',\n    SdOutcome='se.outcome', SdExposure='se.exposure',\n    OUTLIERtest=TRUE, DISTORTIONtest=TRUE,\n    data=dat, NbDistribution=10000, SignifThreshold=0.05)\n\nglobal_p \u003C- presso$`MR-PRESSO results`$`Global Test`$Pvalue\noutlier_p \u003C- presso$`MR-PRESSO results`$`Outlier Test`$Pvalue\ndistortion_p \u003C- presso$`MR-PRESSO results`$`Distortion Test`$Pvalue\nn_outliers \u003C- sum(outlier_p \u003C 0.05, na.rm=TRUE)\n```\n\nFull working pipeline incl SIMEX, MR-RAPS, contamination mixture, and STROBE-MR table: examples\u002Fsensitivity_battery.R.\n\n## CAUSE for CHP-Aware Estimation\n\n**Goal:** Distinguish causal from shared-factor (correlated horizontal pleiotropy) explanations of an exposure-outcome association.\n\n**Approach:** Fit nuisance parameters (LD pruning + rho_GWAS sample-overlap correction) on a random SNP set; fit the sharing and causal posterior; compare ELPD (expected log predictive density) via Pareto-k smoothed importance sampling.\n\n```r\nlibrary(cause)\nparams \u003C- est_cause_params(dat_cause, variants = pruned_subset_snps)\nres_cause \u003C- cause(X = dat_cause, variants = pruned_snps, param_ests = params)\nelpd \u003C- summary(res_cause)$tab\n```\n\nFull posterior extraction + reporting: examples\u002Fcause_analysis.R.\n\n**Interpreting CAUSE output:**\n\n- `q`: posterior CHP fraction; 0 = no CHP, 1 = all instruments operate via the shared factor\n- `eta`: shared-factor effect on Y (the \"confounder pathway\" magnitude)\n- `gamma`: posterior causal effect of E on Y after partialling out CHP; report median + 95% credible interval\n- `delta_ELPD` (sharing - causal): negative -> causal model preferred; z = delta_elpd \u002F se(delta_elpd); z > 1.96 standard, z > 3.0 stringent; one-sided p reported alongside posterior gamma\n- Pareto-k > 0.7 indicates unstable posterior on those points; if more than 10% of points are unstable, treat the posterior as unreliable; remediation: add more SNPs (loosen p-threshold one notch then re-prune in LD) or re-fit excluding flagged outliers\n\nCAUSE requires sumstats from both exposure and outcome GWAS in matched effect-allele coding. The pruning step typically retains 100-5000 signature SNPs at LD r^2 \u003C 0.01 in a 1 Mb window; nuisance estimation should use a larger random SNP subset (`>= 100,000` genome-wide SNPs) to fit rho (sample overlap) stably.\n\n## MR-RAPS Loss Function and Overdispersion\n\n**Trigger:** Weak instruments (mean F \u003C 20) and\u002For suspected UHP requiring outlier-resistant estimation.\n\n- `over.dispersion = TRUE` always for MR (horizontal-pleiotropy variance is real, not noise; turning this off underestimates SE)\n- `loss.function = 'huber'` (default; outlier-resistant; suited to mild to moderate UHP)\n- `loss.function = 'tukey'` (more aggressive; downweights extreme outliers more; choose when many obvious outliers suspected)\n- `loss.function = 'l2'` (non-robust; equivalent to weighted least squares; do not use when UHP suspected)\n\nTukey is preferable when leave-one-out reveals 2+ SNPs single-handedly shifting the IVW estimate by > 1 SE.\n\n## MR-Clust for Mechanism Heterogeneity\n\n**Goal:** When a single causal estimate is misleading because instruments operate through multiple causal mechanisms (e.g. LDL on CHD via multiple lipoprotein subfractions), identify clusters of instruments with similar per-SNP Wald ratios.\n\n```r\nlibrary(mrclust)\nratio_hat \u003C- dat$beta.outcome \u002F dat$beta.exposure\nratio_se \u003C- abs(dat$se.outcome \u002F dat$beta.exposure)\nres_mc \u003C- mr_clust_em(theta=ratio_hat, theta_se=ratio_se,\n                     bx=dat$beta.exposure, by=dat$beta.outcome,\n                     bxse=dat$se.exposure, byse=dat$se.outcome,\n                     obs_names=dat$SNP)\nper_cluster \u003C- res_mc$results$best\n```\n\nClusters with cluster_class = 'null' are pleiotropy-only instruments. Per-cluster IVW estimates may differ substantially; biological annotation of the SNPs in each cluster (pathway, target gene) is the interpretation step.\n\n## LHC-MR Workflow\n\n**Goal:** Jointly estimate forward causal effect, reverse causal effect, and the heritable-confounder contribution from genome-wide sumstats (not just significant SNPs).\n\n```r\nlibrary(lhcMR)\nmerged \u003C- merge_sumstats(list(df_x, df_y), c('X', 'Y'), LD.filepath='ldsc\u002FLDscores.txt', rho.filepath='ldsc\u002FLDrho.txt')\nsp_list \u003C- calculate_SP(merged, trait.names=c('X', 'Y'), run_ldsc=TRUE, run_MR=TRUE, hm3='ldsc\u002Fw_hm3.snplist', ld='ldsc\u002Feur_w_ld_chr\u002F', nStep=2, SP_single=3, SP_pair=50)\nres_lhc \u003C- lhc_mr(sp_list, trait.names=c('X', 'Y'), paral_method='lapply', nBlock=200, nCores=4)\n```\n\nLHC-MR is computationally heavy (hours on full sumstats) but among the most rigorous CHP-aware estimators when both GWAS are well-powered. Output includes axx, ayy, hxy (confounder effect on each trait), and bidirectional alpha_xy, alpha_yx.\n\n**Choosing CAUSE vs LHC-MR (Darrous 2021):**\n\n| Condition | Preferred method |\n|-----------|------------------|\n| `>= 100` genome-wide significant SNPs after pruning | CAUSE (Bayesian; CHP-explicit; mature posterior diagnostics) |\n| Polygenic exposure with few significant loci | LHC-MR (uses genome-wide signal, not just significant SNPs) |\n| Severe sample overlap between exposure and outcome GWAS | LHC-MR (jointly models overlap); CAUSE's rho correction is exposed to misspecification at high overlap |\n| Bidirectionality of central interest | LHC-MR (jointly estimates alpha_xy and alpha_yx); CAUSE only models forward |\n| Limited compute \u002F quick turnaround | CAUSE (minutes to hours); LHC-MR may be > 24h on full sumstats |\n\nWhen both apply, report both with the agreement \u002F disagreement explicit in the discussion.\n\n## Bidirectional MR Procedure\n\n1. **Forward MR:** instrument exposure E, test effect on outcome Y (primary)\n2. **Reverse MR:** instrument outcome Y, test effect on exposure E (using outcome-direction instruments)\n3. **Steiger pre-filter both directions:** `steiger_filtering(dat)`; drop SNPs where outcome r^2 > exposure r^2 before primary IVW\n4. **Compare estimates:** null reverse + significant forward strengthens the forward causal claim; bidirectional significance flags feedback \u002F shared confounder \u002F reciprocal causation\n5. **LCV gcp orthogonal check:** genome-wide directional inference independent of the instrument set\n\nWorking code: examples\u002Fbidirectional_mr.R.\n\n**Interpretation cheat-sheet:**\n\n| Forward p | Reverse p | Reading |\n|-----------|-----------|---------|\n| significant | non-significant | Forward causal claim strengthened |\n| non-significant | significant | Re-examine instrument-exposure assignment; the \"outcome\" may causally drive the \"exposure\" |\n| significant | significant | Feedback loop, shared confounder, or reciprocal causation; resolve with LHC-MR |\n| non-significant | non-significant | No evidence of causation in either direction |\n\nWhen forward and reverse both clear Steiger and both IVW p \u003C 0.05, run LHC-MR jointly rather than reporting two univariable estimates.\n\n## LCV (Latent Causal Variable)\n\nLCV uses LDSC-merged genome-wide sumstats and reports gcp (genetic causality proportion) on [-1, 1]. It is a complement to, not a replacement for, MR; gcp ~ 0 with high LDSC rg implies pure genetic correlation without partial causation.\n\n```r\nsource('LCV\u002FR\u002FRunLCV.R')\nres_lcv \u003C- RunLCV(ldscores$L2, x$Z, y$Z)\n# res_lcv$gcp; res_lcv$pval.gcpzero.2tailed\n```\n\nFull gcp interpretation table is in usage-guide.md.\n\n## Required Supplementary Tables\n\n**Instrument table** (one row per SNP retained for primary analysis):\n\n| Column | Content |\n|--------|---------|\n| rsID, chr, pos | Variant identifier and genome position |\n| EA, OA, EAF | Effect allele, other allele, effect allele frequency in exposure GWAS |\n| beta_E, se_E, p_E, F | Exposure-side estimate, SE, p-value, per-SNP F-statistic |\n| beta_Y, se_Y, p_Y | Outcome-side estimate, SE, p-value (harmonized to EA) |\n| harmonization_action | 1=kept, 2=flipped, 3=dropped (palindromic ambiguity) |\n| palindromic_flag | TRUE \u002F FALSE; tracked per Hartwig 2016 IJE 45:1717 |\n| Steiger_direction | forward \u002F reverse \u002F inconclusive |\n| Steiger_p | per-SNP directionality p-value |\n\n**Sensitivity-battery table** (one row per method):\n\n| Column | Content |\n|--------|---------|\n| method | IVW \u002F Egger \u002F WM \u002F WMode \u002F PRESSO (raw + corrected) \u002F RAPS \u002F CAUSE |\n| estimate, se, p, 95% CI | Point estimate and inference |\n| n_SNPs_used | Post-harmonization, post-Steiger SNP count |\n| heterogeneity_p | Q for IVW; Q' for Egger; global p for PRESSO |\n| intercept_p | Egger only (directional UHP test) |\n| ELPD_delta + z | CAUSE only (sharing - causal; negative + |z| > 1.96 -> causal) |\n\n## Reconciliation Across Methods\n\n| Pattern | Likely cause | Action |\n|---------|--------------|--------|\n| IVW and Egger agree (small Egger intercept); median and mode agree | Likely true causal; minimal pleiotropy | Report all; STROBE-MR; emphasize agreement |\n| IVW significant; Egger non-significant with similar slope; PRESSO global p > 0.05 | Egger underpowered (few SNPs) OR Egger NOME violated | Check I^2_GX; SIMEX-correct if 0.6 \u003C I^2_GX \u003C 0.9 |\n| IVW shifted relative to Egger \u002F median \u002F mode; Egger intercept significant | Directional UHP | Trust Egger slope; PRESSO-corrected IVW; mode estimator |\n| IVW + Egger + median + mode + PRESSO all agree but CAUSE delta_ELPD non-significant or in opposite direction | CHP via shared confounder | Trust CAUSE; report all five UHP methods alongside but flag the discordance; check LDSC rg |\n| All UHP methods agree; LCV gcp ~ 0 | Genetic correlation only, not causation | Causation evidence is weak; report rg explicitly; consider colocalization (cis-MR) instead |\n| MR-Clust shows >=2 distinct non-null clusters | Heterogeneous mechanisms | Report per-cluster estimates; do not summarize as a single effect |\n| Steiger fails on a substantial fraction of instruments | Reverse causation OR exposure measurement error | Run bidirectional MR; check exposure GWAS heritability; LHC-MR |\n| MR-PRESSO global p \u003C 0.05 but corrected estimate similar to uncorrected | >50% pleiotropic OR CHP masquerading as UHP | Re-prune instruments; switch to weighted-mode \u002F CAUSE \u002F LHC-MR |\n\n**Operational rule for publication:** Report IVW (primary), Egger slope + intercept, weighted median, weighted mode, MR-PRESSO global + distortion + corrected, Cochran Q, Steiger directionality, F-statistic distribution, I^2_GX (for Egger validity), and at least one CHP-aware method (CAUSE or LHC-MR) when rg `>= 0.3` or biology suggests shared upstream. Failure to report a CHP-aware result when CHP is plausible is a reviewer-flagged red flag since 2020.\n\n## Anticipated Reviewer Pushback\n\n| Pushback | Standard response |\n|----------|-------------------|\n| \"Was CHP checked for?\" | LDSC rg reported (causal-genomics\u002Fgenetic-correlation); if rg > 0.3, CAUSE or LHC-MR ran; q posterior reported |\n| \"Why CAUSE and not LHC-MR?\" | CAUSE preferred when `>= 100` significant SNPs available (Morrison 2020). LHC-MR preferred when significant-SNP set is small or polygenic, using genome-wide sumstats (Darrous 2021) |\n| \"Egger NOME?\" | I^2_GX computed; if 0.6 \u003C= I^2_GX \u003C 0.9, SIMEX correction applied; if \u003C 0.6, Egger dropped in favor of MR-RAPS |\n| \"PRESSO doesn't catch CHP?\" | Confirmed (Morrison 2020); CAUSE \u002F LHC-MR reported alongside PRESSO for that reason |\n| \"Steiger filter applied pre-MR or post?\" | Pre-MR: SNPs failing per-SNP Steiger directionality dropped before primary IVW |\n| \"Why no replication cohort?\" | Two-sample design uses independent exposure and outcome cohorts; if same biobank, MRlap used or noted as a limitation |\n| \"Why not just trust the IVW?\" | IVW assumes balanced UHP and no CHP; both violated routinely; sensitivity battery is the standard since STROBE-MR 2021 |\n| \"Effect size is implausibly large\" | Re-examine F-statistic distribution for weak IV bias; check Winner's curse; consider Wald ratio at a single strong instrument as sanity check |\n\n## STROBE-MR Reporting (Skrivankova 2021)\n\n| Item | Required content |\n|------|-----------------|\n| 1-3 | Title \u002F abstract \u002F background indicates this is an MR study; pre-registered protocol |\n| 4-7 | Study design, data sources, instrument selection criteria (p-threshold, LD clumping, MAF) |\n| 8-11 | Harmonization, palindrome handling, allele alignment |\n| 12-14 | F-statistic distribution; weak-instrument bias mitigation |\n| 15-17 | Primary MR method + all sensitivity methods + CHP-aware method when relevant |\n| 18-19 | Pleiotropy tests, Steiger, heterogeneity |\n| 20 | Discussion of remaining assumption violations; limitations |\n\nSub-items (30 total) detail per-method reporting. The full statement (JAMA 326:1614) and explanation (BMJ 375:n2233) are now reviewer-required at most cardiovascular and psychiatric journals since 2022.\n\n## Common Errors\n\n| Error \u002F symptom | Cause | Solution |\n|-----------------|-------|----------|\n| MR-PRESSO crashes with `Not enough intrumental variables` | Fewer than 4 SNPs | Need >=4 for PRESSO; for cis-MR with few SNPs use colocalization |\n| Egger intercept p \u003C 0.05 but I^2_GX = 0.5 | NOME violated; intercept is artifactually inflated | SIMEX-correct or do not trust Egger; use MR-RAPS instead |\n| `Isq()` not found | TwoSampleMR version where Isq is unexported | Compute manually: Q_GX = sum((beta_GX\u002Fse_GX)^2); I2 = (Q_GX - (n-1))\u002FQ_GX, clipped to [0,1] |\n| MR-RAPS `package not found` after CRAN install | CRAN-archived 2025-03-01 | `remotes::install_github('qingyuanzhao\u002Fmr.raps')`; call via `TwoSampleMR::mr_raps()` wrapper (MendelianRandomization does NOT export `mr_raps`) |\n| CAUSE delta_ELPD CI spans zero; Pareto-k > 0.7 | \u003C100 sig SNPs OR severe sample overlap | Use LHC-MR; or report CAUSE with the explicit caveat |\n| Steiger labels most instruments reverse-causal | Exposure GWAS imprecise OR sample size mismatch | Treat as one signal; cross-check with bidirectional MR |\n| LHC-MR runtime > 24h | Default nCores=1 on full sumstats | Use nCores >= 4; restrict to LDSC-overlapping SNPs first |\n| MR-PRESSO outliers all on same chromosome | Genome-wide LD not properly pruned; clumping window too narrow | Re-clump at r^2 \u003C 0.001 in 10 Mb window |\n| MR-Mix returns NA | Few SNPs OR no variation in mixture support | Need >=20 SNPs; default mixture grid may need tuning |\n\n## References\n\n- Bowden J et al 2015 Int J Epidemiol 44:512 (MR-Egger; InSIDE)\n- Bowden J et al 2016 Int J Epidemiol 45:1961 (NOME, I^2_GX, SIMEX)\n- Cook JR & Stefanski LA 1994 JASA 89:1314 (SIMEX framework)\n- Burgess S 2020 Nat Commun 11:376 (contamination mixture)\n- Burgess S & Thompson SG 2021 (Mendelian Randomization 2nd ed)\n- Darrous L et al 2021 Nat Commun 12:7274 (LHC-MR)\n- Foley CN et al 2021 Bioinformatics 37:531 (MR-Clust)\n- Hartwig FP et al 2017 Int J Epidemiol 46:1985 (weighted mode)\n- Hemani G et al 2017 PLoS Genet 13:e1007081 (Steiger orientation)\n- Hemani G et al 2018 eLife 7:e34408 (TwoSampleMR framework)\n- Morrison J et al 2020 Nat Genet 52:740 (CAUSE; CHP)\n- O'Connor LJ & Price AL 2018 Nat Genet 50:1728 (LCV)\n- Sanderson E et al 2022 Nat Rev Methods Primers 2:6 (MR Primer)\n- Skrivankova VW et al 2021 JAMA 326:1614 (STROBE-MR statement); BMJ 375:n2233 (explanation)\n- Verbanck M et al 2018 Nat Genet 50:693 (MR-PRESSO)\n- Zhao Q et al 2020 Ann Stat 48:1742 (MR-RAPS)\n\n## Related Skills\n\n- causal-genomics\u002Fmendelian-randomization - Primary causal estimation that this sensitivity battery validates\n- causal-genomics\u002Fgenetic-correlation - LDSC rg required for Step 1 of the decision flow; CHP escalation trigger\n- causal-genomics\u002Fcolocalization-analysis - Required for cis-MR drug-target signals where instruments are too few for Egger\n- causal-genomics\u002Ffine-mapping - Identify causal variants underlying instrument loci\n- causal-genomics\u002Fmediation-analysis - Multivariable MR for mediator-adjusted causal estimates\n- population-genetics\u002Fassociation-testing - GWAS summary statistics underlying MR instruments\n- clinical-biostatistics\u002Feffect-measures - Translate MR estimates to clinical effect measures\n","## Version Compatibility\n\nReference examples tested with: TwoSampleMR 0.5.11+, MendelianRandomization 0.9.0+, MR-PRESSO 1.0+, CAUSE 1.2.0+, MR-Clust 0.1.0+, MRMix 0.1+, mr.raps 0.4.1+ (GitHub), LHC-MR 0.0.0.9000+ (GitHub), LCV (script-based, no version tag), simex 1.8+.\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- R: `packageVersion('\u003Cpkg>')` then `?function_name` to verify parameters\n- For GitHub-only packages, check the repo HEAD vs the local install date\n\nIf code throws errors, introspect the installed package and adapt the example rather than retrying.\n\n# Pleiotropy Detection in Mendelian Randomization\n\n**\"Validate my MR result against pleiotropic bias\"** -> Decompose violations of the exclusion-restriction assumption into uncorrelated horizontal pleiotropy (UHP, addressable by Egger \u002F median \u002F mode \u002F MR-PRESSO) and correlated horizontal pleiotropy (CHP, addressable only by CAUSE \u002F LHC-MR \u002F LCV), then run a method battery whose assumptions span both regimes.\n\n- R: `TwoSampleMR::mr()` (IVW + Egger + median + mode), `mr_pleiotropy_test()`, `mr_heterogeneity()`, `mr_leaveoneout()`, `directionality_test()`\n- R: `MRPRESSO::mr_presso()` for UHP outlier removal + distortion test\n- R: `cause::cause()` for CHP-aware estimation; `mrclust::mr_clust_em()` for mechanism-heterogeneous instruments\n- R: `MendelianRandomization::mr_conmix()` for contamination mixture; `MRMix::MRMix()` for mixture-of-distributions\n\n## UHP vs CHP: The Central Postdoc-Grade Distinction\n\nHorizontal pleiotropy comes in two regimes, and most \"standard\" MR sensitivity methods address only one of them.\n\n| Regime | Definition | InSIDE assumption | Methods that handle it |\n|--------|------------|--------------------|------------------------|\n| UHP (uncorrelated horizontal pleiotropy) | Pleiotropic effect alpha_j independent of instrument-exposure effect gamma_j | Holds | IVW (balanced UHP only), MR-Egger, weighted median, weighted mode, MR-PRESSO, MR-RAPS, MR-Mix, contamination mixture |\n| CHP (correlated horizontal pleiotropy) | alpha_j correlates with gamma_j through a shared upstream factor (heritable confounder, network mediator) | Violated | CAUSE, LHC-MR, LCV, MR-Clust (partial), Steiger-filtered MR (partial) |\n\n**InSIDE = INstrument Strength Independent of Direct Effect** (Bowden 2015 IJE 44:512). Plain English: across SNPs, the per-SNP pleiotropic effect alpha and per-SNP instrument-exposure effect gamma are treated as independent random variables. CHP is the case where they covary because both flow from a shared upstream genetic factor.\n\n**The trap (Morrison 2020 Nat Genet 52:740):** IVW, MR-Egger, MR-PRESSO, and GSMR are all blind to CHP. Under a shared heritable confounder they each return a plausible-looking corrected causal estimate that is systematically biased in the direction of the confounder. The MR-PRESSO global test does not flag CHP because correlated pleiotropy is not an outlier pattern, it is a population mean shift in the alpha distribution conditional on gamma.\n\n**Operational rule:** If genetic correlation rg(exposure, outcome) is high (LDSC `>= 0.3`) or biology strongly suggests a shared upstream factor, the IVW \u002F Egger \u002F PRESSO triple is insufficient. Add CAUSE (preferred when sig SNPs `>= 100`) or LHC-MR (preferred for polygenic genome-wide IVs).\n\n## Operational Decision Flow (4 Steps)\n\n1. **Compute genetic correlation (LDSC).** Run `ldsc.py --rg \u003Cexposure.sumstats.gz>,\u003Coutcome.sumstats.gz>` (see causal-genomics\u002Fgenetic-correlation). If `|rg| > 0.3`, CHP is plausible -> flag for Step 3 escalation. If the LDSC rg standard error spans zero broadly, treat low-rg evidence as weak rather than confirming absence of CHP.\n2. **Standard battery.** IVW (random-effects when Cochran Q p \u003C 0.05) + MR-Egger (with NOME I^2_GX check) + weighted median + weighted mode + MR-PRESSO (NbDistribution `>= 10000` for stringent reporting). Report all five with point estimate, SE, p, 95% CI, and n_SNPs_used. Compute Egger I^2_GX; apply SIMEX if I^2_GX \u003C 0.9 (see examples\u002Fsimex_egger_correction.R).\n3. **CHP escalation.** Trigger when rg > 0.3 OR PRESSO global p \u003C 0.05 with > 50% nominal outliers OR Egger \u002F median \u002F mode disagree by > 2 SE. Run CAUSE (if `>= 100` significant SNPs after pruning) or LHC-MR (any N; uses genome-wide sumstats). Report ELPD delta + z + q (CHP fraction) + gamma (CHP-adjusted causal estimate).\n4. **Triangulate.** Pre-MR Steiger filter; bidirectional MR (examples\u002Fbidirectional_mr.R); LCV gcp; LDSC rg report. Consensus across methods supports a publication-ready claim. Disagreement requires narrowing the scope (e.g., subgroup, cis-MR, time-varying analysis) rather than reporting a single point estimate.\n\n## Algorithmic Taxonomy\n\n| Method | Models | UHP-robust | CHP-robust | Min #SNPs | Fails when | Citation |\n|--------|--------|-----------|-----------|-----------|------------|----------|\n| Inverse-variance weighted (IVW) | Weighted regression through origin | Balanced UHP only | No | 3 | Directional UHP; CHP; weak IV bias; heterogeneity | Burgess 2013 Genet Epidemiol 37:658 |\n| MR-Egger intercept + slope | IVW + free intercept | Directional UHP | No | >=10 for power | NOME violated (I^2_GX \u003C 0.9); \u003C10 SNPs; CHP | Bowden 2015 IJE 44:512 |\n| Weighted median | Median of Wald ratios | Up to 50% invalid | No | >=10 | >50% invalid; CHP | Bowden 2016 Genet Epidemiol 40:304 |\n| Weighted mode (MBE) | Mode of estimate density | Plurality valid | Partial | >=10 | Multimodal estimates from CHP clusters | Hartwig 2017 IJE 46:1985 |\n| Cochran Q | Heterogeneity across Wald ratios | Total heterogeneity flag, not direction-specific | No | 3 | Cannot distinguish UHP from heterogeneity from CHP | Del Greco M F 2015 Stat Med 34:2926 |\n| MR-PRESSO | Detect + remove UHP outliers via RSS-out | Yes (assumes majority valid) | No | >=4 | >50% pleiotropic; any CHP; small n | Verbanck 2018 Nat Genet 50:693 |\n| GSMR + HEIDI-outlier | Outlier removal via single-instrument estimate heterogeneity | Yes | No | >=10 | CHP (HEIDI-outlier is heterogeneity-driven) | Zhu 2018 Nat Commun 9:224 |\n| MR-RAPS | Profile likelihood with overdispersion + Huber\u002FTukey loss | Yes; weak-IV robust | Partial via overdispersion | >=10 | Strong CHP | Zhao 2020 Ann Stat 48:1742 |\n| MR-Mix | Mixture-of-distributions over valid + invalid | Yes | Partial | >=20 | Few SNPs; very heterogeneous CHP | Qi & Chatterjee 2019 Nat Commun 10:1941 |\n| Contamination mixture | Profile likelihood over contamination fraction | Yes | Partial | >=20 | Few SNPs | Burgess 2020 Nat Commun 11:376 |\n| MR-Clust | k-means over Wald estimates with NULL cluster | Yes | Diagnostic for CHP via clusters | >=20 | Single-mechanism exposure (no clustering signal) | Foley 2021 Bioinformatics 37:531 |\n| CAUSE | Bayesian mixture: shared causal + shared-factor (CHP) components | Yes | Yes (explicit) | >=100 sig SNPs at p\u003C5e-8 | \u003C100 sig SNPs; non-overlapping GWAS samples | Morrison 2020 Nat Genet 52:740 |\n| LHC-MR | Latent heritable confounder + bidirectional + heritability | Yes | Yes | Genome-wide GWAS sumstats | Heritability mis-estimated; severe sample overlap | Darrous 2021 Nat Commun 12:7274 |\n| LCV (latent causal variable) | gcp parameter on genome-wide rg | N\u002FA (not an MR method) | Diagnostic | Genome-wide GWAS sumstats | Heritability low; non-Gaussian effect distribution | O'Connor & Price 2018 Nat Genet 50:1728 |\n\nMethodology evolves; verify against the Burgess & Thompson textbook (2nd ed 2021), Hemani 2018 (basic four-method battery), and Sanderson 2022 Nat Rev Methods Primers 2:6 before locking a sensitivity battery.\n\n## Decision Tree by Scenario\n\n| Scenario | Primary estimator | Sensitivity \u002F triangulation |\n|----------|-------------------|----------------------------|\n| Many strong IVs, no biological shared trait suspected | IVW + Egger + weighted median + weighted mode + PRESSO | Cochran Q; leave-one-out; F-stat; Steiger filtering |\n| LDSC rg(exposure, outcome) `>= 0.3` or strong shared-factor biology | CAUSE (if sig SNPs `>= 100`) OR LHC-MR | LCV gcp; cross-check IVW after Steiger filter |\n| Many weak IVs (mean F \u003C 20) | MR-RAPS with overdispersion + robust Huber loss | MR-Mix or contamination mixture; report F-stat range |\n| Suspected heterogeneous causal mechanisms (e.g. LDL on CHD via multiple lipoprotein pathways) | MR-Clust; report per-cluster IVW | Pathway annotation of cluster instruments; Bayesian mixture |\n| Cis-MR drug target (single locus, few SNPs in LD) | Colocalization (causal-genomics\u002Fcolocalization-analysis) + Steiger | PWCoCo; conditional analysis; not Egger (low SNP count) |\n| Polygenic exposure (heritability spread genome-wide; few significant loci) | LHC-MR (uses all SNPs) | LDSC rg; genome-wide IVW with weak-IV-aware methods (RAPS) |\n| Reverse causation suspected | Bidirectional MR with Steiger filter; LHC-MR (jointly estimates both directions) | directionality_test; effect-size r2 comparison |\n| Population-level summary discordant with biology | Re-examine instrument selection; check Winner's curse; LD pruning settings | Triangulate with cis-MR; family-based MR if available |\n\n## Per-Method Failure Modes\n\n### MR-Egger NOME violation\n\n**Trigger:** I^2_GX = (Q_GX - df) \u002F Q_GX is below 0.9, indicating measurement-error attenuation of the Egger slope (NOME = \"no measurement error\" in the exposure GWAS effect sizes).\n\n**Mechanism:** MR-Egger regresses outcome effects on exposure effects with a free intercept. Imprecise exposure effects (high beta.exposure SE relative to beta.exposure variability across instruments) introduce regression dilution that pulls the Egger slope toward the null and inflates the intercept.\n\n**Symptom:** Egger slope much closer to zero than IVW, weighted median, and weighted mode estimates; large Egger SE.\n\n**Fix:** Apply SIMEX correction (Bowden 2016 IJE 45:1961; Cook & Stefanski 1994 JASA 89:1314 SIMEX framework) using the `simex` package on the Egger regression, treating beta.exposure SE as measurement error. See examples\u002Fsimex_egger_correction.R. Alternative: use MR-RAPS, which models the exposure-effect error explicitly via profile likelihood and does not suffer the NOME failure.\n\n### MR-PRESSO majority-outlier breakdown\n\n**Trigger:** More than 50% of instruments are pleiotropic (UHP), e.g. when instrument set was loosely selected (genome-wide significant but unfiltered).\n\n**Mechanism:** MR-PRESSO's global RSS-out statistic and outlier detection both assume a majority-valid set; outliers are defined relative to that majority. With a pleiotropic majority, PRESSO removes the valid minority.\n\n**Symptom:** PRESSO-corrected estimate is similar in magnitude (and sign) to the uncorrected estimate even after dropping nominally \"outlier\" SNPs; distortion-test p-value paradoxically non-significant; few or no outliers detected despite obvious global-test significance.\n\n**Fix:** Do not trust PRESSO corrected estimate. Re-examine instrument selection (drop loose p-thresholds, prune LD harder); switch to CAUSE or LHC-MR; consider weighted-mode estimator which is plurality-valid rather than majority-valid.\n\n### MR-PRESSO false negative under CHP\n\n**Trigger:** Strong shared heritable confounder (high rg) producing CHP. Confirmed by significant LDSC rg or LCV gcp.\n\n**Mechanism:** Correlated pleiotropy is a population-level mean shift in alpha conditional on gamma; it is not an outlier pattern. PRESSO's RSS-out distance is invariant under such a mean shift, so the global test is not powered against CHP.\n\n**Symptom:** PRESSO global p > 0.05 (no detected pleiotropy) while a CHP-aware method (CAUSE, LHC-MR) returns a substantially different (often null) causal estimate.\n\n**Fix:** When CHP is plausible, ALWAYS run CAUSE or LHC-MR in addition to PRESSO; do not rely on PRESSO global non-significance as evidence of no pleiotropy.\n\n### MR-Egger underpowered with few SNPs\n\n**Trigger:** Fewer than 10 instruments.\n\n**Mechanism:** Egger's intercept variance is driven by the spread of beta.exposure across instruments; with few SNPs the intercept CI is so wide that even strongly pleiotropic data give non-significant intercepts.\n\n**Symptom:** Non-significant Egger intercept p-value alongside obviously discordant IVW and weighted-median estimates.\n\n**Fix:** Report intercept point estimate and CI rather than a binary \"pleiotropy present \u002F absent\" verdict; do not use Egger as the only sensitivity method when SNP count is low; weight evidence toward weighted-median, weighted-mode, and CAUSE \u002F LHC-MR.\n\n### Steiger filter inverted by exposure measurement error (Hemani 2017)\n\n**Trigger:** Exposure is imprecisely measured (lower heritability ascertained in the exposure GWAS) and outcome is well-measured.\n\n**Mechanism:** Steiger compares r^2_GX vs r^2_GY per SNP. Measurement error in the exposure underestimates r^2_GX; well-measured outcome captures r^2_GY accurately. Per-SNP, the inequality can flip even when the true causal direction is exposure -> outcome.\n\n**Symptom:** A large fraction of instruments fail Steiger (`steiger_dir == FALSE`) in a direction that conflicts with biological plausibility.\n\n**Fix:** Interpret Steiger as one signal among many, not a hard gate; cross-check with bidirectional MR; verify exposure GWAS heritability and sample size; switch to LHC-MR which models both directions jointly and accounts for heritability.\n\n### CAUSE underpowered with few significant SNPs\n\n**Trigger:** Fewer than 100 genome-wide-significant instruments (p \u003C 5e-8) after harmonization and LD pruning.\n\n**Mechanism:** CAUSE fits a Bayesian mixture model over a shared-factor (CHP) component, a shared-causal component, and a null component. Posterior identification of the mixture weights requires substantial signal across many SNPs.\n\n**Symptom:** CAUSE delta_ELPD CI crosses zero; Pareto-k diagnostic flags unstable points; posterior intervals on q (CHP fraction) span [0, 1].\n\n**Fix:** Use LCV gcp for genome-wide directional inference (does not require many significant SNPs); use LHC-MR if heritability and sumstats are available; or report CAUSE alongside an explicit caveat about its underpowered regime.\n\n### LCV gcp under non-Gaussian effect distributions\n\n**Trigger:** Highly polygenic trait with substantial sparsity in true effects (mixture of large-effect and zero-effect loci).\n\n**Mechanism:** LCV assumes a bivariate normal model for effect sizes after LDSC adjustment. Sparse architectures (e.g. immune traits with HLA dominance) violate this and bias gcp estimates.\n\n**Symptom:** LCV gcp point estimate appears extreme but heritability LDSC z-scores are modest; partitioned heritability shows extreme HLA enrichment.\n\n**Fix:** Exclude HLA region from LDSC inputs; complement with CAUSE \u002F LHC-MR; report gcp with awareness of the polygenicity caveat.\n\n## Quantitative Thresholds\n\n| Metric | Threshold | Source \u002F rationale |\n|--------|-----------|--------------------|\n| F-statistic per SNP | `>=10` strong; `\u003C10` weak | Burgess 2011 IJE 40:755 (rule of thumb); weak-IV bias toward observational confounded estimate |\n| I^2_GX (NOME) | `>=0.9` Egger reliable | Bowden 2016 IJE 45:1961 |\n| I^2_GX (NOME) intermediate | 0.6-0.9 SIMEX-corrected Egger | Bowden 2016 IJE |\n| I^2_GX (NOME) severe | `\u003C0.6` drop Egger; use MR-RAPS or CAUSE | Bowden 2016 IJE; SIMEX unreliable below 0.6 |\n| Egger min SNP count for adequate power | `>=10` | Bowden 2015 IJE 44:512 |\n| Cochran Q significance | p \u003C 0.05 indicates heterogeneity | Del Greco M F 2015 Stat Med 34:2926 |\n| MR-PRESSO NbDistribution | 1000 exploratory; `>=5000` publication; `>=10000` stringent | Verbanck 2018 Nat Genet 50:693 (Methods) |\n| MR-PRESSO global test p | \u003C 0.05 -> heterogeneity \u002F outliers present | Verbanck 2018 Nat Genet |\n| MR-PRESSO distortion test p | \u003C 0.05 -> outliers materially shifted estimate; if `>= 0.05` report uncorrected IVW | Verbanck 2018 Nat Genet |\n| MR-PRESSO min instruments | `>=4` to run; `>=10` for non-degenerate global test | Verbanck 2018 Nat Genet |\n| MR-PRESSO SignifThreshold | 0.05 default | Verbanck 2018 Nat Genet |\n| MR-PRESSO majority-valid breakdown | Fails when `>50%` instruments pleiotropic | Verbanck 2018 Nat Genet (theoretical limit) |\n| Weighted median validity | Robust to `\u003C=50%` invalid IVs | Bowden 2016 Genet Epidemiol 40:304 |\n| Weighted mode validity | Plurality-valid (largest valid subset is most common estimate) | Hartwig 2017 IJE 46:1985 |\n| CAUSE min #SNPs | `>=100` p \u003C 5e-8 SNPs after pruning | Morrison 2020 Nat Genet 52:740 (Supplement) |\n| CAUSE delta_ELPD criterion | one-sided p \u003C 0.05; z = delta_elpd \u002F se(delta_elpd); z > 1.96 standard; z > 3.0 stringent | Morrison 2020 Nat Genet |\n| LDSC rg suggesting CHP | `>= 0.3` flags need for CAUSE \u002F LHC-MR | Operational rule; see causal-genomics\u002Fgenetic-correlation |\n| Steiger r^2 difference | Reverse-causal flag at any per-SNP r2_GY > r2_GX | Hemani 2017 PLoS Genet 13:e1007081 |\n| Standard sensitivity battery | IVW + Egger + median + mode + PRESSO + Steiger + LOO | Hemani 2018 eLife 7:e34408 \u002F STROBE-MR 2021 |\n\nLCV gcp interpretation thresholds (0, 0.5, 0.6, 1) are tabulated in usage-guide.md.\n\n## Standard Sensitivity Battery (Working Reference)\n\n**Goal:** Run the canonical UHP-focused MR sensitivity suite on harmonized two-sample data.\n\n**Approach:** Compute IVW + Egger + median + mode side-by-side; test Egger intercept and heterogeneity; run MR-PRESSO with `>=5000` distributions for publication or `>=10000` for stringent reporting; apply Steiger filter; leave-one-out; report all estimates.\n\n```r\nlibrary(TwoSampleMR)\nlibrary(MRPRESSO)\n\nmethods \u003C- c('mr_ivw', 'mr_egger_regression', 'mr_weighted_median', 'mr_weighted_mode')\nres_mr \u003C- mr(dat, method_list = methods)\n\nhet \u003C- mr_heterogeneity(dat)\npleio \u003C- mr_pleiotropy_test(dat)\nloo \u003C- mr_leaveoneout(dat)\nsteiger \u003C- directionality_test(dat)\n\nisq \u003C- Isq(dat$beta.exposure, dat$se.exposure)\nnome_pass \u003C- isq >= 0.9\n\npresso \u003C- mr_presso(\n    BetaOutcome='beta.outcome', BetaExposure='beta.exposure',\n    SdOutcome='se.outcome', SdExposure='se.exposure',\n    OUTLIERtest=TRUE, DISTORTIONtest=TRUE,\n    data=dat, NbDistribution=10000, SignifThreshold=0.05)\n\nglobal_p \u003C- presso$`MR-PRESSO results`$`Global Test`$Pvalue\noutlier_p \u003C- presso$`MR-PRESSO results`$`Outlier Test`$Pvalue\ndistortion_p \u003C- presso$`MR-PRESSO results`$`Distortion Test`$Pvalue\nn_outliers \u003C- sum(outlier_p \u003C 0.05, na.rm=TRUE)\n```\n\nFull working pipeline incl SIMEX, MR-RAPS, contamination mixture, and STROBE-MR table: examples\u002Fsensitivity_battery.R.\n\n## CAUSE for CHP-Aware Estimation\n\n**Goal:** Distinguish causal from shared-factor (correlated horizontal pleiotropy) explanations of an exposure-outcome association.\n\n**Approach:** Fit nuisance parameters (LD pruning + rho_GWAS sample-overlap correction) on a random SNP set; fit the sharing and causal posterior; compare ELPD (expected log predictive density) via Pareto-k smoothed importance sampling.\n\n```r\nlibrary(cause)\nparams \u003C- est_cause_params(dat_cause, variants = pruned_subset_snps)\nres_cause \u003C- cause(X = dat_cause, variants = pruned_snps, param_ests = params)\nelpd \u003C- summary(res_cause)$tab\n```\n\nFull posterior extraction + reporting: examples\u002Fcause_analysis.R.\n\n**Interpreting CAUSE output:**\n\n- `q`: posterior CHP fraction; 0 = no CHP, 1 = all instruments operate via the shared factor\n- `eta`: shared-factor effect on Y (the \"confounder pathway\" magnitude)\n- `gamma`: posterior causal effect of E on Y after partialling out CHP; report median + 95% credible interval\n- `delta_ELPD` (sharing - causal): negative -> causal model preferred; z = delta_elpd \u002F se(delta_elpd); z > 1.96 standard, z > 3.0 stringent; one-sided p reported alongside posterior gamma\n- Pareto-k > 0.7 indicates unstable posterior on those points; if more than 10% of points are unstable, treat the posterior as unreliable; remediation: add more SNPs (loosen p-threshold one notch then re-prune in LD) or re-fit excluding flagged outliers\n\nCAUSE requires sumstats from both exposure and outcome GWAS in matched effect-allele coding. The pruning step typically retains 100-5000 signature SNPs at LD r^2 \u003C 0.01 in a 1 Mb window; nuisance estimation should use a larger random SNP subset (`>= 100,000` genome-wide SNPs) to fit rho (sample overlap) stably.\n\n## MR-RAPS Loss Function and Overdispersion\n\n**Trigger:** Weak instruments (mean F \u003C 20) and\u002For suspected UHP requiring outlier-resistant estimation.\n\n- `over.dispersion = TRUE` always for MR (horizontal-pleiotropy variance is real, not noise; turning this off underestimates SE)\n- `loss.function = 'huber'` (default; outlier-resistant; suited to mild to moderate UHP)\n- `loss.function = 'tukey'` (more aggressive; downweights extreme outliers more; choose when many obvious outliers suspected)\n- `loss.function = 'l2'` (non-robust; equivalent to weighted least squares; do not use when UHP suspected)\n\nTukey is preferable when leave-one-out reveals 2+ SNPs single-handedly shifting the IVW estimate by > 1 SE.\n\n## MR-Clust for Mechanism Heterogeneity\n\n**Goal:** When a single causal estimate is misleading because instruments operate through multiple causal mechanisms (e.g. LDL on CHD via multiple lipoprotein subfractions), identify clusters of instruments with similar per-SNP Wald ratios.\n\n```r\nlibrary(mrclust)\nratio_hat \u003C- dat$beta.outcome \u002F dat$beta.exposure\nratio_se \u003C- abs(dat$se.outcome \u002F dat$beta.exposure)\nres_mc \u003C- mr_clust_em(theta=ratio_hat, theta_se=ratio_se,\n                     bx=dat$beta.exposure, by=dat$beta.outcome,\n                     bxse=dat$se.exposure, byse=dat$se.outcome,\n                     obs_names=dat$SNP)\nper_cluster \u003C- res_mc$results$best\n```\n\nClusters with cluster_class = 'null' are pleiotropy-only instruments. Per-cluster IVW estimates may differ substantially; biological annotation of the SNPs in each cluster (pathway, target gene) is the interpretation step.\n\n## LHC-MR Workflow\n\n**Goal:** Jointly estimate forward causal effect, reverse causal effect, and the heritable-confounder contribution from genome-wide sumstats (not just significant SNPs).\n\n```r\nlibrary(lhcMR)\nmerged \u003C- merge_sumstats(list(df_x, df_y), c('X', 'Y'), LD.filepath='ldsc\u002FLDscores.txt', rho.filepath='ldsc\u002FLDrho.txt')\nsp_list \u003C- calculate_SP(merged, trait.names=c('X', 'Y'), run_ldsc=TRUE, run_MR=TRUE, hm3='ldsc\u002Fw_hm3.snplist', ld='ldsc\u002Feur_w_ld_chr\u002F', nStep=2, SP_single=3, SP_pair=50)\nres_lhc \u003C- lhc_mr(sp_list, trait.names=c('X', 'Y'), paral_method='lapply', nBlock=200, nCores=4)\n```\n\nLHC-MR is computationally heavy (hours on full sumstats) but among the most rigorous CHP-aware estimators when both GWAS are well-powered. Output includes axx, ayy, hxy (confounder effect on each trait), and bidirectional alpha_xy, alpha_yx.\n\n**Choosing CAUSE vs LHC-MR (Darrous 2021):**\n\n| Condition | Preferred method |\n|-----------|------------------|\n| `>= 100` genome-wide significant SNPs after pruning | CAUSE (Bayesian; CHP-explicit; mature posterior diagnostics) |\n| Polygenic exposure with few significant loci | LHC-MR (uses genome-wide signal, not just significant SNPs) |\n| Severe sample overlap between exposure and outcome GWAS | LHC-MR (jointly models overlap); CAUSE's rho correction is exposed to misspecification at high overlap |\n| Bidirectionality of central interest | LHC-MR (jointly estimates alpha_xy and alpha_yx); CAUSE only models forward |\n| Limited compute \u002F quick turnaround | CAUSE (minutes to hours); LHC-MR may be > 24h on full sumstats |\n\nWhen both apply, report both with the agreement \u002F disagreement explicit in the discussion.\n\n## Bidirectional MR Procedure\n\n1. **Forward MR:** instrument exposure E, test effect on outcome Y (primary)\n2. **Reverse MR:** instrument outcome Y, test effect on exposure E (using outcome-direction instruments)\n3. **Steiger pre-filter both directions:** `steiger_filtering(dat)`; drop SNPs where outcome r^2 > exposure r^2 before primary IVW\n4. **Compare estimates:** null reverse + significant forward strengthens the forward causal claim; bidirectional significance flags feedback \u002F shared confounder \u002F reciprocal causation\n5. **LCV gcp orthogonal check:** genome-wide directional inference independent of the instrument set\n\nWorking code: examples\u002Fbidirectional_mr.R.\n\n**Interpretation cheat-sheet:**\n\n| Forward p | Reverse p | Reading |\n|-----------|-----------|---------|\n| significant | non-significant | Forward causal claim strengthened |\n| non-significant | significant | Re-examine instrument-exposure assignment; the \"outcome\" may causally drive the \"exposure\" |\n| significant | significant | Feedback loop, shared confounder, or reciprocal causation; resolve with LHC-MR |\n| non-significant | non-significant | No evidence of causation in either direction |\n\nWhen forward and reverse both clear Steiger and both IVW p \u003C 0.05, run LHC-MR jointly rather than reporting two univariable estimates.\n\n## LCV (Latent Causal Variable)\n\nLCV uses LDSC-merged genome-wide sumstats and reports gcp (genetic causality proportion) on [-1, 1]. It is a complement to, not a replacement for, MR; gcp ~ 0 with high LDSC rg implies pure genetic correlation without partial causation.\n\n```r\nsource('LCV\u002FR\u002FRunLCV.R')\nres_lcv \u003C- RunLCV(ldscores$L2, x$Z, y$Z)\n# res_lcv$gcp; res_lcv$pval.gcpzero.2tailed\n```\n\nFull gcp interpretation table is in usage-guide.md.\n\n## Required Supplementary Tables\n\n**Instrument table** (one row per SNP retained for primary analysis):\n\n| Column | Content |\n|--------|---------|\n| rsID, chr, pos | Variant identifier and genome position |\n| EA, OA, EAF | Effect allele, other allele, effect allele frequency in exposure GWAS |\n| beta_E, se_E, p_E, F | Exposure-side estimate, SE, p-value, per-SNP F-statistic |\n| beta_Y, se_Y, p_Y | Outcome-side estimate, SE, p-value (harmonized to EA) |\n| harmonization_action | 1=kept, 2=flipped, 3=dropped (palindromic ambiguity) |\n| palindromic_flag | TRUE \u002F FALSE; tracked per Hartwig 2016 IJE 45:1717 |\n| Steiger_direction | forward \u002F reverse \u002F inconclusive |\n| Steiger_p | per-SNP directionality p-value |\n\n**Sensitivity-battery table** (one row per method):\n\n| Column | Content |\n|--------|---------|\n| method | IVW \u002F Egger \u002F WM \u002F WMode \u002F PRESSO (raw + corrected) \u002F RAPS \u002F CAUSE |\n| estimate, se, p, 95% CI | Point estimate and inference |\n| n_SNPs_used | Post-harmonization, post-Steiger SNP count |\n| heterogeneity_p | Q for IVW; Q' for Egger; global p for PRESSO |\n| intercept_p | Egger only (directional UHP test) |\n| ELPD_delta + z | CAUSE only (sharing - causal; negative + |z| > 1.96 -> causal) |\n\n## Reconciliation Across Methods\n\n| Pattern | Likely cause | Action |\n|---------|--------------|--------|\n| IVW and Egger agree (small Egger intercept); median and mode agree | Likely true causal; minimal pleiotropy | Report all; STROBE-MR; emphasize agreement |\n| IVW significant; Egger non-significant with similar slope; PRESSO global p > 0.05 | Egger underpowered (few SNPs) OR Egger NOME violated | Check I^2_GX; SIMEX-correct if 0.6 \u003C I^2_GX \u003C 0.9 |\n| IVW shifted relative to Egger \u002F median \u002F mode; Egger intercept significant | Directional UHP | Trust Egger slope; PRESSO-corrected IVW; mode estimator |\n| IVW + Egger + median + mode + PRESSO all agree but CAUSE delta_ELPD non-significant or in opposite direction | CHP via shared confounder | Trust CAUSE; report all five UHP methods alongside but flag the discordance; check LDSC rg |\n| All UHP methods agree; LCV gcp ~ 0 | Genetic correlation only, not causation | Causation evidence is weak; report rg explicitly; consider colocalization (cis-MR) instead |\n| MR-Clust shows >=2 distinct non-null clusters | Heterogeneous mechanisms | Report per-cluster estimates; do not summarize as a single effect |\n| Steiger fails on a substantial fraction of instruments | Reverse causation OR exposure measurement error | Run bidirectional MR; check exposure GWAS heritability; LHC-MR |\n| MR-PRESSO global p \u003C 0.05 but corrected estimate similar to uncorrected | >50% pleiotropic OR CHP masquerading as UHP | Re-prune instruments; switch to weighted-mode \u002F CAUSE \u002F LHC-MR |\n\n**Operational rule for publication:** Report IVW (primary), Egger slope + intercept, weighted median, weighted mode, MR-PRESSO global + distortion + corrected, Cochran Q, Steiger directionality, F-statistic distribution, I^2_GX (for Egger validity), and at least one CHP-aware method (CAUSE or LHC-MR) when rg `>= 0.3` or biology suggests shared upstream. Failure to report a CHP-aware result when CHP is plausible is a reviewer-flagged red flag since 2020.\n\n## Anticipated Reviewer Pushback\n\n| Pushback | Standard response |\n|----------|-------------------|\n| \"Was CHP checked for?\" | LDSC rg reported (causal-genomics\u002Fgenetic-correlation); if rg > 0.3, CAUSE or LHC-MR ran; q posterior reported |\n| \"Why CAUSE and not LHC-MR?\" | CAUSE preferred when `>= 100` significant SNPs available (Morrison 2020). LHC-MR preferred when significant-SNP set is small or polygenic, using genome-wide sumstats (Darrous 2021) |\n| \"Egger NOME?\" | I^2_GX computed; if 0.6 \u003C= I^2_GX \u003C 0.9, SIMEX correction applied; if \u003C 0.6, Egger dropped in favor of MR-RAPS |\n| \"PRESSO doesn't catch CHP?\" | Confirmed (Morrison 2020); CAUSE \u002F LHC-MR reported alongside PRESSO for that reason |\n| \"Steiger filter applied pre-MR or post?\" | Pre-MR: SNPs failing per-SNP Steiger directionality dropped before primary IVW |\n| \"Why no replication cohort?\" | Two-sample design uses independent exposure and outcome cohorts; if same biobank, MRlap used or noted as a limitation |\n| \"Why not just trust the IVW?\" | IVW assumes balanced UHP and no CHP; both violated routinely; sensitivity battery is the standard since STROBE-MR 2021 |\n| \"Effect size is implausibly large\" | Re-examine F-statistic distribution for weak IV bias; check Winner's curse; consider Wald ratio at a single strong instrument as sanity check |\n\n## STROBE-MR Reporting (Skrivankova 2021)\n\n| Item | Required content |\n|------|-----------------|\n| 1-3 | Title \u002F abstract \u002F background indicates this is an MR study; pre-registered protocol |\n| 4-7 | Study design, data sources, instrument selection criteria (p-threshold, LD clumping, MAF) |\n| 8-11 | Harmonization, palindrome handling, allele alignment |\n| 12-14 | F-statistic distribution; weak-instrument bias mitigation |\n| 15-17 | Primary MR method + all sensitivity methods + CHP-aware method when relevant |\n| 18-19 | Pleiotropy tests, Steiger, heterogeneity |\n| 20 | Discussion of remaining assumption violations; limitations |\n\nSub-items (30 total) detail per-method reporting. The full statement (JAMA 326:1614) and explanation (BMJ 375:n2233) are now reviewer-required at most cardiovascular and psychiatric journals since 2022.\n\n## Common Errors\n\n| Error \u002F symptom | Cause | Solution |\n|-----------------|-------|----------|\n| MR-PRESSO crashes with `Not enough intrumental variables` | Fewer than 4 SNPs | Need >=4 for PRESSO; for cis-MR with few SNPs use colocalization |\n| Egger intercept p \u003C 0.05 but I^2_GX = 0.5 | NOME violated; intercept is artifactually inflated | SIMEX-correct or do not trust Egger; use MR-RAPS instead |\n| `Isq()` not found | TwoSampleMR version where Isq is unexported | Compute manually: Q_GX = sum((beta_GX\u002Fse_GX)^2); I2 = (Q_GX - (n-1))\u002FQ_GX, clipped to [0,1] |\n| MR-RAPS `package not found` after CRAN install | CRAN-archived 2025-03-01 | `remotes::install_github('qingyuanzhao\u002Fmr.raps')`; call via `TwoSampleMR::mr_raps()` wrapper (MendelianRandomization does NOT export `mr_raps`) |\n| CAUSE delta_ELPD CI spans zero; Pareto-k > 0.7 | \u003C100 sig SNPs OR severe sample overlap | Use LHC-MR; or report CAUSE with the explicit caveat |\n| Steiger labels most instruments reverse-causal | Exposure GWAS imprecise OR sample size mismatch | Treat as one signal; cross-check with bidirectional MR |\n| LHC-MR runtime > 24h | Default nCores=1 on full sumstats | Use nCores >= 4; restrict to LDSC-overlapping SNPs first |\n| MR-PRESSO outliers all on same chromosome | Genome-wide LD not properly pruned; clumping window too narrow | Re-clump at r^2 \u003C 0.001 in 10 Mb window |\n| MR-Mix returns NA | Few SNPs OR no variation in mixture support | Need >=20 SNPs; default mixture grid may need tuning |\n\n## References\n\n- Bowden J et al 2015 Int J Epidemiol 44:512 (MR-Egger; InSIDE)\n- Bowden J et al 2016 Int J Epidemiol 45:1961 (NOME, I^2_GX, SIMEX)\n- Cook JR & Stefanski LA 1994 JASA 89:1314 (SIMEX framework)\n- Burgess S 2020 Nat Commun 11:376 (contamination mixture)\n- Burgess S & Thompson SG 2021 (Mendelian Randomization 2nd ed)\n- Darrous L et al 2021 Nat Commun 12:7274 (LHC-MR)\n- Foley CN et al 2021 Bioinformatics 37:531 (MR-Clust)\n- Hartwig FP et al 2017 Int J Epidemiol 46:1985 (weighted mode)\n- Hemani G et al 2017 PLoS Genet 13:e1007081 (Steiger orientation)\n- Hemani G et al 2018 eLife 7:e34408 (TwoSampleMR framework)\n- Morrison J et al 2020 Nat Genet 52:740 (CAUSE; CHP)\n- O'Connor LJ & Price AL 2018 Nat Genet 50:1728 (LCV)\n- Sanderson E et al 2022 Nat Rev Methods Primers 2:6 (MR Primer)\n- Skrivankova VW et al 2021 JAMA 326:1614 (STROBE-MR statement); BMJ 375:n2233 (explanation)\n- Verbanck M et al 2018 Nat Genet 50:693 (MR-PRESSO)\n- Zhao Q et al 2020 Ann Stat 48:1742 (MR-RAPS)\n\n## Related Skills\n\n- causal-genomics\u002Fmendelian-randomization - Primary causal estimation that this sensitivity battery validates\n- causal-genomics\u002Fgenetic-correlation - LDSC rg required for Step 1 of the decision flow; CHP escalation trigger\n- causal-genomics\u002Fcolocalization-analysis - Required for cis-MR drug-target signals where instruments are too few for Egger\n- causal-genomics\u002Ffine-mapping - Identify causal variants underlying instrument loci\n- causal-genomics\u002Fmediation-analysis - Multivariable MR for mediator-adjusted causal estimates\n- population-genetics\u002Fassociation-testing - GWAS summary statistics underlying MR instruments\n- clinical-biostatistics\u002Feffect-measures - Translate MR estimates to clinical effect measures\n",{"name":5,"source":24,"license":15,"tool_type":25,"description":7,"imported_at":26,"source_path":27,"primary_tool":28,"source_repository":29},"https:\u002F\u002Fgithub.com\u002FGPTomics\u002FbioSkills","r","2026-09-20","causal-genomics\u002Fpleiotropy-detection\u002FSKILL.md","TwoSampleMR","GPTomics\u002FbioSkills","main","2d1750717747097b602acf30bd09a7cbd4b4c6ea","awesome_skills\u002Fbiology\u002Fbio-causal-genomics-pleiotropy-detection","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous","2026-11-09 11:45:36",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-causal-genomics-pleiotropy-detection",{"tool":42,"command":43},"bunx","bunx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-causal-genomics-pleiotropy-detection",{"tool":45,"command":46},"pnpm","pnpm dlx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-causal-genomics-pleiotropy-detection","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-causal-genomics-pleiotropy-detection\u002FSKILL.md",true,[50,56,60,64,68,72],{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"examples\u002Fbidirectional_mr.R","OTHER","其他",2507,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-causal-genomics-pleiotropy-detection\u002Fexamples\u002Fbidirectional_mr.R",{"path":57,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":58,"sourceHtmlUrl":59},"examples\u002Fcause_analysis.R",5742,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-causal-genomics-pleiotropy-detection\u002Fexamples\u002Fcause_analysis.R",{"path":61,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":62,"sourceHtmlUrl":63},"examples\u002Fmr_presso_analysis.R",2765,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-causal-genomics-pleiotropy-detection\u002Fexamples\u002Fmr_presso_analysis.R",{"path":65,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":66,"sourceHtmlUrl":67},"examples\u002Fsensitivity_battery.R",6841,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-causal-genomics-pleiotropy-detection\u002Fexamples\u002Fsensitivity_battery.R",{"path":69,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":70,"sourceHtmlUrl":71},"examples\u002Fsimex_egger_correction.R",1645,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-causal-genomics-pleiotropy-detection\u002Fexamples\u002Fsimex_egger_correction.R",{"path":73,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":76,"sourceHtmlUrl":77},"usage-guide.md","REFERENCE","参考文档",9842,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-causal-genomics-pleiotropy-detection\u002Fusage-guide.md",[79,87,94,101,108,115],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":86},"01M7FFFZPC2025JQQHPHDX154J","dei-assessment","Assess diversity, equity, and inclusion with metrics. TRIGGERS - Use when user needs help with dei-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-assessment\u002FSKILL.md",[],[],"2026-11-16 10:05:34",{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":86},"01M7FFFWN8H4WA7A6Y398QKB6J","dei-action-plan","Create DEI action plans with goals and initiatives. TRIGGERS - Use when user needs help with dei-action-plan related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-action-plan\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":86},"01M7FFFSHTM0QZRVZ2NRJTJ0PY","culture-fit-assessment","Design culture add assessment processes. TRIGGERS - Use when user needs help with culture-fit-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fculture-fit-assessment\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":86},"01M7FFFMA12RKEQA38KHJSXXPS","cowork-to-code-bridge","Use an already-installed, independently verified cowork-to-code bridge to run narrowly approved actions on the user's own macOS, Linux, or WSL2 machine through a local file queue.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcowork-to-code-bridge\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":86},"01M7FFFH1F6M8YRGW5V487GH1K","counter-offer-response","Draft counter-offer responses for retention. TRIGGERS - Use when user needs help with counter-offer-response related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcounter-offer-response\u002FSKILL.md",[],[],{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":86},"01M7FFFDGEHV8Y7J9N40HZXW52","continuous-feedback-system","Design continuous feedback systems. TRIGGERS - Use when user needs help with continuous-feedback-system related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcontinuous-feedback-system\u002FSKILL.md",[],[]]