Difference between revisions of "GGBsnippet.R"

From Organic Design wiki
 
m (note on 2*slides=p)
Line 8: Line 8:
 
EEscales <- rgamma(m0 , shape=a0.shape, rate=scale)
 
EEscales <- rgamma(m0 , shape=a0.shape, rate=scale)
 
      
 
      
scales  <- c(rep(DEscales, each=slides), rep(EEscales, each=2*slides))
+
scales  <- c(rep(DEscales, each=slides), rep(EEscales, each=2*slides)) # same as p
 
      
 
      
 
X <- rgamma(n* p, a.shape, rate=scales)  
 
X <- rgamma(n* p, a.shape, rate=scales)  
 
dim(X) <- c(p, n)
 
dim(X) <- c(p, n)
 
X <- t(X)
 
X <- t(X)

Revision as of 04:43, 28 August 2006

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)) # same as p

X <- rgamma(n* p, a.shape, rate=scales) dim(X) <- c(p, n) X <- t(X)