| plot.BayesSUR {BayesSUR} | R Documentation |
create a selection of plots
Description
plot method for class BayesSUR. This is the main plot function to be
called by the user. This function calls one or several of the following
functions: plotEstimator(), plotGraph(), plotMCMCdiag(),
plotManhattan(), plotNetwork(), plotCPO().
Usage
## S3 method for class 'BayesSUR'
plot(x, estimator = NULL, type = NULL, ...)
Arguments
x |
an object of class BayesSUR
|
estimator |
It is in c(NULL, 'beta', 'gamma', 'Gy', 'logP', 'CPO')
and works by combining with argument type.
If estimator is in c("beta", "gamma", "Gy") and
argument type="heatmap", it prints heatmaps of the specified
estimator in estimator by a call to to function
plotEstimator() for more other arguments.
If estimator="Gy" and argument type="graph", it prints
a structure graph of "Gy" by a call to function plotGraph()
for more other arguments.
If estimator=c("gamma", "Gy") and argument
type="network", it prints the estimated network between the
response variables and predictors with nonzero coefficients by a call to
function plotMCMCdiag() for more other arguments.
If estimator=NULL (default) and type=NULL (default),
it interactively prints the plots of estimators (i.e., beta, gamma
and (or) Gy), response graph Gy, network, Manhattan and MCMC diagnostics.
|
type |
It is one of NULL, "heatmap", "graph",
"network", "Manhattan" and "diagnostics", and works by
combining with argument estimator.
If type="Manhattan" and argument estimator="gamma",
it prints Manhattan-like plots for marginal posterior inclusion
probabilities (mPIP) and numbers of associated response variables for
individual predictors by a call to function plotManhattan() for
more other arguments.
If type="diagnostics" and argument estimator="logP"
it shows trace plots and diagnostic density plots of a fitted model by a
call to function plotMCMCdiag() for more other arguments.
If type="diagnostics" and argument estimator="CPO",
it shows the conditional predictive ordinate (CPO) for each individual of
a fitted model by a call to function plotCPO() for more other arguments.
|
... |
other arguments, see functions plotEstimator(),
plotGraph(), plotNetwork(), plotManhattan(),
plotMCMCdiag() or plotCPO()
|
Examples
data("exampleEQTL", package = "BayesSUR")
hyperpar <- list(a_w = 2, b_w = 5)
set.seed(9173)
fit <- BayesSUR(
Y = exampleEQTL[["blockList"]][[1]],
X = exampleEQTL[["blockList"]][[2]],
data = exampleEQTL[["data"]], outFilePath = tempdir(),
nIter = 2, burnin = 0, nChains = 1, gammaPrior = "hotspot",
hyperpar = hyperpar, tmpFolder = "tmp/"
)
## check output
## Not run:
## Show the interactive plots. Note that it needs at least 2000*(nbloc+1) iterations
## for the diagnostic plots where nbloc=3 by default
# plot(fit)
## End(Not run)
## plot heatmaps of the estimated beta, gamma and Gy
plot(fit, estimator = c("beta", "gamma", "Gy"), type = "heatmap")
## plot estimated graph of responses Gy
plot(fit, estimator = "Gy", type = "graph")
## plot network between response variables and associated predictors
plot(fit, estimator = c("gamma", "Gy"), type = "network")
## print Manhattan-like plots
plot(fit, estimator = "gamma", type = "Manhattan")
## print MCMC diagnostic plots
#plot(fit, estimator = "logP", type = "diagnostics")
[Package
BayesSUR version 2.2-1
Index]