mr_mvmedian | R Documentation |
The mr_mvmedian
function performs multivariable Mendelian randomization via the median method. This is implemented by multivariable weighted quantile regression, with the quantile set to 0.5 (the median).
mr_mvmedian(
object,
distribution = "normal",
alpha = 0.05,
iterations = 10000,
seed = 314159265
)
## S4 method for signature 'MRMVInput'
mr_mvmedian(
object,
distribution = "normal",
alpha = 0.05,
iterations = 10000,
seed = 314159265
)
object |
An |
distribution |
The type of distribution used to calculate the confidence intervals. Options are |
alpha |
The significance level used to calculate the confidence intervals. The default value is 0.05. |
iterations |
The number of bootstrap samples to generate when calculating the estimated standard error. The default value is 10000. |
seed |
The random seed to use when generating the bootstrap samples (for reproducibility). The default value is 314159265. If set to |
The multivariable median method is similar to the univariable weighted median method, except that it is implemented using quantile regression. The regression model is multivariable and weighted by the inverse of the variances of the variant-specific estimates. Confidence intervals are calculated by parametric bootstrap to estimate the standard error of the estimates, and then using quantiles of a normal or t-distribution (depending on the value of distribution
).
The output from the function is an MVMedian
object containing:
Exposure |
A character vector with the names given to the exposure. |
Outcome |
A character string with the names given to the outcome. |
Estimate |
A vector of causal estimates. |
StdError |
A vector of standard errors of the causal estimates. |
CILower |
The lower bounds of the causal estimates based on the estimated standard errors and the significance level provided. |
CIUpper |
The upper bounds of the causal estimates based on the estimated standard errors and the significance level provided. |
Alpha |
The significance level used when calculating the confidence intervals. |
Pvalue |
The p-values associated with the estimates (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. |
mr_mvmedian(mr_mvinput(bx = cbind(ldlc, hdlc, trig), bxse = cbind(ldlcse, hdlcse, trigse),
by = chdlodds, byse = chdloddsse), iterations = 100)
# iterations is set to 100 to reduce runtime for the mr_mvmedian method,
# 10000 iterations are recommended in practice
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.