qhet_mvmr: qhet_mvmr

View source: R/qhet_mvmr.R

qhet_mvmrR Documentation

qhet_mvmr

Description

Fits a multivariable Mendelian randomization model adjusting for weak instruments. The functions requires a formatted dataframe using the format_mvmr function, as well a phenotypic correlation matrix pcor. This should be obtained from individual level phenotypic data, or constructed as a correlation matrix where correlations have previously been reported. Confidence intervals are calculated using a non-parametric bootstrap. By default, standard errors are not produced but can be calculated by setting se = TRUE. The number of bootstrap iterations is specified using the iterations argument. Note that calculating confidence intervals at present can take a substantial amount of time.

Usage

qhet_mvmr(r_input, pcor, CI, iterations)

Arguments

r_input

A formatted data frame using the format_mvmr function or an object of class MRMVInput from MendelianRandomization::mr_mvinput

pcor

A phenotypic correlation matrix including the correlation between each exposure included in the MVMR analysis.

CI

Indicates whether 95 percent confidence intervals should be calculated using a non-parametric bootstrap.

iterations

Specifies number of bootstrap iterations for calculating 95 percent confidence intervals.

Value

An dataframe containing effect estimates with respect to each exposure.

Author(s)

Wes Spiller; Eleanor Sanderson; Jack Bowden.

References

Sanderson, E., et al., An examination of multivariable Mendelian randomization in the single-sample and two-sample summary data settings. International Journal of Epidemiology, 2019, 48, 3, 713-727. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1093/ije/dyy262")}

Examples

## Not run: 
qhet_mvmr(r_input, pcor, CI = TRUE, iterations = 1000)

## End(Not run)

WSpiller/MVMR documentation built on May 17, 2023, 5:48 p.m.