Package 'mr.pivw'

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

Help Index


Penalized Inverse-Variance Weighted (pIVW) Method 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.

Usage

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
)

Arguments

Bx

A numeric vector of beta-coefficient values for genetic associations with the exposure variable.

Bxse

The standard errors associated with the beta-coefficients Bx.

By

A numeric vector of beta-coefficient values for genetic associations with the outcome variable.

Byse

The standard errors associated with the beta-coefficients By.

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 lambda=1 to achieve the smallest bias and valid inference. By default, lambda=1.

over.dispersion

Should the method consider overdispersion (balanced horizontal pleiotropy)? Default is TRUE.

delta

The z-score threshold for IV selection. delta should be greater than or equal to zero. By default, delta=0 (i.e., no IV selection will be conducted). See 'Details'.

sel.pval

A numeric vector containing the P-values of the SNP effects on the exposure, which will be used for the IV selection. sel.pval should be provided when delta is not zero. See 'Details'.

Boot.Fieller

If Boot.Fieller=TRUE, then the P-value and the confidence interval of the causal effect will be calculated based on the bootstrapping Fieller method. Otherwise, the P-value and the confidence interval of the causal effect will be calculated from the normal distribution. By default, Boot.Fieller=TRUE when Condition is smaller than 10 (see 'Details'), and Boot.Fieller=FALSE otherwise .

n.boot

The number of bootstrap samples used in the bootstrapping Fieller method. It will be used only when Boot.Fieller=TRUE. By default, n.boot=1000. A larger value of n.boot should be provided when a more precise P-value is needed.

alpha

The significance level used to calculate the confidence intervals. The default value is 0.05.

Details

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.

Value

The output from the function is a PIVW object containing:

Over.dispersion

TRUE if the method has considered balanced horizontal pleiotropy, FALSE otherwise.

Boot.Fieller

TRUE if the bootstrapping Fieller method is used to calculate the P-value and the confidence interval of the causal effect, FALSE otherwise.

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 Estimate.

CILower

The lower bound of the confidence interval for Estimate, which is derived from the bootstrapping Fieller method or normal distribution. For the bootstrapping Fieller's interval, if it contains multiple ranges, then lower limits of all ranges will be reported.

CIUpper

The upper bound of the confidence interval for Estimate, which is derived from the bootstrapping Fieller method or normal distribution. For the bootstrapping Fieller's interval, if it contains multiple ranges, then upper limits of all ranges will be reported.

Alpha

The significance level used in constructing the confidence interval.

Pvalue

P-value associated with Estimate, which is derived from the bootstrapping Fieller method or normal distribution.

Tau2

The variance of the balanced horizontal pleiotropy. Tau2 is calculated by using all IVs in the data before conducting the IV selection.

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'.

References

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.

Examples

mr_pivw(Bx = Bx_exp, Bxse = Bxse_exp, By = By_exp, Byse = Byse_exp)