shock-package {shock} | R Documentation |
Slope Heuristic for Block-Diagonal Covariance Selection in High Dimensional Gaussian Graphical Models
Description
Block-diagonal covariance selection for high dimensional Gaussian graphical models. The selection procedure is based on the slope heuristics.
Details
Package: | shock |
Type: | Package |
Version: | 1.0 |
Date: | 2015-11-07 |
License: | GPL (>= 3) |
The function main function of the package (performShock) performs block-diagonal covariance selection for high-dimensional Gaussian graphical models.
Author(s)
Emilie Devijver, Melina Gallopin
Maintainer: Melina Gallopin <melina.gallopin@gmail.com>
References
Devijver, E., Gallopin, M. (2015). Block-diagonal covariance selection for high dimensional Gaussian graphical models. Inria Research Report . Available at http://arxiv.org/abs/1511.04033.
Examples
## load data to test
data(dataTest)
## dimension of the dataset expdata
n <- dim(dataTest)[1]
p <- dim(dataTest)[2]
## perform partition of variables selection
## based on the slope heuristic
resShock <- shockSelect(dataTest)
## verify that the two slope heuristic
## calibrations give the same result
table(resShock$SHDJlabels == resShock$SHRRlabels)
## collect the labels of variables
SHlabels <- resShock$SHDJlabels
## SHadjaMat: adjacency matrix of the inferred network
## Shock network inference
SHadjaMat<- diag(p)
for(itt in 1:length(unique(SHlabels))){
stepdata <- as.matrix(dataTest[,SHlabels==itt],nrow=dim(dataTest)[1])
if(dim(stepdata)[2]>1){
resNet <- networkInferenceGlassoBIC(stepdata)
SHadjaMat[SHlabels==itt,SHlabels==itt] <- resNet$A
}
}
[Package shock version 1.0 Index]