Skip to content

TwoSampleMR 0.7.9

Latest

Choose a tag to compare

@remlapmot remlapmot released this 24 Jun 09:36
· 10 commits to master since this release
3d119f2
  • Fixed inflated bootstrap standard errors (and p-values) in mr_mode() and mr_rucker_bootstrap() introduced in v0.6.30. The pre-generated rnorm() matrix was filled column-by-column while the per-SNP means and standard errors recycled element-wise, so each bootstrap draw was taken from the wrong SNP's distribution; the means and SEs are now laid out with rep(..., each = nboot) so each column draws from its own SNP. Point estimates were unaffected. (thanks @peterk87 reported in #684)
  • Fixed mr_rucker_bootstrap() which errored ("values must be length 1") because it accessed the per-combination result ($rucker, $Q, $res, $selected) directly while mr_rucker() returns a list with one element per exposure-outcome combination; it now unwraps the first element.
  • Fixed mr_rucker_cooksdistance(), which had the same return-shape problem: $cooksdistance was NULL so the Cook's distance filtering loop never ran and a malformed object was returned; it now unwraps the first element.
  • Added regression tests for the mr_mode() and mr_rucker_bootstrap() bootstrap standard errors and for mr_rucker_cooksdistance().