Learn R Programming

easybgm (version 0.3.1)

centrality: Plot strength centralities and 95% highest density interval

Description

Visualize the strength centralities and their uncertainties. The centrality estimate can be obtained for each sample of the posterior distribution of the association parameters to obtain an estimate of the uncertainty of the strength centrality estimate.

Usage

plot_centrality(output, group_names = NULL, ...)

Value

Returns a plot

Arguments

output

One output object or a list of several output objects from the easybgm function. Supports also objects from the bgm function of the bgms package.

group_names

Specifying the group names, when providing a list of output objects. Needs to be a vector in the same length as the provided number of objects.

...

Additional arguments passed onto ggplot2

Examples

Run this code

# \donttest{
library(easybgm)
library(bgms)

data <- na.omit(Wenchuan)
fit <- easybgm(data, type = "ordinal",
                iter = 100,  # for demonstration only (> 5e4 recommended)
                edge_selection = TRUE, save = TRUE, 
                centrality = TRUE)

plot_centrality(fit)
# }

Run the code above in your browser using DataLab