plot_centrality {tsnet}R Documentation

Plot Centrality Measures

Description

This function creates a plot of various centrality measures for a given object. The plot can be either a "tiefighter" plot or a "density" plot. The "tiefighter" plot shows the centrality measures for each variable with uncertainty bands, while the "density" plot shows the full density of the centrality measures.

Usage

plot_centrality(obj, plot_type = "tiefighter", cis = 0.95)

Arguments

obj

An object containing the centrality measures obtained from [get_centrality()].

plot_type

A character string specifying the type of plot. Accepts "tiefighter" or "density". Default is "tiefighter".

cis

A numeric value specifying the credible interval. Must be between 0 and 1 (exclusive). Default is 0.95.

Value

A ggplot object visualizing the centrality measures. For a "tiefighter" plot, each point represents the mean centrality measure for a variable, and the bars represent the credible interval. In a "density" plot, distribution of the centrality measures is visualized.

Examples


data(fit_data)
obj <- get_centrality(fit_data[[1]])
  plot_centrality(obj,
  plot_type = "tiefighter",
  cis = 0.95)



[Package tsnet version 0.1.0 Index]