View source: R/simulateGraph.R
simulateGraph | R Documentation |
Generate random covariance matrices C
with sparse inverse. The
Gaussian law N(0,C)
is then a sparse
(non-uniform) Gaussian Graphical Model.
simulateGraph(p, eta, extraeta = eta/5)
p |
integer. Number of rows and columns of |
eta |
real number in (0,1). Proportion of edges in
subgroups. Small values of |
extraeta |
real number in (0,1). Proportion of edges inter groups. |
More details are available on ../doc/Notice.pdf
G |
p x p matrix. Adjacency matrix of the graph. |
Dmax |
integer. Maximum degree of the graph. |
Neighb |
array of dimension |
Nnodes |
integer. Number of nodes. |
C |
p x p matrix. Covariance matrix. |
PCor |
p x p matrix. Partial correlation matrix. |
Bouvier A, Giraud C, Huet S, Verzelen N
Please use citation("GGMselect")
.
selectQE
, selectMyFam
,
selectFast
, penalty
,
convertGraph
# simulate a graph
p=30
eta=0.13
Gr <- simulateGraph(p,eta)
# plot the graph
library(network)
par(mfrow=c(1,1))
gV <- network(Gr$G)
plot(gV,jitter=TRUE, usearrows = FALSE, label=1:p,displaylabels=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.