plot.varbvs {varbvs} | R Documentation |
Summarize variable selection results in a single plot.
Description
Generate a single plot that summarizes the results of fitting the Bayesian variable selection model to the data. When the variables are genetic markers, the groups are chromosomes, and the posterior probabilities are plotted on the vertical axis (typically on the logarithmic scale), the figure resembles a "Manhattan plot" typically used to summarize the results of a genome-wide association study or quantitative trait locus (QTL) mapping study.
Usage
## S3 method for class 'varbvs'
plot(x, score, groups, vars = NULL, var.labels,
draw.threshold = NA, gap = 0,col = "midnightblue", pch = 20,
scales = NULL, xlab = "variable", ylab = "posterior probability",
main = "fitted varbvs model: variable selection results",
abline.args = list(lty = "dotted",col = "orangered"),
vars.xyplot.args = list(pch = 20,col = "magenta"),
vars.ltext.args = list(col = "black",pos = 4,cex = 0.5),
par.settings = list(par.main.text = list(font = 1,cex = 0.8),
layout.heights = list(axis.top = 0, axis.bottom = 0)),
...)
Arguments
x |
Output of function |
score |
Value to plot on vertical axis. Must be a numeric vector
with one entry for each variable. If missing, the posterior inclusion
probability for each variable is plotted in the vertical axis, in
which this probability is averaged over hyperparameter settings,
treating |
groups |
Group the variables in the plot according to this argument. This must be a vector with one entry for each variable. If missing, all variables are treated as a single group. This is useful for grouping the genetic markers by chromosome in a genome-wide association study. |
vars |
Indices (type |
var.labels |
Labels to accompany the highlighted variables
only. If missing, labels are retrieved from |
draw.threshold |
Plot a horizontal line at this location on the vertical axis. |
gap |
Amount of space to leave between each group of variables in the plot. |
col |
Argument passed to |
pch |
Argument passed to |
scales |
Argument passed to |
xlab |
Argument passed to |
ylab |
Argument passed to |
main |
Argument passed to |
abline.args |
Additional arguments passed to |
vars.xyplot.args |
Additional arguments passed to |
vars.ltext.args |
Additional arguments passed to |
par.settings |
Argument passed to |
... |
Additional arguments passed to |
Details
Note that plot.varbvs
uses function xyplot
from the
lattice
package, and as.layer
from the
latticeExtra
package.
Value
An object of class "trellis"
generated by functions
xyplot
and as.layer
.
Author(s)
Peter Carbonetto peter.carbonetto@gmail.com
References
P. Carbonetto and M. Stephens (2012). Scalable variational inference for Bayesian variable selection in regression, and its accuracy in genetic association studies. Bayesian Analysis 7, 73–108.
See Also
xyplot
, ltext
,
panel.abline
, varbvs
,
summary.varbvs
, varbvsindep