| Title: | Flexible, Unified and Versatile Mendelian Randomization |
|---|---|
| Description: | A Bayesian Mendelian Randomization framework for causal effect estimation from GWAS summary statistics. Supports single and multiple exposure/outcome analyses with optional correlated horizontal pleiotropy. |
| Authors: | Bowei Kang [aut, cre], Sihao Feng [aut] |
| Maintainer: | Bowei Kang <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 2.0.0 |
| Built: | 2026-05-23 13:23:25 UTC |
| Source: | https://github.com/kangbw702/FusioMR |
Main function of the FusioMR package. Offer robust estimates the causal effect of an exposure on an outcome from GWAS summary statistics, using Bayesian hierarchical model and uses Gibbs sampling.
fusiomr( b_exp, se_exp, b_out, se_out, model = c("seso_uhp_only", "seso_with_chp", "semo", "memo"), control = parameter_control(), verbose = FALSE )fusiomr( b_exp, se_exp, b_out, se_out, model = c("seso_uhp_only", "seso_with_chp", "semo", "memo"), control = parameter_control(), verbose = FALSE )
b_exp |
Numeric vector of SNP-exposure effect estimates. |
se_exp |
Numeric vector of standard errors of |
b_out |
Numeric vector of SNP-outcome effect estimates. |
se_out |
Numeric vector of standard errors of |
model |
Character string. One of |
control |
A list of advanced prior hyper-parameters returned by
|
verbose |
Logical; if TRUE, print progress messages. |
A list with components
causal effect estimation
sd of the causal effect.
two-sided p-value
95% empirical credible interval.
The model used.
## Not run: set.seed(1) K <- 50 b_exp <- rnorm(K, 0, 0.1); se_exp <- rep(0.01, K) b_out <- 0.3 * b_exp + rnorm(K, 0, 0.01); se_out <- rep(0.01, K) model <- fusiomr(b_exp, se_exp, b_out, se_out, model = "seso_uhp_only") model$est; model$se; model$ci; ## End(Not run)## Not run: set.seed(1) K <- 50 b_exp <- rnorm(K, 0, 0.1); se_exp <- rep(0.01, K) b_out <- 0.3 * b_exp + rnorm(K, 0, 0.01); se_out <- rep(0.01, K) model <- fusiomr(b_exp, se_exp, b_out, se_out, model = "seso_uhp_only") model$est; model$se; model$ci; ## End(Not run)
Bundles advanced hyper-parameters for the MCMC settings, IV-selection thresholds,
and empirical-Bayes variance priors setting ups. Typically, users never need to
touch this: fusiomr() uses parameter_control() with sensible defaults
tuned for estimation. Pass a customized value of parameters only when needed, e.g.,
to shorten MCMC niter, burnin prop, tighten IV selection, or correct for winner's
curse via z_thresh, account for sample overlap via rho_ov, or
tune prior strength via c_gamma/c_theta.
parameter_control( niter = 20000, burnin_prop = 0.5, c_gamma = 0.5, c_theta = 0.8, kappa_gamma = 1, kappa_theta = 1, Kmin = 5, Kmax = 20, rho_ov = 0, z_thresh = NULL, trim = 0.1, hybrid = FALSE, kappa_hybrid = 5, global_mean_gamma = NULL, global_mean_theta = NULL, global_Sigma_gamma = NULL, global_Sigma_theta = NULL )parameter_control( niter = 20000, burnin_prop = 0.5, c_gamma = 0.5, c_theta = 0.8, kappa_gamma = 1, kappa_theta = 1, Kmin = 5, Kmax = 20, rho_ov = 0, z_thresh = NULL, trim = 0.1, hybrid = FALSE, kappa_hybrid = 5, global_mean_gamma = NULL, global_mean_theta = NULL, global_Sigma_gamma = NULL, global_Sigma_theta = NULL )
niter |
Number of Gibbs iterations. Default 20000 is calibrated for stable posterior estimates; |
burnin_prop |
Burn-in proportion in [0, 1). |
c_gamma |
Prior weight per IV for sigma^2_gamma (a_gamma = 1 + c_gamma*K/2), Larger values make the inverse-gamma prior more concentrated around its mean. Default= 0.5; |
c_theta |
Prior weight per IV for sigma^2_theta (a_theta = 1 + c_theta*K/2), Larger values make the inverse-gamma prior more concentrated around its mean. Default = 0.8; |
kappa_gamma |
Tunning parameter for prior mean of sigma2_gamma; |
kappa_theta |
Tunning parameter for prior mean of sigma2_theta; |
Kmin, Kmax
|
Lower and upper bound on K used when computing prior shape. |
rho_ov |
Sampling correlation between exposure and outcome due to sample overlap, in [-1, 1]. Default = 0; |
z_thresh |
Optional |Z_gamma| selection threshold used to pick QTLs (winner’s-curse fix).
Example: for p=5e-8 two-sided, use |
trim |
Tail probability for winsor. |
hybrid |
Logical; if TRUE, blend local with a global: prior mean = eta*local + (1-eta)*global (eta = K/(K+kappa_hybrid)); |
kappa_hybrid |
Pooling control; larger values shrink more toward the global. |
global_mean_gamma, global_mean_theta
|
Global EB centers for hybrid mode. |
global_Sigma_gamma |
2x2 numeric matrix. Global empirical-Bayes mean
of the SNP-effect covariance Sigma_gamma. Required when
|
global_Sigma_theta |
2x2 numeric matrix. Global empirical-Bayes mean
of the pleiotropy covariance Sigma_theta. Required when
|
A named list of parameters for more advanced setting.
# defaults ctrl <- parameter_control()# defaults ctrl <- parameter_control()