The mr_pivw
function implements the penalized inverse-variance weighted (pIVW) method.
mr_pivw(
object,
lambda = 1,
over.dispersion = TRUE,
delta = 0,
sel.pval = NULL,
Boot.Fieller = TRUE,
alpha = 0.05
)# S4 method for MRInput
mr_pivw(
object,
lambda = 1,
over.dispersion = TRUE,
delta = 0,
sel.pval = NULL,
Boot.Fieller = TRUE,
alpha = 0.05
)
The output from the function is a PIVW
object containing:
TRUE
if the method has considered balanced horizontal pleiotropy, FALSE
otherwise.
TRUE
if the bootstrapping Fieller method is used to calculate the P-value and the confidence interval of the causal effect, FALSE
otherwise.
The penalty parameter in the pIVW estimator.
The z-score threshold for IV selection.
A character string giving the name given to the exposure.
A character string giving the name given to the outcome.
The causal point estimate from the pIVW estimator.
The standard error associated with Estimate
.
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.
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.
The significance level used in constructing the confidence interval.
P-value associated with the causal estimate from the pIVW estimator, which is derived from the bootstrapping Fieller method or normal distribution.
The variance of the balanced horizontal pleiotropy. Tau2
is calculated by using all IVs in the data before conducting the IV selection.
The number of SNPs after IV selection.
The estimated effective sample size. It is recommended to be greater than 5 for the pIVW estimator to achieve reliable asymptotic properties. See 'Details'.
An MRInput
object.
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
.
Should the method consider overdispersion (balanced horizontal pleiotropy)? Default is TRUE.
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'.
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'.
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
.
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). We suggest that Condition
should be greater than 5 for the pIVW estimator to achieve reliable asymptotic properties.
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.
mr_pivw(mr_input(bx = ldlc, bxse = ldlcse, by = chdlodds, byse = chdloddsse))
Run the code above in your browser using DataLab