Description Usage Arguments Details Value References Examples
This function conducts Mendelian randomization analysis using an underlying mixture model incorporating a fraction of the genetic instruments to have direct effect on the outcome (horizontal pleiotropy). MRMix takes GWAS summary statistics as inputs to estimate causal effects of one trait on another. For stability of the method, we recommend using summary statistics in the standardized scale: 1) For both binary and continuous traits, summary-statistics should be standardized by genotypic variance; 2) In addition, for continuous phenotype, summary-statistics should be standardized by phenotypic variance. If the data are not in the standardized scale, users may use the standardize function to standardize their data. See Details and Examples for more information.
1 2 |
betahat_x |
GWAS effect estimates of the exposure, recommended to be in standardized scale. Vector of length |
betahat_y |
GWAS effect estimates of the outcome, recommended to be in standardized scale. Vector of length |
sx |
Standard error of |
sy |
Standard error of |
theta_temp_vec |
A vector of the grid search values for the causal effect |
pi_init |
Initial value of the probability mass at the null component of the mixture model corresponding to underlying valid instruments. Default to be 0.6. See Details. |
sigma_init |
Initial value of the variance of the non-null component of the mixture model which corresponds to underlying invalid instruments with pleiotropic effect. Default to be 1e-5. See Details. |
profile |
Whether to include the profile matrix. Default to be |
The algorithm searches over a grid of possible values of the causal effect theta
. For each fixed theta
, it fits mixture model pi0*N(0,sy^2+theta^2*sx^2)+(1-pi0)*N(0,sigma2)
on the residual betahat_y-theta*betahat_x
. It then chooses the value of theta
that leads to the maximum pi0
as the estimate of causal effect. Summary statistics can be standardized using the standardize()
function if they are estimates from linear or logistic regression. Do not use Standardize()
for other models.
A list that contains
theta |
Estimate of causal effect. Assuming the summary statistics are standardized, |
pi0 |
The probability mass of the null component corresponding to the estimated |
sigma2 |
The variance of the non-null component corresponding to the estimated |
SE_theta |
Standard error of causal effect estimate. |
zstat_theta |
Z-statistic for test of the causal effect estimate. |
pvalue_theta |
P-value from the z test for the causal effect. |
profile_mat |
A matrix of 3 columns containing details of the grid search. The first column is |
1. Qi, Guanghao, and Nilanjan Chatterjee. "Mendelian randomization analysis using mixture models for robust and efficient estimation of causal effects." Nature Communications 10.1 (2019): 1941.
2. Qi, Guanghao, and Nilanjan Chatterjee. "A Comprehensive Evaluation of Methods for Mendelian Randomization Using Realistic Simulations of Genome-wide Association Studies." bioRxiv (2019): 702787.
1 2 3 4 5 6 7 8 9 | data("sumstats", package = "MRMix")
# Convert summary statistics to standardized scale
data_std = standardize(sumstats$betahat_x, sumstats$betahat_y, sumstats$sx, sumstats$sy, xtype = "continuous", ytype = "continuous", sumstats$nx, sumstats$ny, MAF = NULL)
# MRMix analysis
est = MRMix(data_std$betahat_x_std, data_std$betahat_y_std, data_std$sx_std, data_std$sy_std)
str(est) # True causal effect is 0.2.
# Include profile matrix
est = MRMix(data_std$betahat_x_std, data_std$betahat_y_std, data_std$sx_std, data_std$sy_std, profile = TRUE)
str(est)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.