GGMmodel: R6 Class for simulating Gaussian Graphical Model

Description Usage Arguments Methods Examples

Description

The Class GGMmodel simulate Gaussian Graphical Model. It can use many different models

Usage

1
experiment = GGMmodel$new(graph=NULL, prop.positive.cor=1, type="erdos",size=30, p.or.m =0.1,eta=0.2,extraeta=eta/5,nb.missing.var=0,alpha.hidden= 2,alpha.observed = 1.2)

Arguments

- prop.positive.cor A real number indicating the proportion of positive correlation (1 by default)

- graph A graph object

- K K Precision matrix derived from the Graph

- Sigma Covariance matrix derived from the Graph

- missing.var.list indices of the missing variables if any

- X Simulated data using a Gaussian model with zero mean vector and covariance matrix of the object

Methods

$new(graph=NULL, prop.positive.cor=1, type="erdos",size=30, p.or.m =0.1,eta=0.2,extraeta=eta/5,nb.missing.var=0,alpha.hidden= 2,alpha.observed = 1.2) Initialize the model

$getAdjmat() returns the adjacency matrix of the graph,

$getAdjmatCond() returns the conditional adjacency matrix if there is missing data

$getAdjmatMarg=() returns the marginal adjacency matrix if there is missing data

$randomSample(n=100) generates a random sample of size n accissible through the argument X

$getX() access the generated Data

$getXobs() access the observed part of the generated Data

getXmis() access the missing part of the generated Data

plot() plot the generated Data matrix

Examples

1
2
3
4
5
6
7
## Not run: 
star.graph <- graphModel$new(type = "starerdos",size=30, p.or.m = 0.05)
star.model <- GGMmodel$new(graph=star.graph)
plot(star.model)
star.model$randomSample(n=50)

## End(Not run)

cambroise/LITree documentation built on May 6, 2019, 8:32 p.m.