The mr_mvgmm
function performs multivariable Mendelian randomization via the generalized method of moments method.
mr_mvgmm(object, nx, ny, cor.x = NULL, robust = TRUE, alpha = 0.05, ...)# S4 method for MRMVInput
mr_mvgmm(object, nx, ny, cor.x = NULL, robust = TRUE, alpha = 0.05, ...)
The output from the function is an MVGMM
object containing:
TRUE
if overdispersion heterogeneity was included in the model, FALSE
otherwise.
A character vector with the names given to the exposure.
A character string with the names given to the outcome.
The matrix of genetic correlations if supplied. If not supplied, then an identity matrix will be returned.
TRUE
if an exposure correlation matrix was specified, FALSE
otherwise.
A vector of conditional F-statistics (one for each exposure).
A vector of causal estimates.
A vector of standard errors of the causal estimates.
The lower bounds of the causal estimates based on the estimated standard errors and the significance level provided.
The upper bounds of the causal estimates based on the estimated standard errors and the significance level provided.
The estimate of the overdispersion parameter. If this is negative, then a value of zero is used in the method.
The p-values associated with the estimates (calculated as Estimate/StdError as per Wald test) using a normal distribution.
The significance level used when calculating the confidence intervals.
Heterogeneity statistic (Cochran's Q statistic) and associated p-value (for non-robust model only): the null hypothesis is that all genetic variants estimate the same causal parameter; rejection of the null is an indication that one or more genetic variants may be pleiotropic. If the robust option is set to TRUE
, then this represents excess heterogeneity beyond the overdispersion model.
An MRMVInput
object.
Vector of sample sizes used to compute genetic associations with the exposure (one for each exposure).
The sample size used to compute genetic associations with the outcome.
Correlation matrix for exposures. Default is to assume the exposures are uncorrelated.
Indicates whether overdispersion heterogeneity is accounted for in the model. Default is TRUE.
The significance level used to calculate the confidence interval. The default value is 0.05.
Additional arguments to be passed to the optimization routines to calculate GMM estimates and overdispersion parameter.
Robust inference in two-sample multivariable Mendelian randomization using the generalized method of moments. The method accounts for overdispersion heterogeneity in genetic variant-outcome associations.
Description of the generalized method of moments: Hansen, L. P. (1982). Large sample properties of generalized method of moments estimators. Econometrica, pp.1029-1054.
mr_mvgmm(mr_mvinput(bx = cbind(ldlc, hdlc, trig), bxse = cbind(ldlcse, hdlcse, trigse),
by = chdlodds, byse = chdloddsse), nx=rep(17723,3), ny=17723)
Run the code above in your browser using DataLab