mr_mbe | R Documentation |
The mr_mbe
function implements the mode-based method introduced by Hartwig, Bowden and Davey Smith (2017).
mr_mbe(
object,
weighting = "weighted",
stderror = "simple",
phi = 1,
seed = 314159265,
iterations = 10000,
distribution = "normal",
alpha = 0.05
)
## S4 method for signature 'MRInput'
mr_mbe(
object,
weighting = "weighted",
stderror = "delta",
phi = 1,
seed = 314159265,
iterations = 10000,
distribution = "normal",
alpha = 0.05
)
object |
An |
weighting |
Whether the analysis should be |
stderror |
Whether standard error estimates should be i) |
phi |
The choice of bandwidth in the kernel-smoothly density method. A value of 1 (the default value) represents the bandwidth value selected by the modified Silverman's bandwidth rule, as recommended by Hartwig et al. A value of 0.5 represents half that value, and so on. |
seed |
The random seed to use when generating the bootstrap samples used to calculate the confidence intervals (for reproducibility). The default value is 314159265. If set to |
iterations |
Number of iterations to use in the bootstrap procedure. |
distribution |
The type of distribution used to calculate the confidence intervals, can be |
alpha |
The significance level used to calculate the confidence interval. The default value is 0.05. |
The mode-based estimation (MBE) method takes the variant-specific ratio estimates from each genetic variant in turn, and calculates the modal estimate. This is implemented by constructing a kernel-smoothed density out of the ratio estimates, and taking the maximum value as the modal estimate. The standard error is calculated by a bootstrap procedure, and confidence intervals based on the estimate having a normal distribution.
The method should give consistent estimates as the sample size increases if a plurality (or weighted plurality) of the genetic variants are valid instruments. This means that the largest group of variants with the same causal estimate in the asymptotic limit are the valid instruments.
The output from the function is an MRMBE
object containing:
Exposure |
A character string giving the name given to the exposure. |
Outcome |
A character string giving the name given to the outcome. |
Weighting |
A character string |
StdErr |
A character string |
Phi |
The value of the bandwidth factor. |
Estimate |
The value of the causal estimate. |
StdError |
Standard error of the causal estimate. |
CILower |
The lower bound of the causal estimate based on the estimated standard error and the significance level provided. |
CIUpper |
The upper bound of the causal estimate based on the estimated standard error and the significance level provided. |
Alpha |
The significance level used when calculating the confidence intervals. |
Pvalue |
The p-value associated with the estimate (calculated as Estimate/StdError as per Wald test) using a normal or t-distribution (as specified in |
SNPs |
The number of genetic variants (SNPs) included in the analysis. |
Fernando Pires Hartwig, George Davey Smith, Jack Bowden. Robust inference in summary data Mendelian randomization via the zero modal pleiotropy assumption. International Journal of Epidemiology 2017; 46(6): 1985-1998. doi: 10.1093/ije/dyx102.
mr_mbe(mr_input(bx = ldlc, bxse = ldlcse, by = chdlodds, byse = chdloddsse), iterations=100)
mr_mbe(mr_input(bx = ldlc, bxse = ldlcse, by = chdlodds, byse = chdloddsse),
phi=0.5, iterations=100)
mr_mbe(mr_input(bx = ldlc, bxse = ldlcse, by = chdlodds, byse = chdloddsse),
weighting="weighted", stderror="delta", iterations=100)
# iterations set to 100 to reduce computational time,
# more iterations are recommended in practice
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.