Title: | Bayesian Weighted Mendelian Randomization (BWMR) |
---|---|
Description: | Inference the causality based on BWMR method. |
Authors: | Jia Zhao |
Maintainer: | The package maintainer <[email protected]> |
License: | GPL (>= 3) |
Version: | 0.1.1 |
Built: | 2024-11-09 04:22:38 UTC |
Source: | https://github.com/remlapmot/BWMR |
Estimate the causal effect between the exposure and the outcome.
BWMR(gammahat, Gammahat, sigmaX, sigmaY, alpha = 100, sqsigma0 = (1e6)^2)
BWMR(gammahat, Gammahat, sigmaX, sigmaY, alpha = 100, sqsigma0 = (1e6)^2)
gammahat |
SNP-exposure effects. |
Gammahat |
SNP-outcome effects. |
sigmaX |
Standard errors of SNP-exposure effects. |
sigmaY |
Standard errors of SNP-outcome effects. |
alpha |
Value of alpha. |
sqsigma0 |
Value of sqsigma0. |
BWMR
obtain the causal effect based on summary statistics.
mu_beta |
Estimate of parameter |
se_beta |
Estimate of the standard error of parameter |
P_value |
P_value. |
plot1 |
Plot of Data with Standard Error Bar. |
plot2 |
Trace Plot of Logarithm of Approximate Data Likelihood. |
plot3 |
Estimate of Weight of Each Data Point. |
plot4 |
Plot of Weighted Data and Its Regression Result. |
Jia Zhao
library(BWMR) data(ExampleData) MRres <- BWMR(ExampleData$beta.exposure, ExampleData$beta.outcome, ExampleData$se.exposure, ExampleData$se.outcome) beta.hat <- MRres$beta beta.se <- MRres$se_beta P_value <- MRres$P_value # Plot1: Plot of Data with Standard Error Bar plot1 <- MRres$plot1 plot1 # Plot2: Trace Plot of Logarithm of Approximate Data Likelihood plot2 <- MRres$plot2 plot2 # Plot3: Estimate of Weight of Each Data Point plot3 <- MRres$plot3 plot3 # Plot4: Plot of Weighted Data and Its Regression Result plot4 <- MRres$plot4 plot4
library(BWMR) data(ExampleData) MRres <- BWMR(ExampleData$beta.exposure, ExampleData$beta.outcome, ExampleData$se.exposure, ExampleData$se.outcome) beta.hat <- MRres$beta beta.se <- MRres$se_beta P_value <- MRres$P_value # Plot1: Plot of Data with Standard Error Bar plot1 <- MRres$plot1 plot1 # Plot2: Trace Plot of Logarithm of Approximate Data Likelihood plot2 <- MRres$plot2 plot2 # Plot3: Estimate of Weight of Each Data Point plot3 <- MRres$plot3 plot3 # Plot4: Plot of Weighted Data and Its Regression Result plot4 <- MRres$plot4 plot4
An example Mendelian randomization dataset.
ExampleData
ExampleData
who
A data frame with 76 rows and 5 columns:
SNP genotype
SNP-exposure estimates
SNP-outcome estimates
Standard errors of the SNP-exposure estimates
Standard errors of the SNP-outcome estimates