Software code

A GitHub-editable document containing software code for running Mendelian randomization is available: document is here, project is here. Please read through and get in touch if you spot any typos, or else edit yourself! The document currently contains mostly R code with some Stata code, but other software code would be welcome. This is a new initiative: feedback is very welcome.

Generic code for performing instrumental variable analyses with Stata, R, SAS, and WinBUGS is provided in Section 4.6 (Computer application). Specific code for implementing methods in particular situations (for example, with missing data or with summarized data) is provided in the appendix of the relevant paper (see the Papers section of the website for links).

Web applets

Sample size calculation with a continuous or binary outcome: http://cnsgenomics.com/shiny/mRnd/

Sample size calculation with a continuous or binary outcome: http://sb452.shinyapps.io/power/

Fieller’s theorem for confidence intervals with a single instrumental variable: http://sb452.shinyapps.io/fieller/

Likelihood-based method (with heterogeneity test) with summarized data: http://sb452.shinyapps.io/summarized/