shock-package: Slope Heuristic for Block-Diagonal Covariance Selection in...

Description Details Author(s) References Examples

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 <[email protected]>

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
## 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
  }
}

shock documentation built on May 29, 2017, 11:06 p.m.