The mr_divw
function implements the debiased inverse-variance weighted method.
mr_divw(object, over.dispersion = TRUE, alpha = 0.05, diagnostics = FALSE)# S4 method for MRInput
mr_divw(object, over.dispersion = TRUE, alpha = 0.05, diagnostics = FALSE)
The output from the function is a DIVW
object containing:
TRUE
if the method has considered balanced horizontal pleiotropy, FALSE
otherwise.
A character string giving the name given to the exposure.
A character string giving the name given to the outcome.
The value of the causal estimate.
Standard error of the causal estimate calculated using bootstrapping.
The lower bound for the causal estimate based on the estimated standard error and the significance level provided.
The upper bound for the causal estimate based on the estimated standard error and the significance level provided.
The significance level used when calculating the confidence intervals.
The p-value associated with the estimate (calculated using Estimate/StdError
as per a Wald test) using a normal distribution.
The number of genetic variants (SNPs) included in the analysis.
A measure (average F-statistic -1)*sqrt(# snps) that needs to be large for reliable asymptotic approximation based on the dIVW estimator. It is recommended to be greater than 20.
An MRInput
object.
Should the method consider overdispersion (balanced horizontal pleiotropy)? Default is TRUE.
The significance level used to calculate the confidence intervals. The default value is 0.05.
Should the function returns the q-q plot for assumption diagnosis. Default is FALSE.
The debiased inverse-variance weighted method (dIVW) removes the weak instrument bias of the IVW method and is more robust under many weak instruments.
Ting Ye, Jun Shao, Hyunseung Kang (2021). Debiased Inverse-Variance Weighted Estimator in Two-Sample Summary-Data Mendelian Randomization. The Annals of Statistics, 49(4), 2079-2100. Also available at https://arxiv.org/abs/1911.09802.
mr_divw(mr_input(bx = ldlc, bxse = ldlcse, by = chdlodds, byse = chdloddsse))
Run the code above in your browser using DataLab