format_radial: format_radial

Description Usage Arguments Value Author(s) References Examples

View source: R/format_radial.R

Description

Reads in summary data. Checks and organises columns for use in calculating radial IVW and radial MR-Egger estimates. Where variant IDs are not provided, a vector is generated for variant identification.

Usage

1
format_radial(BXG, BYG, seBXG, seBYG, RSID)

Arguments

BXG

A numeric vector of beta-coefficient values for genetic associations with the first variable (exposure).

BYG

A numeric vector of beta-coefficient values for genetic associations with the second variable (outcome).

seBXG

The standard errors corresponding to the beta-coefficients BXG.

seBYG

The standard errors corresponding to the beta-coefficients BYG.

RSID

A vector of names for genetic variants included in the analysis. If variant IDs are not provided (RSID="NULL"), a vector of ID numbers will be generated.

Value

A formatted data frame.

Author(s)

Wes Spiller; Jack Bowden.

References

Bowden, J., et al., Improving the visualization, interpretation and analysis of two-sample summary data Mendelian randomization via the Radial plot and Radial regression. International Journal of Epidemiology, 2018. 47(4): p. 1264-1278.

Examples

1
format_radial(summarydata[,1],summarydata[,3],summarydata[,2],summarydata[,4])

WSpiller/MRPracticals documentation built on April 25, 2020, 10:52 a.m.