ivonesamplemr

Stata package for one-sample Mendelian randomization / instrumental variable analyses

https://github.com/remlapmot/ivonesamplemr

Science Score: 57.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.6%) to scientific vocabulary

Keywords

instrumental-variable instrumental-variables mendelian-randomisation mendelian-randomization mendelianrandomisation mendelianrandomization stata
Last synced: 6 months ago · JSON representation ·

Repository

Stata package for one-sample Mendelian randomization / instrumental variable analyses

Basic Info
Statistics
  • Stars: 2
  • Watchers: 2
  • Forks: 1
  • Open Issues: 0
  • Releases: 2
Topics
instrumental-variable instrumental-variables mendelian-randomisation mendelian-randomization mendelianrandomisation mendelianrandomization stata
Created over 4 years ago · Last pushed 8 months ago
Metadata Files
Readme License Citation

README.md

ivonesamplemr Stata package

One-sample Mendelian randomization (MR) / instrumental variable (IV) analyses in Stata.

Latest updates

  • May 2025:
    • Reran certification scripts under StataNow 18.5
  • July 2024:
    • Amend legend position in ivmw and ivxtile to use the 6 o'clock position as per in Stata 17 and earlier
  • January 2024:
    • Reran certification scripts under Stata 18.0
  • August 2023:
    • Added a record of the Stata version in the certification scripts
  • April 2023:
    • The images in the package website now have accompanying alt text descriptions
    • Checked the certification scripts run under the latest Stata 17.0
    • Rewrote the website using Quarto
  • February 2023:
    • Updated the R Markdown code generating the website to use the CRAN version of the Statamarkdown package
  • November 2022:
    • For an example Mendelian randomization analysis using ivonesamplemr please see Madley-Dowd et al., Maternal vitamin D during pregnancy and offspring autism and autism-associated traits: a prospective cohort study, Molecular Autism, 2022, here
  • February 2022:

Description

The package includes implementations of:

  • additive structural mean model: see help ivasmm
  • logistic structural mean model: see help ivlsmm
  • multiplicative structural mean model: see help ivmsmm
  • two-stage predictor substitution estimators: see ivtsps
  • two-stage residual inclusion estimators: see help ivtsri
  • moving window (a.k.a. sliding/rolling window) versions of these estimators: see help ivmw
  • performing estimation within quantiles of the first stage residuals: see help ivxtile

The ivtsps and ivtsri commands implement the following link functions for the second stage model:

  • identity (i.e. linear regression) - for a binary outcome this estimates a causal risk difference
  • logadd (log additive, i.e. Poisson/log-binomial regression) and logmult (log multiplicative, i.e. gamma regression) - for a binary outcome these estimate a causal risk ratio
  • logit (i.e. logistic regression) - for a binary outcome this estimates a causal odds ratio

Installation

Install the ivonesamplemr package within Stata using stata net install github, from("https://haghish.github.io/github/") github install remlapmot/ivonesamplemr

Or use the following code stata net install ivonesamplemr, from("https://raw.github.com/remlapmot/ivonesamplemr/main/") replace do "https://raw.github.com/remlapmot/ivonesamplemr/main/dependency.do"

Launch the main package helpfile with stata help ivonesamplemr

To check for an update to the package run within Stata stata adoupdate ivonesamplemr, update

Uninstall the package within Stata using stata ado uninstall ivonesamplemr

Owner

  • Name: Tom Palmer
  • Login: remlapmot
  • Kind: user

Averaging statistician ...

Citation (CITATION.cff)

cff-version: 1.2.0
message: "Please cite this software using the metadata below."
authors:
- family-names: "Palmer"
  given-names: "Tom"
  orcid: "https://orcid.org/0000-0003-4655-4511"
title: "ivonesamplemr - Stata package for one-sample Mendelian randomization and instrumental variable analyses"
type: software
version: 0.1.0
date-released: 2021-09-11
repository-code: "https://github.com/remlapmot/ivonesamplemr"
license: GPL-3.0

GitHub Events

Total
  • Watch event: 1
  • Push event: 3
  • Fork event: 1
  • Create event: 1
Last Year
  • Watch event: 1
  • Push event: 3
  • Fork event: 1
  • Create event: 1

Issues and Pull Requests

Last synced: 9 months ago

All Time
  • Total issues: 0
  • Total pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: less than a minute
  • Total issue authors: 0
  • Total pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • remlapmot (1)
Top Labels
Issue Labels
Pull Request Labels