# NOT RUN {
#rm(list=ls())
set.seed(123)
##generate some fake data
########################
n <- 100
r <- 12
phi <- matrix(rep(1:3), 4, ncol=1, nrow=r)
sigma <- 0.4
b0 <- 1
#under the null:
b1 <- 0
#under the alternative:
b1 <- 0.7
y.tilde <- b0 + b1*phi + rnorm(r, sd = sigma)
y <- floor(exp(t(matrix(rnorm(n*r, sd = sqrt(sigma*abs(y.tilde))), ncol=n, nrow=r) +
matrix(rep(y.tilde, n), ncol=n, nrow=r))))
x <- matrix(1:2, ncol=1, nrow=r/2)
indiv=rep(1:4, each=3)
#run test
temp <- deseq_fn(y, x, phi, indiv)
# }
Run the code above in your browser using DataLab