The mr_divw function implements the debiased inverse-variance weighted method.
Usage
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)Arguments
- object
 An
MRInputobject.- over.dispersion
 Should the method consider overdispersion (balanced horizontal pleiotropy)? Default is TRUE.
- alpha
 The significance level used to calculate the confidence intervals. The default value is 0.05.
- diagnostics
 Should the function returns the q-q plot for assumption diagnosis. Default is FALSE.
Value
The output from the function is a DIVW object containing:
- Over.dispersion
 TRUEif the method has considered balanced horizontal pleiotropy,FALSEotherwise.- Exposure
 A character string giving the name given to the exposure.
- Outcome
 A character string giving the name given to the outcome.
- Estimate
 The value of the causal estimate.
- StdError
 Standard error of the causal estimate calculated using bootstrapping.
- CILower
 The lower bound for the causal estimate based on the estimated standard error and the significance level provided.
- CIUpper
 The upper bound for 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 using
Estimate/StdErroras per a Wald test) using a normal distribution.- SNPs
 The number of genetic variants (SNPs) included in the analysis.
- Condition
 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.
Details
The debiased inverse-variance weighted method (dIVW) removes the weak instrument bias of the IVW method and is more robust under many weak instruments.
References
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.
Examples
mr_divw(mr_input(bx = ldlc, bxse = ldlcse, by = chdlodds, byse = chdloddsse))
#> 
#> Debiased inverse-variance weighted method
#> (Over.dispersion:TRUE)
#> 
#> Number of Variants : 28 
#> ------------------------------------------------------------------
#>  Method Estimate Std Error 95% CI       p-value Condition
#>    dIVW    2.940     0.531 1.900, 3.980   0.000   142.920
#> ------------------------------------------------------------------