Fits an IVW multivariable Mendelian randomization model using first order weights.
Arguments
- r_input
A formatted data frame using the
format_mvmr()function or an object of classMRMVInputfromMendelianRandomization::mr_mvinput()- gencov
Retained for interface consistency with the other MVMR functions. The IVW point estimates do not depend on the covariance between the effect of the genetic variants on each exposure, so this argument is not used by
ivw_mvmr(). A value of0is used by default.
Value
A dataframe containing MVMR results, including estimated coefficients, their standard errors, t-statistics, and corresponding (two-sided) p-values.
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. doi:10.1093/ije/dyy262
Examples
r_input <- format_mvmr(
BXGs = rawdat_mvmr[, c("LDL_beta", "HDL_beta")],
BYG = rawdat_mvmr$SBP_beta,
seBXGs = rawdat_mvmr[, c("LDL_se", "HDL_se")],
seBYG = rawdat_mvmr$SBP_se,
RSID = rawdat_mvmr$SNP
)
ivw_mvmr(r_input)
#>
#> Multivariable MR
#>
#> Estimate Std. Error t value Pr(>|t|)
#> exposure1 -0.031003996 0.01302925 -2.3795686 0.0186526
#> exposure2 0.006039167 0.01029181 0.5867933 0.5582678
#>
#> Residual standard error: 2.209 on 143 degrees of freedom
#>
#>
#> Estimate Std. Error t value Pr(>|t|)
#> exposure1 -0.031003996 0.01302925 -2.3795686 0.0186526
#> exposure2 0.006039167 0.01029181 0.5867933 0.5582678