Description Usage Arguments Details Value Examples
Generate data from different multivariate distributions with different network structures.
1 | XMRF.Sim(n = 100, p = 50, model = "LPGM", graph.type = "scale-free")
|
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 " |
graph.type |
graph structure with 3 options:" |
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.
A list of two elements:
B |
pxp adjacency matrix of the generated graph. |
X |
pxn data matrix. |
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.