XMRF.Sim: Generate simulated data from XMRF models

Description Usage Arguments Details Value Examples

Description

Generate data from different multivariate distributions with different network structures.

Usage

1
XMRF.Sim(n = 100, p = 50, model = "LPGM", graph.type = "scale-free")

Arguments

n

number of samples, default to 100.

p

number of variables, default to 50.

model

Markov Network models to indicate the distribution family of the data to be generated, default to "LPGM". Other model options include "PGM", "TPGM", "SPGM", "GGM" and "ISM".

graph.type

graph structure with 3 options:"scale-free", "hub", and "lattice". Default to "scale-free".

Details

This function will first generate a graph of the specified graph structure; then based on the generated network, it simulates a multivariate data matrix that follows distribution for the Markov Random Fields model specified.

Value

A list of two elements:

B

pxp adjacency matrix of the generated graph.

X

pxn data matrix.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
library(XMRF)

# simulate scale-free network and data of multivariate Poisson for LPGM
sim <- XMRF.Sim(n=100, p=20, model="LPGM", graph.type="scale-free")
hist(sim$X)
plotNet(sim$B)

# simulate hub network and data of multivariate Gaussian for GGM
sim <- XMRF.Sim(n=100, p=20, model="GGM", graph.type="hub")
hist(sim$X)
plotNet(sim$B)

# simulate hub network and data of multivariate bionomial for ISM
sim <- XMRF.Sim(n=100, p=15, model="ISM", graph.type="hub")
hist(sim$X)
plotNet(sim$B)

XMRF documentation built on May 2, 2019, 8:18 a.m.