CentralityAndClusteringPlots {modnets}R Documentation

Plots for node centrality values or clustering coefficients

Description

Mimics the qgraph::centralityPlot and qgraph::clusteringPlot functions. The purpose of revising this function was to make it compatible with outputs from the modnets package.

Usage

centPlot(
  Wmats,
  scale = c("z-scores", "raw", "raw0", "relative"),
  which.net = "temporal",
  include = "all",
  labels = NULL,
  orderBy = NULL,
  decreasing = FALSE,
  plot = TRUE,
  verbose = TRUE,
  weighted = TRUE,
  signed = TRUE
)

clustPlot(
  Wmats,
  scale = c("z-scores", "raw", "raw0", "relative"),
  include = "all",
  labels = NULL,
  orderBy = NULL,
  decreasing = FALSE,
  plot = TRUE,
  signed = TRUE,
  verbose = TRUE
)

plotCentrality(
  Wmats,
  which.net = "temporal",
  scale = TRUE,
  labels = NULL,
  plot = TRUE,
  centrality = "all",
  clustering = "Zhang"
)

Arguments

Wmats

Output from one of the primary modnets functions.

scale

If "z-scores", then standardized values will be plotted. If "relative", then values will be scaled relative to the largest value on each measure. "raw" can be used to plot raw values.

which.net

Only applies to SUR networks, as well as those fit with the mlGVAR function. Character string to indicate which type of network to compute centrality values for. Options are "temporal" for the temporal network, "contemporaneous" for the contemporaneous network, "PDC" for the partial directed correlation network, and "interactions" for the temporal interaction network.

include

Character vector of which centrality measures to plot. "Betweenness" and "Closeness" are available for all types of network. "Strength" and "ExpectedInfluence" are only available for GGMs. And "InStrength", "OutStrength", "InExpectedInfluence", "OutExpectedInfluence" are only available for SUR networks. Defaults to "all"

labels

Character vector listing the node names. If NULL, then the names specified by the model are used.

orderBy

Character string specifying which measure to order values by.

decreasing

Logical. Only relevant if orderBy is specified. Determines whether values are organized from highest to lowest, or vice versa.

plot

Logical. Determines whether to plot the output or not.

verbose

Logical. Determines whether to return a message about the plot (messages are only shown if values are scaled).

weighted

See centTable or clustTable.

signed

See centTable or clustTable.

centrality

Character vector of centrality measures to plot. Defaults to "all".

clustering

Character vector of clustering measures to plot. Defaults to "Zhang".

Details

The only utility of the plotCentrality function is as an easy way to combine centrality measures and clustering coefficients into a single plot.

Value

A plot of centrality values or clustering coefficients for several measures.

See Also

centTable, clustTable, centAuto, clustAuto, qgraph::centralityPlot, qgraph::clusteringPlot

Examples

x <- fitNetwork(ggmDat)

centPlot(x)
clustPlot(x)
plotCentrality(x)

[Package modnets version 0.9.0 Index]