mr_pivw: Penalized inverse-variance weighted method

mr_pivwR Documentation

Penalized inverse-variance weighted method

Description

The mr_pivw function implements the penalized inverse-variance weighted (pIVW) method.

Usage

mr_pivw(
  object,
  lambda = 1,
  over.dispersion = TRUE,
  delta = 0,
  sel.pval = NULL,
  Boot.Fieller = TRUE,
  alpha = 0.05
)

## S4 method for signature 'MRInput'
mr_pivw(
  object,
  lambda = 1,
  over.dispersion = TRUE,
  delta = 0,
  sel.pval = NULL,
  Boot.Fieller = TRUE,
  alpha = 0.05
)

Arguments

object

An MRInput object.

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. It is recommended to use the bootstrapping Fieller method when Condition is smaller than 10 (see 'Details'). By default, Boot.Fieller=TRUE.

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

Lambda

The penalty parameter in the pIVW estimator.

Delta

The z-score threshold for IV selection.

Exposure

A character string giving the name given to the exposure.

Outcome

A character string giving the name given to the outcome.

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 the causal estimate from the pIVW estimator, 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. doi: 10.1111/biom.13732.

Examples

mr_pivw(mr_input(bx = ldlc, bxse = ldlcse, by = chdlodds, byse = chdloddsse))


MendelianRandomization documentation built on May 29, 2024, 11:36 a.m.