sGGM: Model selection of Gaussian graphical model based on SBIC

Description Usage Arguments Value Author(s) Examples

Description

Select the model based on the SBIC criterion and the two-step algorithm

Usage

1
sggm(data, lambda, M, prob)

Arguments

data

An n by p dataframe representing the observations

lambda

A vector of tuning parameters used to build the model pool

M

The prior adjacency matrix

prob

The mean error rate

Value

A list of objects containing:

networkhat

The final selected adjacency matrix

candidates

The model pool

Author(s)

Jie Zhou

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
   set.seed(1)
   m1 = 100
   m2 = 30
   p = 100
   n = 100
   d=simulate(n=n,p=p, m1 = m1, m2 = m2) # simulate fake data 
   lambda=exp(seq(-5,5,length=100)) # tuning parameter
   data=d$data # data from the simulation
   M=d$priornetwork # prior network from simulation
   # calculating the error rate 
   r1=m2/m1
   r2=m2/(p*(p-1)/2-m1)
   r=(r1+r2)/2
   # apply sggm 
   result=sggm(data=data, lambda=lambda, M=M, prob=r)
   # compare the final network and the true network 
   result$networkhat
   d$realnetwork

hoenlab/SBIC documentation built on March 6, 2021, 11:58 a.m.