The goal of nethist is to estimate graphons by network histogram (Wolfe and Olhede 2013; Olhede and Wolfe 2014). It also provides extra tools for summary violin plot for networks (Maugis, Olhede, and Wolfe 2017) and visualizing network histogram. Use undirected and simple graphs with no self-loops (either igraph or matrix) as inputs for the functions in this package.
To install the package from source, you need C++ and Fortran compilers.
You can install the development version of nethist from GitHub with:
# install.packages("devtools") devtools::install_github("EnigmaSong/nethist")
Here are basic examples using political blog data set in the package:
We use polblog dataset in the package for our examples.
We can estimate a network histogram from the political blog data and plot it.
You can use a user-specified indices for plots. Here is an example:
## Users can specify the color palette library(RColorBrewer) plot(hist_polblog, idx_order = ind, col = brewer.pal(9, "Greys"))
You can display the estimated block probabilities by setting
type = prob and
## Users can specify the color palette plot(hist_polblog, idx_order = ind, type = "prob", prob= TRUE, prob.col = "blue", col = colorRampPalette(colors=c("#FFFFFF","#000000"))(200))