mr.eo | R Documentation |
MR-EO Algorithm to Adaptively Find the Optimal Z-score Threhold.
mr.eo(
lambda.start,
beta.exposure,
beta.outcome,
se.exposure,
se.outcome,
pval.selection,
over.dispersion = FALSE,
max_opt_iter = 5
)
lambda.start |
Initial value for lambda (the z-score threshold). |
beta.exposure |
A vector of SNP effects on the exposure vairable, usually obtained from a GWAS |
beta.outcome |
A vector of SNP effects on the outcome vairable, usually obtained from a GWAS |
se.exposure |
A vecor of standard errors of |
se.outcome |
A vector of standard errors of |
pval.selection |
A vector of p-values calculated based on the selection dataset that is used for IV selection |
over.dispersion |
Should the model consider balanced horizontal pleiotropy. Default is FALSE |
max_opt_iter |
Maximum number of iterations. Default is 5 |
mr.eo
is an adaptive algorithm that finds the optimal z-socre threshold that leads to the dIVW estimator with the smallest variance.
A list
Optimal z-socre threshold
Number of iterations to find lambda.opt
Ting Ye, Jun Shao, Hyunseung Kang (2020). Debiased Inverse-Variance Weighted Estimator in Two-Sample Summary-Data Mendelian Randomization.https://arxiv.org/abs/1911.09802.
df<-data_gen_summary("case1")
attach(df)
lambda.opt<-mr.eo(0, beta.exposure, beta.outcome, se.exposure, se.outcome, pval.selection)$lambda.opt
mr.divw(beta.exposure, beta.outcome, se.exposure, se.outcome, pval.selection=pval.selection, lambda=lambda.opt)
detach(df)
data(bmi.cad)
attach(bmi.cad)
lambda.opt<-mr.eo(0, beta.exposure, beta.outcome, se.exposure, se.outcome, pval.selection)$lambda.opt
mr.divw(beta.exposure, beta.outcome, se.exposure, se.outcome, pval.selection=pval.selection, lambda=lambda.opt)
detach(bmi.cad)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.