BWMR | R Documentation |
Estimate the causal effect between the exposure and the outcome.
BWMR(gammahat, Gammahat, sigmaX, sigmaY)
gammahat |
SNP-exposure effects. |
Gammahat |
SNP-outcome effects. |
sigmaX |
Standard errors of SNP-exposure effects. |
sigmaY |
Standard errors of SNP-outcome effects. |
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)
library(ggplot2)
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.