Ugraph(M, type = c("plain", "fancy", "weighted"), lay = layout.circle, Vsize = 15,
Vcex = 1, Vcolor = "orangered", VBcolor = "darkred", VLcolor = "black",
prune = FALSE, legend = FALSE, label = "", Lcex = 1.3, PTcex = 4, cut = 0.5,
scale = 10, pEcolor = "black", nEcolor = "grey", main = "")matrixcharacter indicating the type of graph to be produced. Must be one of: "plain", "fancy", "weighted".igraph determining the placement of vertices.numeric determining the vertex size.numeric determining the size of the vertex labels.character determining the vertex color.character determining the color of the vertex border.character determining the color of the vertex labels.logical determining if vertices of degree 0 should be removed.logical indicating if the graph should come with a legend.character giving a name to the legend label.numeric determining the size of the legend box.numeric determining the size of the exemplary vertex in the legend box.numeric indicating the cut-off for indicating strong edges when type = "fancy".numeric representing a scale factor for visualizing strenght of edges when type = "weighted".character determining the color of the edges tied to positive precision elements. Only when type = "weighted".character determining the color of the edges tied to negative precision elements. Only when type = "weighted".character giving the main figure title.type = "plain" a plain undirected graph is given representing the conditional (in)dependencies exemplified by
the sparsified precision.
When type = "fancy" a more elaborate graph is given in which dashed lines indicate
negative partial correlations while solid lines indicate positive partial correlations, and in which black lines indicate
strong edges. Strong edges are deemed such by setting cut. If a the absolute value of a precision element $\geq$ cut
the corresponding edge is deemed strong and colored black in the graph. The argument cut is thus only used when
type = "fancy".
When type = "weighted" an undirected graph is given in which edge thickness represents the strenght of the partial
correlations. The nEcolor colored edges then represent negative partial correlations while pEcolor colored edges
represent positive partial correlations. (Relative) edge thickness in this type of graph can be set by the argument scale.
The arguments scale, nEcolor, and pEcolor are thus only used when type = "weighted".
The default layout gives a circular placement of the vertices. All layout functions supported by
igraph are supported (the function is partly a wrapper around certain igraph functions).
The legend allows one to specify the kind of variable the vertices represent, such as, e.g., mRNA transcripts. The arguments
label, Lcex, and PTcex are only used when legend = TRUE.
If prune = TRUE the vertices of degree 0 (vertices not implicated by any edge) are removed. For the colors supported
by the arguments Vcolor, VBcolor, VLcolor, pEcolor, and nEcolor see
ridgeS, optPenaltyCV, optPenalty.aLOOCV, sparsify## Obtain some (high-dimensional) data
p = 25
n = 10
set.seed(333)
X = matrix(rnorm(n*p), nrow = n, ncol = p)
colnames(X)[1:25] = letters[1:25]
## Obtain regularized precision under optimal penalty
OPT <- optPenaltyCV(X, 12, 20, 10)
## Determine support regularized (standardized) precision under optimal penalty
PC0 <- sparsify(symm(OPT$optPrec), type = "localFDR")
## Obtain graphical representation
Ugraph(PC0, type = "fancy", cut = 0.05)Run the code above in your browser using DataLab