GGB-correlation-snippet.R

From Organic Design wiki
Revision as of 03:01, 28 August 2006 by Sven (talk | contribs) (Fixing parameters (untested))

p <- 1000 n <- 10 a.shape <- parameters[1] a0.shape <- parameters[2] scale <- parameters[3] k <- 20

kcorrelation <- rgamma(2*m1 shape=k, rate=k) # p49 2001 NEWTON paper DEscales <- rep(rgamma(m1, shape=a0.shape, rate=scale), each=2) DEscales <- DEscales * kcorrelation

kcorrelation <- rgamma(m0, shape=k, rate=k) EEscales <- rgamma(m0 , shape=a0.shape, rate=scale) EEscales <- EEscales / kcorrelation scales <- c(rep(DEscales, each=slides), rep(EEscales, each=2*slides))

X <- rgamma(ngenes*p, a.shape, rate=scales) dim(X) <- c(p, n) X <- t(X) # Data already on raw scale