mixIE_MA_DP | R Documentation |
This is the main function of mixIE-MA method with data perturbation.
mixIE_MA_DP(
b_exp,
b_out,
se_exp,
se_out,
n,
flip = 1,
B = 200,
thres_e = Inf,
diagnostic_plot = FALSE,
point_size = 1,
...
)
b_exp |
A vector of SNP effects on the exposure variable, usually obtained from a GWAS. |
b_out |
A vector of SNP effects on the outcome variable, usually obtained from a GWAS. |
se_exp |
A vector of standard errors of |
se_out |
A vector of standard errors of |
n |
Sample size of either one of the GWAS dataset. |
flip |
Whether to reorient the SNPs like Egger regression? |
B |
Number of data perturbation, default is 200. |
thres_e |
Could ignore this. |
diagnostic_plot |
Should the function returns diagnostic plots? Default is FALSE |
point_size |
The size of points in the IV scatter plot. |
... |
Arguments to be passed to |
A list
Estimated causal effect from mixIE-MA
Estimate standard error for mixIE_MA_theta
Two-sided p-value of mixIE_MA_theta
Estimated proportion of invalid IVs from mixIE-MA
A vector of (averaged) posterior probabilities of each IVs being invalid from mixIE-MA
Estimated causal effect from mixIE-MA-DP
Estimate standard error for mixIE_MA_DP_theta
Two-sided p-value of mixIE_MA_DP_theta
Estimated proportion of invalid IVs from mixIE-MA-DP
A vector of posterior probabilities of each IVs being invalid from mixIE-MA-DP
set.seed(1)
result = mixIE_MA_DP(b_exp=FG_T2D$beta_hat_1,
b_out=FG_T2D$beta_hat_2,
se_exp=FG_T2D$seb1,
se_out = FG_T2D$seb2,
flip=1,
n=69033)
result
## Diagnostic plot
set.seed(1)
result = mixIE_MA_DP(b_exp=FG_T2D$beta_hat_1,
b_out=FG_T2D$beta_hat_2,
se_exp=FG_T2D$seb1,
se_out = FG_T2D$seb2,
flip=1,
n=69033,diagnostic_plot=TRUE)
## Compare IVs' posterior probability from mixIE-MA and mixIE-MA-DP
result$iv_barplot
## Histogram of estimates from data perturbation
result$est_hist
## GWAS scatter plot (red points are valid IVs, blue points are invalid IVs)
result$scatter_og.plot # mixIE-MA
result$scatter_dp.plot # mixIE-MA-DP
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.