Learn R Programming

BDgraph (version 2.13)

plotroc: ROC plot

Description

Plot the ROC curve according to the true graph structure for the "bdgraph" output.

Usage

plotroc( G, prob, prob2 = NULL, cut = 20, smooth = FALSE )

Arguments

G
The adjacency matrix corresponding to the true graph structure in which $G_{ij}=1$ if there is a link between notes $i$ and $j$, otherwise $G_{ij}=0$. It also can be an object with S3 class "simulate".
prob
Upper triangular matrix which shows the stimated posterior inclusion probabilities for all possible edges. It also can be an object with S3 class "bdgraph".
prob2
This option is for comparing two different estimations. Upper triangular matrix which shows the stimated posterior inclusion probabilities for all possible edges. It also can be an object with S3 class "bdgraph".
cut
Number of cut point. Default is 20.
smooth
Logical: for smoothing the ROC curve. The default is FALSE.

References

Mohammadi, A. and Wit, E. C. (2014). Bayesian structure learning in sparse Gaussian graphical models, Bayesian Analysis, acceped. http://arxiv.org/abs/1210.5371v6

See Also

bdgraph and compare

Examples

Run this code
# generating synthetic multivariate normal data from a 'random' graph
  data.sim <- bdgraph.sim( n = 50, p = 6, size = 7, vis = TRUE )
  
  # selecting the best graph according to BD-MCMC algorithm
  output <- bdgraph( data = data.sim, iter = 10000 )
  # comparing the result
  plotroc( data.sim, output )
  
  plotroc( data.sim, output, smooth = TRUE )

Run the code above in your browser using DataLab