← Back to all sparks
M

MVMR

ANALYTICS
Velocity0.0

MVMR spent 2026 discovering its own estimators had been returning the wrong numbers

mendelian randomizationrcausal inferencegeneticscorrectnessinstrument strength
Current state
MVMR implements multivariable Mendelian randomization — conditional instrument strength, pleiotropy tests and heterogeneity-robust effect estimation from GWAS summary data. The package has been releasing steadily through 2026, and the substantive releases are all corrections rather than features. Two core routines were found to be computing the wrong quantity outright: qhet_mvmr() built weights from the minimised objective value instead of the minimiser, and strhet_mvmr() never minimised the Q-statistic at all.
Where it's heading
This is a sustained audit, not a maintenance drift. Each release since February has fixed a specific analytical defect — omitted intercepts in the exposure-on-genotype regressions, a division by zero when a gencov list held exactly two variants, covariance matrices computed wrongly for matrix inputs, a spurious covariance warning — and several explicitly warn that reported values will differ from previous versions. The strhet_mvmr() rewrite to iteratively reweighted least squares also removes a combinatorial grid that could exhaust memory past three exposures, so the function is now usable as well as correct.
Prediction
The corrections have been walking through the package function by function, and the ones with published fixes so far are the heterogeneity and covariance routines; the remaining untouched estimators are the natural next stop if the audit continues at this pace.

Recent moves

  1. 1mo ago

    MVMR rewrites strhet_mvmr() after finding it never minimised Q

    The sharpest entry in the audit. strhet_mvmr() previously built a combinatorial candidate grid with combn() and never minimised the Q-statistic, so the conditional F-statistics it returned were invalid — and the grid could exhaust memory with four or more exposures. It now uses iteratively reweighted least squares and returns distinct, well-identified statistics per exposure. Any instrument-strength assessment from an earlier version needs redoing.

    View source ↗
  2. 1mo ago

    MVMR corrects qhet_mvmr() weights and three covariance bugs

    Four defects in one release, one of them changing effect estimates: qhet_mvmr() now builds weights from the estimated heterogeneity parameter rather than the minimised objective value. Alongside it, snpcov_mvmr() returns correct covariance matrices for matrix input, strength_mvmr() and pleiotropy_mvmr() stop dividing by zero on a two-variant gencov list, and ivw_mvmr() drops a warning that never applied to its estimates.

    View source ↗
  3. 3mo ago

    New vignette on estimating phenotypic correlations

    Documentation only — a vignette covering how to estimate the phenotypic correlations the covariance functions consume.

    View source ↗
  4. 3mo ago

    MVMR 0.4.5

    A roxygen2 bump and a package-level help file. No behaviour change.

    View source ↗
  5. 4mo ago

    MVMR 0.4.4

    Unspecified codebase optimizations — the release note gives no detail on what changed or whether results are affected.

    View source ↗
  6. 5mo ago

    MVMR restores intercepts omitted from snpcov_mvmr() regressions

    The first of the year's correctness fixes: snpcov_mvmr() had been fitting its exposure-on-genotype regressions without intercepts. Small in text, but it sets the pattern the rest of 2026 follows — core statistical routines quietly computing something other than what they document.

    View source ↗