Skip to contents

Plots a heatmap or a BIC curve for an hnethist object.

Usage

# S3 method for class 'hnethist'
plot(x, type = "nethist", at = NULL, ...)

Arguments

x

an hnethist object from hnethist().

type

One of nethist (default), prob, or BIC. When type = "BIC", plots BIC values against the number of shapes s. The selected model is marked with a dashed vertical line, and the rightmost point (largest s, corresponding to the initial nethist fit) is labelled. type = "bic" is also accepted.

at

A numeric vector of breakpoints for the color scale. Passed to plot.nethist(). See plot.nethist() for details.

...

Additional arguments passed to plot() when type = "BIC", or to plot.nethist() otherwise.

Value

Called for its side effects (plotting). Returns NULL invisibly.

Examples

# \donttest{
set.seed(2022)
A <- igraph::as_adjacency_matrix(
  igraph::sample_gnp(100, 0.3), sparse = FALSE)
fit <- suppressMessages(hnethist(A))
plot(fit)

plot(fit, type = "BIC")

# }