powered by
Produce one or more samples from the specified Gaussian graphical model.
ggm.generator(n, Omega)
A numeric matrix with n rows and p variables where p corresponds to the dimension of Omega.
n
p
Omega
The number of samples required.
The inverse covariance matrix of the specified Gaussian graphical model.
library(gif) set.seed(1) n <- 200 p <- 100 Omega <- diag(1, p, p) for(i in 1:(p - 1)) { Omega[i, i + 1] <- 0.5 Omega[i + 1, i] <- 0.5 } x <- ggm.generator(n, Omega)
Run the code above in your browser using DataLab