| selectMyFam {GGMselect} | R Documentation |
Select a graph within a given family of graphs in Gaussian Graphical Modeling.
Description
Select a graph within a given family of graphs.
Usage
selectMyFam(X, MyFamily, K=2.5, min.ev=10**(-8))
Arguments
X |
|
MyFamily |
list of pxp adjacency matrices corresponding to
graphs with degree less or equal to |
K |
scalar or vector with values larger than 1. Tuning parameter of the penalty function. |
min.ev |
minimum eigenvalue for matrix inversion. |
Details
More details are available on ../doc/Notice.pdf
Value
Neighb |
array of dimension |
crit.min |
vector of dimension |
ind.min |
vector of dimension |
G |
array of dimension |
Note
Adjacency matrices can be generated from lists of connected nodes
by using the function convertGraph
Author(s)
Bouvier A, Giraud C, Huet S, Verzelen N.
References
Please use citation("GGMselect").
See Also
selectFast, selectQE,
simulateGraph, penalty,
convertGraph
Examples
p=30
n=30
# generate graph
eta=0.11
Gr <- simulateGraph(p,eta)
# generate data
X <- rmvnorm(n, mean=rep(0,p), sigma=Gr$C)
# generate a family of candidate graphs with glasso
library("glasso")
MyFamily <- NULL
for (j in 1:3){
MyFamily[[j]] <- abs(sign(glasso(cov(X),rho=j/5)$wi))
diag(MyFamily[[j]]) <- 0
}
# select a graph within MyFamily
GMF <- selectMyFam(X,MyFamily)
# plot the result
library(network)
par(mfrow=c(1,2))
gV <- network(Gr$G)
plot(gV,jitter=TRUE, usearrows = FALSE, label=1:p,displaylabels=TRUE)
gMyFam <- network(GMF$G)
plot(gMyFam, jitter=TRUE, usearrows = FALSE, label=1:p,displaylabels=TRUE)