plotGraph {BayesSUR}R Documentation

plot the estimated graph for multiple response variables

Description

Plot the estimated graph for multiple response variables from a BayesSUR class object.

Usage

plotGraph(
  x,
  Pmax = 0.5,
  main = "Estimated graph of responses",
  edge.width = 2,
  edge.weight = FALSE,
  vertex.label = NULL,
  vertex.label.color = "black",
  vertex.size = 30,
  vertex.color = "dodgerblue",
  vertex.frame.color = NA,
  ...
)

Arguments

x

either an object of class BayesSUR (default) or a symmetric numeric matrix representing an adjacency matrix for a given graph structure. If x is an adjacency matrix, argument main="Given graph of responses" by default.

Pmax

a value for thresholding the learning structure matrix of multiple response variables. Default is 0.5

main

an overall title for the plot

edge.width

edge width. Default is 2

edge.weight

draw weighted edges after thresholding at 0.5. The default value FALSE is not to draw weighted edges

vertex.label

character vector used to label the nodes

vertex.label.color

label color. Default is "black"

vertex.size

node size. Default is 30

vertex.color

node color. Default is "dodgerblue"

vertex.frame.color

node color. Default is "NA"

...

other arguments

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 = 100, burnin = 50, nChains = 2, gammaPrior = "hotspot",
                hyperpar = hyperpar, tmpFolder = "tmp/" )

## check output
# show the graph relationship between responses
plotGraph(fit, estimator = "Gy")


[Package BayesSUR version 2.0-1 Index]