mr_ivw | R Documentation |
The mr_ivw
function implements the inverse-variance method, informally known as the "Toby Johnson" method. With a single
genetic variant, this is simply the ratio method.
mr_ivw(
object,
model = "default",
robust = FALSE,
penalized = FALSE,
weights = "simple",
psi = 0,
correl = FALSE,
distribution = "normal",
alpha = 0.05,
...
)
## S4 method for signature 'MRInput'
mr_ivw(
object,
model = "default",
robust = FALSE,
penalized = FALSE,
weights = "simple",
psi = 0,
correl = FALSE,
distribution = "normal",
alpha = 0.05,
...
)
object |
An |
model |
What type of model should be used: |
robust |
Indicates whether robust regression using the |
penalized |
Indicates whether a penalty should be applied to the weights to downweight the contribution of genetic variants with outlying ratio estimates to the analysis. |
weights |
Which weights to use in the weighted regression. If |
psi |
The correlation between the genetic associations with the exposure and the association with the outcome for each variant resulting from sample overlap. The default value is |
correl |
If the genetic variants are correlated, then this correlation can be accounted for. The matrix of correlations between must be provided in the |
distribution |
The type of distribution used to calculate the confidence intervals. Options are |
alpha |
The significance level used to calculate the confidence interval. The default value is 0.05. |
... |
Additional arguments to be passed to the regression method. |
With multiple uncorrelated genetic variants, this estimate can be thought of as: 1) the inverse-variance weighted combination of the ratio estimates from a meta-analysis; 2) the ratio estimate from combining the genetic variants into a weighted score and then using this score as an instrumental variable (the same estimate is obtained from the two-stage least squares method using individual-level data); 3) the coefficient from weighted linear regression of the associations with the outcome on the associations with the risk factor fixing the intercept to zero and using the inverse-variance weights.
Here, we implement the method using weighted linear regression. If the variants are correlated, the method is implemented using generalized weighted linear regression; this is hard coded using matrix algebra.
The causal estimate is obtained by regression of the associations with the outcome on the associations with the risk factor, with the intercept set to zero and weights being the inverse-variances of the associations with the outcome.
With a single genetic variant, the estimate is the ratio of coefficients betaY/betaX and the standard error is the first term of the delta method approximation betaYse/betaX.
The output from the function is an IVW
object containing:
Model |
A character string giving the type of model used ( |
Exposure |
A character string giving the name given to the exposure. |
Outcome |
A character string giving the name given to the outcome. |
Correlation |
The matrix of genetic correlations. |
Robust |
|
Penalized |
|
Estimate |
The value of the causal estimate. |
StdError |
Standard error of the causal estimate. |
CILower |
The lower bound of the causal estimate based on the estimated standard error and the significance level provided. |
CIUpper |
The upper bound of the causal estimate based on the estimated standard error and the significance level provided. |
Alpha |
The significance level used when calculating the confidence intervals. |
Pvalue |
The p-value associated with the estimate (calculated as Estimate/StdError as per Wald test) using a normal or t-distribution (as specified in |
SNPs |
The number of genetic variants (SNPs) included in the analysis. |
RSE |
The estimated residual standard error from the regression model. |
Heter.Stat |
Heterogeneity statistic (Cochran's Q statistic) and associated p-value: the null hypothesis is that all genetic variants estimate the same causal parameter; rejection of the null is an indication that one or more variants may be pleiotropic. |
Fstat |
An approximation of the first-stage F statistic for all variants based on the summarized data. |
Original implementation: The International Consortium for Blood Pressure Genome-Wide Association Studies. Genetic variants in novel pathways influence blood pressure and cardiovascular disease risk. Nature 2011; 478:103-109. doi: 10.1038/nature10405.
Detailed description of method: Stephen Burgess, Adam S Butterworth, Simon G Thompson. Mendelian randomization analysis with multiple genetic variants using summarized data. Genetic Epidemiology 2013; 37:658-665. doi: 10.1002/gepi.21758.
Robust and penalized weights: Stephen Burgess, Jack Bowden, Frank Dudbridge, Simon G Thompson. Robust instrumental variable methods using multiple candidate instruments with application to Mendelian randomization. arXiv 2016; 1606.03729.
Heterogeneity test: Fabiola del Greco, Cosetta Minelli, Nuala A Sheehan, John R Thompson. Detecting pleiotropy in Mendelian randomisation studies with summary data and a continuous outcome. Stat Med 2015; 34(21):2926-2940. doi: 10.1002/sim.6522.
Simple versus delta weights (first-order versus second-order): Stephen Burgess, Jack Bowden. Integrating summarized data from multiple genetic variants in Mendelian randomization: bias and coverage properties of inverse-variance weighted methods. arXiv:1512.04486.
mr_ivw(mr_input(bx = ldlc, bxse = ldlcse, by = chdlodds, byse = chdloddsse))
mr_ivw(mr_input(bx = ldlc, bxse = ldlcse, by = chdlodds, byse = chdloddsse),
robust = TRUE)
mr_ivw(mr_input(bx = ldlc, bxse = ldlcse, by = chdlodds, byse = chdloddsse),
penalized = TRUE)
mr_ivw(mr_input(calcium, calciumse, fastgluc, fastglucse, corr=calc.rho))
## correlated variants
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.