gplot.sglasso {sglasso}R Documentation

Plotting Sparse Graphs

Description

gplot.sglasso shows the sequence of graphs estimated by sglasso.

Usage

## S3 method for class 'sglasso'
gplot(object, rhoid, layout = layout.circle, ...)

Arguments

object

fitted sglasso object;

rhoid

vector of integers used to specificy the \rho-values used to fit the sglasso model. By default gplot.sglasso shows the sequence of graphs estimated by sglasso. Only topologically different graphs are plotted;

layout

a function or a matrix used to specify the layout of the graphs that will be plotted. By default the layout.circle function is used;

...

further graphical parameters used to plot the graphs. See package igraph for more details.

Details

gplot.sglasso shows the sequence of topologically different graphs estimated by sglasso. To specify the layout of the graphs, the user can use any layout function available in the R package igraph. The user can also specify the placement of the vertices by a matrix with two columns and the same number of rows as the number of vertices.

Author(s)

Luigi Augugliaro
Maintainer: Luigi Augugliaro luigi.augugliaro@unipa.it

See Also

sglasso function.

Examples

N <- 100
p <- 5
X <- matrix(rnorm(N * p), N, p)
S <- crossprod(X)/N
mask <- outer(1:p, 1:p, function(i,j) 0.5^abs(i-j))
mask[1,5] <- mask[1,4] <- mask[2,5] <- NA
mask[5,1] <- mask[4,1] <- mask[5,2] <- NA
out.sglasso_path <- sglasso(S, mask, tol = 1.0e-13)
gplot(out.sglasso_path)
gplot(out.sglasso_path, rhoid = 1:5)

[Package sglasso version 1.2.6 Index]