View source: R/bayes_compare.R
| plot.net_bayes | R Documentation |
Draws a differential transition network as a directed chord diagram.
Edge colour encodes the signed posterior mean difference (x
stronger vs y stronger) and edge width its magnitude.
## S3 method for class 'net_bayes'
plot(x, significant_only = TRUE, title = NULL, ...)
x |
A |
significant_only |
Logical. Show only credibly-different edges
(default |
title |
Optional plot title. |
... |
Additional arguments passed to |
Invisibly, the cograph network returned by cograph::splot()
when cograph is available; otherwise a fallback ggplot object.
s1 <- data.frame(V1 = c("A","B","C"), V2 = c("B","C","A"))
s2 <- data.frame(V1 = c("A","C","B"), V2 = c("C","B","A"))
b <- bayes_compare(build_network(s1, method = "relative"),
build_network(s2, method = "relative"),
draws = 500, seed = 1)
plot(b, significant_only = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.