Description Usage Arguments Value
View source: R/two_stage_plot.R
Plot of the two-stage regression estimates, i.e. G-X and G-Y associations, annotated with cluster allocation labels and cluster mean estimates.
1 | two_stage_plot(res, bx, by, bxse, byse, obs_names)
|
res |
table of results from mr_clust_em$results$best. |
bx |
numeric vector of length the number of variants, the i-th element is the estimated regression coefficient - i.e. beta-x value - relating the i-th genetic variant to the risk-factor. |
by |
numeric vector of length the number of variants, the i-th element is the estimated regression coefficient - i.e. beta-y value - relating the -th genetic variant to the outcome. |
bxse |
numeric vector of length the number of variants, the i-th element is the standard error of the estimated regression coefficient relating the i-th genetic variant to the outcome. |
byse |
numeric vector of length the number of variants, the i-th element is the standard error of the estimated regression coefficient relating the i-th genetic variant to the risk-factor. |
obs_names |
character vector of length the number of variants, the i-th element is the name of the i-th genetic variants - e.g. the rsID. |
Returned is a scatter plot of the two-stage association estimates for each variant in which: clusters are colour coded and variants with larger assignement/inclusion probabilities appear larger.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.