snpcov_mvmr: snpcov_mvmr

View source: R/snpcov_mvmr.R

snpcov_mvmrR Documentation

snpcov_mvmr

Description

Uses individual level genetic and exposure data to generate covariance matrices for estimated effects of individual genetic variants on each exposure. The function returns a number of covariance matrices equal to the number of SNPs, where SNP and row numbers reference ordered exposures.

Usage

snpcov_mvmr(Gs, Xs)

Arguments

Gs

A matrix or dataframe containing genetic instrument measures. Columns should indicate genetic variant number, with rows representing an observed measure of the genetic variant.

Xs

A matrix or dataframe containing exposure measures. Columns should indicate exposure number, with rows representing an observed measure for the given exposure.

Value

A list of covariance matrices with respect to each genetic variant, retaining the ordering in Gs

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: 
snpcov_mvmr(data[,1:10], data[,11:13])

## End(Not run)

WSpiller/MVMR documentation built on Aug. 30, 2024, 10:15 a.m.