BayesSUR (version 1.2-1)

plot.network: plot the network representation of the associations between responses and predictors

Description

Plot the network representation of the associations between responses and predictors, based on the estimated gamma matrix and graph of responses from a "BayesSUR" class object.

Usage

# S3 method for network
plot(
  x,
  includeResponse = NULL,
  excludeResponse = NULL,
  includePredictor = NULL,
  excludePredictor = NULL,
  MatrixGamma = NULL,
  PmaxPredictor = 0.5,
  PmaxResponse = 0.5,
  nodesizePredictor = 2,
  nodesizeResponse = 15,
  no.isolates = FALSE,
  lineup = 1.2,
  gray.alpha = 0.6,
  edgewith.response = 5,
  edgewith.predictor = 2,
  edge.weight = FALSE,
  label.predictor = NULL,
  label.response = NULL,
  color.predictor = NULL,
  color.response = NULL,
  name.predictors = NULL,
  name.responses = NULL,
  vertex.frame.color = NA,
  layoutInCircle = FALSE,
  header = "",
  ...
)

Arguments

x

an object of class get.estimator with estimator=c("gamma","Gy")

includeResponse

A vector of the response names which are shown in the network

excludeResponse

A vector of the response names which are not shown in the network

includePredictor

A vector of the predictor names which are shown in the network

excludePredictor

A vector of the predictor names which are not shown in the network

MatrixGamma

A matrix or dataframe of the latent indicator variable. Default is NULL and to extrate it from object of class inheriting from an object of class "BayesSUR"

PmaxPredictor

cutpoint for thresholding the estimated latent indicator variable. Default is 0.5

PmaxResponse

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

nodesizePredictor

node size of Predictors in the output graph. Default is 15

nodesizeResponse

node size of response variables in the output graph. Default is 25

no.isolates

remove isolated nodes from responses graph and Full graph, may get problem if there are also isolated Predictors

lineup

A ratio of the heights between responses' area and Predictors'

gray.alpha

the opacity. The default is 0.6

edgewith.response

the edge width betwen response nodes

edgewith.predictor

the edge width betwen the predictor and response node

edge.weight

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

label.predictor

A vector of the names of predictors

label.response

A vector of the names of response variables

color.predictor

color of the predictor nodes

color.response

color of the reponse nodes

name.predictors

a subtitle for the predictors

name.responses

a subtitle for the responses

vertex.frame.color

The color of the frame of the vertices. If you don't want vertices to have a frame, supply NA as the color name

layoutInCircle

place vertices on a circle, in the order of their vertex ids. The default is FALSE

header

the main title

...

other arguments

Examples

Run this code
# NOT RUN {
data("example_eQTL", package = "BayesSUR")
hyperpar <- list( a_w = 2 , b_w = 5 )

set.seed(9173)
fit <- BayesSUR(Y = example_eQTL[["blockList"]][[1]], 
                X = example_eQTL[["blockList"]][[2]],
                data = example_eQTL[["data"]], outFilePath = tempdir(),
                nIter = 100, burnin = 50, nChains = 2, gammaPrior = "hotspot",
                hyperpar = hyperpar, tmpFolder = "tmp/" )

## check output
# show the Network representation of the associations between responses and features
network <- get.estimator(fit, estimator = c("gamma","Gy"))
plot(network)

# }

Run the code above in your browser using DataLab