mr_pivw {MRZero} | R 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 |
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 |
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 |
|
Boot.Fieller |
|
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 |
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 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. |
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))