centrality: Plot strength centralities and 95% highest density interval

View source: R/AuxiliaryFunctions.R

centralityR Documentation

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, ...)

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

Value

Returns a plot

Examples



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)


easybgm documentation built on Dec. 8, 2025, 5:11 p.m.