Description Usage Arguments Value Author(s)
A function to simulate the performance of different MR methods from the MendelianRandomization package in scenarios of reverse causality.
1 2 3 4 | reverseMRsim(n = 1000, nSNP = 3, MAF = c(0.2, 0.2, 0.2),
gamma0 = 0, gammaX = c(0.2, 0.2, 0.2), varM = 1, beta0 = 0,
betaM = c(0, 0.1), varY = 1, nSim = 100, plot.pdf = T,
plot.name = "reverseMRsim.pdf", alpha_level = 0.05, SEED = 1)
|
n |
is the sample size |
nSNP |
is the number of SNPS to generate |
MAF |
is a vector of the MAF of each SNP |
gamma0 |
is the intercept for M |
gammaX |
is a vector of the associations of each SNP with M |
varM |
is the variance of M |
beta0 |
is the intercept for Y |
betaM |
is a vector of different associations of M with Y |
varY |
is the variance of Y |
nSim |
is the number of simulations to run |
plot.pdf |
is T to output a plot, is F to not output a plot |
plot.name |
is the name of the plot |
alpha_level |
is the significance level |
SEED |
is the seed |
a matrix of the power of three Mendelian Randomization approaches from the MendelianRandomization package to detect an effect of the mediator M on the outcome Y when M and Y are correctly specified and also when they are incorrectly specified (the true mediator is Y and the true outcome is M)
Annie Thwing, Sharon Lutz
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.