Title: | Penalized Inverse-Variance Weighted Estimator for Mendelian Randomization |
---|---|
Description: | The penalized inverse-variance weighted (pIVW) estimator is a Mendelian randomization method for estimating the causal effect of an exposure variable on an outcome of interest based on summary-level GWAS data. The pIVW estimator accounts for weak instruments and balanced horizontal pleiotropy simultaneously. See Xu S., Wang P., Fung W.K. and Liu Z. (2022) <doi:10.1111/biom.13732>. |
Authors: | Siqi Xu |
Maintainer: | Siqi Xu <[email protected]> |
License: | GPL-2 |
Version: | 0.1.3 |
Built: | 2024-11-01 11:20:53 UTC |
Source: | https://github.com/siqixu/mr.pivw |
The penalized inverse-variance weighted (pIVW) estimator is a Mendelian randomization method for estimating the causal effect of an exposure variable on an outcome of interest based on summary-level GWAS data. The pIVW estimator accounts for weak instruments and balanced horizontal pleiotropy simultaneously.
mr_pivw( Bx, Bxse, By, Byse, lambda = 1, over.dispersion = TRUE, delta = 0, sel.pval = NULL, Boot.Fieller = NULL, n.boot = 1000, alpha = 0.05 )
mr_pivw( Bx, Bxse, By, Byse, lambda = 1, over.dispersion = TRUE, delta = 0, sel.pval = NULL, Boot.Fieller = NULL, n.boot = 1000, alpha = 0.05 )
Bx |
A numeric vector of beta-coefficient values for genetic associations with the exposure variable. |
Bxse |
The standard errors associated with the beta-coefficients |
By |
A numeric vector of beta-coefficient values for genetic associations with the outcome variable. |
Byse |
The standard errors associated with the beta-coefficients |
lambda |
The penalty parameter in the pIVW estimator. It plays a role in the bias-variance trade-off of the estimator. It is recommended to choose |
over.dispersion |
Should the method consider overdispersion (balanced horizontal pleiotropy)? Default is TRUE. |
delta |
The z-score threshold for IV selection. |
sel.pval |
A numeric vector containing the P-values of the SNP effects on the exposure, which will be used for the IV selection. |
Boot.Fieller |
If |
n.boot |
The number of bootstrap samples used in the bootstrapping Fieller method. It will be used only when |
alpha |
The significance level used to calculate the confidence intervals. The default value is 0.05. |
The penalized inverse-variance weighted (pIVW) estimator accounts for weak instruments and balanced horizontal pleiotropy simultaneously
in two-sample MR with summary statistics, i.e., an exposure sample (with IV-exposure effect Bx
and standard error Bxse
) and
an outcome sample (with IV-outcome effect By
and standard error Byse
).
The pIVW estimator also allows for IV selection in three-sample MR, where weak IVs are screened out using
an extra sample (with IV-exposure effect Bx*
and standard error Bxse*
) independent of the exposure sample and outcome sample.
Generally, the P-value for Bx*
can be computed By sel.pval=2*pnorm(abs(Bx*/Bxse*), lower.tail = FALSE)
,
Given sel.pval
and a z-score threshold delta
, the variants kept in the analysis will be those
with sel.pval<2*pnorm(delta,lower.tail = FALSE)
.
The mr_pivw
function outputs a measure Condition
that needs to be large for reliable asymptotic properties of the pIVW estimator.
We also refer to Condition
as effective sample size, which is a function of a measure of IV strength and the number of IVs.
When delta
is zero (i.e., no IV selection), Condition = (average F-statistic -1)*sqrt(# snps)
. When delta
is not zero
(i.e., IV selection is conducted), Condition = [(average F-statistic -1)*sqrt(# snps)]/c
,
where the numerator is computed using the selected variants, and the denominator c
involves the selection probabilities
of all variants (see more details in the paper https://doi.org/10.1111/biom.13732). We suggest that Condition
should be greater than 5 for the pIVW estimator to achieve reliable asymptotic properties.
The output from the function is a PIVW
object containing:
Over.dispersion |
|
Boot.Fieller |
|
N.boot |
The number of bootstrap samples used in the bootstrapping Fieller method. |
Lambda |
The penalty parameter in the pIVW estimator. |
Delta |
The z-score threshold for IV selection. |
Estimate |
The causal point estimate from the pIVW estimator. |
StdError |
The standard error associated with |
CILower |
The lower bound of the confidence interval for |
CIUpper |
The upper bound of the confidence interval for |
Alpha |
The significance level used in constructing the confidence interval. |
Pvalue |
P-value associated with |
Tau2 |
The variance of the balanced horizontal pleiotropy. |
SNPs |
The number of SNPs after IV selection. |
Condition |
The estimated effective sample size. It is recommended to be greater than 5 for the pIVW estimator to achieve reliable asymptotic properties. See 'Details'. |
Xu S., Wang P., Fung W.K. and Liu Z. (2022). A Novel Penalized Inverse-Variance Weighted Estimator for Mendelian Randomization with Applications to COVID-19 Outcomes. Biometrics. Available at https://doi.org/10.1111/biom.13732.
mr_pivw(Bx = Bx_exp, Bxse = Bxse_exp, By = By_exp, Byse = Byse_exp)
mr_pivw(Bx = Bx_exp, Bxse = Bxse_exp, By = By_exp, Byse = Byse_exp)