Difference between revisions of "LNNB-snippet.R"
From Organic Design wiki
m |
|||
Line 1: | Line 1: | ||
+ | p <- 1000 | ||
+ | n <- 10 | ||
mu <- defaults["mu"] | mu <- defaults["mu"] | ||
sigma <- defaults["sigma"] | sigma <- defaults["sigma"] | ||
tau <- defaults["tau"] | tau <- defaults["tau"] | ||
− | + | ||
means <- c(rep(rnorm(2*m1, mu, tau), each=slides),rep(rnorm(m0 , mu, tau), each=p)) | means <- c(rep(rnorm(2*m1, mu, tau), each=slides),rep(rnorm(m0 , mu, tau), each=p)) | ||
− | X <- 2^(rnorm( | + | X <- 2^(rnorm(n*p, means, sigma)) |
− | dim(X) <- c(p, | + | dim(X) <- c(p, n) |
X <- t(X) | X <- t(X) |
Revision as of 04:44, 28 August 2006
p <- 1000 n <- 10 mu <- defaults["mu"] sigma <- defaults["sigma"] tau <- defaults["tau"]
means <- c(rep(rnorm(2*m1, mu, tau), each=slides),rep(rnorm(m0 , mu, tau), each=p))
X <- 2^(rnorm(n*p, means, sigma)) dim(X) <- c(p, n) X <- t(X)