mr_format | R Documentation |
Organises the summary level data for use in the Bayesian MR functions
mr_format(rsid, xbeta, ybeta, xse, yse)
rsid |
A vector of genetic variants used for analysis, if unspecified a vector is automatically generated. |
xbeta |
A numeric vector of the instrument-phenotype associations. |
ybeta |
A numeric vector of the instrument-outcome associations. |
xse |
The standard errors of the instrument-phenotype associations |
yse |
The standard errors of the instrument-outcome associations |
A formatted data frame for analysis of class mr_format
.
data(bmi_insulin)
dat <- mr_format(
rsid = bmi_insulin[,"rsid"],
xbeta = bmi_insulin[,"beta.exposure"],
ybeta = bmi_insulin[,"beta.outcome"],
xse = bmi_insulin[,"se.exposure"],
yse = bmi_insulin[,"se.outcome"]
)
class(dat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.