This R package performs multiply robust Mendelian randomization analysis with many invalid instruments.
Use the following command in R to install the package:
library(devtools)
devtools::install_github("https://github.com/zhonghualiu/MRSquared")
Y
a continuous outcome vector of length nA
a continuous exposure vector of length nG.mat
a n by K binary SNP matrixk
1<=k<=K, the number of valid IVs
The point estimate of the causal effect of A on Y and standard error.
library(MRSquared)