Skip to contents

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.


qhet_mvmr(r_input, pcor, CI, iterations)



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


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


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


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


An dataframe containing effect estimates with respect to each exposure.


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. doi:10.1093/ije/dyy262


Wes Spiller; Eleanor Sanderson; Jack Bowden.


if (FALSE) {
qhet_mvmr(r_input, pcor, CI = TRUE, iterations = 1000)