GGBsnippet.R
From Organic Design wiki
p <- 1000 n <- 10 a.shape <- parameters[1] a0.shape <- parameters[2] scale <- parameters[3]
DEscales <- rgamma(2*m1, shape=a0.shape, rate=scale) EEscales <- rgamma(m0 , shape=a0.shape, rate=scale)
scales <- c(rep(DEscales, each=slides), rep(EEscales, each=2*slides))
X <- rgamma(n* p, a.shape, rate=scales) dim(X) <- c(p, n) X <- t(X)