Package: OneSampleMR 0.1.9.9000

Tom Palmer

OneSampleMR: One Sample Mendelian Randomization and Instrumental Variable Analyses

Useful functions for one-sample (individual level data) Mendelian randomization and instrumental variable analyses. The package includes implementations of; the Sanderson and Windmeijer (2016) <doi:10.1016/j.jeconom.2015.06.004> conditional F-statistic, the multiplicative structural mean model Hernán and Robins (2006) <doi:10.1097/01.ede.0000222409.00878.37>, the logistic structural mean model Vansteelandt and Goetghebeur (2003) <doi:10.1046/j.1369-7412.2003.00417.x>, and two-stage predictor substitution and two-stage residual inclusion estimators explained by Terza et al. (2008) <doi:10.1016/j.jhealeco.2007.09.009>.

Authors:Tom Palmer [aut, cre], Wes Spiller [aut], Eleanor Sanderson [aut], Nicolai Vitt [aut]

OneSampleMR_0.1.9.9000.tar.gz
OneSampleMR_0.1.9.9000.zip(r-4.7-any)OneSampleMR_0.1.9.9000.zip(r-4.6-any)OneSampleMR_0.1.9.9000.zip(r-4.5-any)
OneSampleMR_0.1.9.9000.tgz(r-4.6-any)OneSampleMR_0.1.9.9000.tgz(r-4.5-any)
OneSampleMR_0.1.9.9000.tar.gz(r-4.7-any)OneSampleMR_0.1.9.9000.tar.gz(r-4.6-any)
OneSampleMR_0.1.9.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
OneSampleMR/json (API)

# Install 'OneSampleMR' in R:
install.packages('OneSampleMR', repos = c('https://mrcieu.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/remlapmot/onesamplemr/issues

Pkgdown/docs site:https://remlapmot.github.io

On CRAN:

Conda:

instrumental-variableinstrumental-variablesmendelian-randomisationmendelian-randomizationmendelianrandomisationmendelianrandomization

7.39 score 27 stars 30 scripts 588 downloads 5 exports 74 dependencies

Last updated from:aab23b81bd. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK167
source / vignettesOK471
linux-releaseOK157
macos-releaseOK91
macos-oldrelOK167
windows-develOK106
windows-releaseOK98
windows-oldrelOK97
wasm-releaseOK115

Exports:fswlsmmmsmmtspstsri

Dependencies:abindbackportsbootbroomcarcarDataclicolorspacecowplotcpp11DerivdoBydplyrexpmfarverforecastFormulafracdiffgenericsggplot2gluegmmgtableisobandivreglabelinglatticelifecyclelme4lmtestmagrittrMASSMatrixMatrixModelsmgcvminqamodelrmsmmvtnormnlmenloptrnnetnumDerivpbkrtestpillarpkgconfigpurrrquantregR6rbibutilsRColorBrewerRcppRcppArmadilloRcppEigenRdpackreformulasrlangS7sandwichscalesSparseMstringistringrsurvivaltibbletidyrtidyselecttimeDateurcautf8vctrsviridisLitewithrzoo

Comparison of conditional F-statistics
Run fsw() on ivreg() model object | Run fsw() on AER::ivreg() model object | Run fsw() on estimatr::iv_robust() model object | Run fsw() on fixest::feols() model object | Comparison with F-statistic from lfe package | Comparison with output from ivreg2

Last update: 2026-10-22
Started: 2021-08-19

Comparison fits of the multiplicative structural mean model
Comparison fits

Last update: 2026-07-28
Started: 2021-08-19

Readme and manuals

Help Manual

Help pageTopics
Additive structural mean modelasmm
Conditional F-statistic of Sanderson and Windmeijer (2016)fsw fsw.fixest fsw.ivreg fsw.iv_robust print.fsw
Logistic structural mean modellsmm
Multiplicative structural mean modelmsmm
Summarizing LSMM Fitsprint.lsmm print.summary.lsmm summary.lsmm
Summarizing MSMM Fitsprint.msmm print.summary.msmm summary.msmm
Summarizing TSPS Fitsprint.summary.tsps print.tsps summary.tsps
Summarizing TSRI Fitsprint.summary.tsri print.tsri summary.tsri
Two-stage predictor substitution (TSPS) estimatorstsps
Two-stage residual inclusion (TSRI) estimatorstsri