Learn R Programming

robCompositions (version 2.6.0)

plot.cellNetCoDa: 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 cellNetCoDa
plot(x, y, ..., which = 1)

Value

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

invisibly.

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

Author

Matthias Templ

See Also

cellNetCoDa, print.cellNetCoDa, summary.cellNetCoDa

Examples

Run this code
# \donttest{
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
}
# }

Run the code above in your browser using DataLab