View source: R/gplot.sglasso.R
gplot.sglasso | R Documentation |
gplot.sglasso
shows the sequence of graphs estimated by sglasso
.
## S3 method for class 'sglasso' gplot(object, rhoid, layout = layout.circle, ...)
object |
fitted |
rhoid |
vector of integers used to specificy the rho-values used to fit the sglasso model. By default |
layout |
a function or a matrix used to specify the layout of the graphs that will be plotted. By default the |
... |
further graphical parameters used to plot the graphs. See package igraph for more 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.
Luigi Augugliaro
Maintainer: Luigi Augugliaro luigi.augugliaro@unipa.it
sglasso
function.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.