plot.cellNetCoDa: Plot method for cellwise-robust compositional networks

View source: R/plot.cellNetCoDa.R

plot.cellNetCoDaR Documentation

Plot method for cellwise-robust compositional networks

Description

Diagnostic plots for a cellNetCoDa object. which = 1 (default) draws the estimated network with the parts as nodes on a circular layout (node size proportional to degree). which = 2 draws the cellwise contamination heatmap of the detector flags (parts on the x-axis, observations on the y-axis). which = 3 draws the StARS instability path used for penalty selection (raw and monotonised instability over the penalty grid, with the selection threshold and the chosen penalty marked).

Usage

## S3 method for class 'cellNetCoDa'
plot(x, y, ..., which = 1)

Arguments

x

object of class "cellNetCoDa" as returned by cellNetCoDa

y

not used

...

further arguments passed to segments (for which = 1) or image (for which = 2); ignored for which = 3

which

integer; 1 for the network graph (default), 2 for the contamination heatmap, 3 for the StARS instability path

Value

Called for its side effect (a plot). Returns NULL invisibly.

Author(s)

Matthias Templ

See Also

cellNetCoDa, print.cellNetCoDa, summary.cellNetCoDa

Examples


if (requireNamespace("glmnet", quietly = TRUE)) {
  data(expenditures)
  set.seed(1)
  net <- cellNetCoDa(expenditures, method = "mb",
                     lambda_grid = c(0.4, 0.2, 0.1, 0.05), B = 10, k = 2)
  plot(net)                # network graph
  plot(net, which = 2)     # contamination heatmap
  plot(net, which = 3)     # StARS instability path
}


robCompositions documentation built on Nov. 1, 2026, 1:06 a.m.