Generate simulated data from covariate-augmented Poisson factor models
gendata_simu_multi2(
seed = 1,
nvec = c(100, 300),
a_interval = c(0, 1),
p = 50,
d = 3,
q = 3,
qs = rep(2, length(nvec)),
rank0 = 3,
rho = c(rhoA = 1, rhoB = 1, rhoZ = 1),
sigma2_eps = 1,
seed.beta = 1
)return a list including the following components: (1) Xlist, the list consisting of high-dimensional count matrices from multiple studies; (2) aList: the known normalization term (offset) for each study; (3) Zlist, the list consisting of covariate matrix; (4) bbeta0, the true regression coefficient matrix; (5) A0, the loading matrix of study-shared factors; (6) Blist, the list consisting of loading matrices of study-specified factors; (7)lambdavec, the variance vector of the random error vector; (8)Flist, the list composed by study-shared factor matrices; (9) Hlist, the list composed by study-specified factor matrices; (10) rank0, the rank of underlying regression coefficient matrix; (11) q, the number of study-shared factors; (12)qs, the numbers of study-specified factors.
a postive integer, the random seed for reproducibility of data generation process.
a vector with postive integers, specify the sample size in each study/source.
a numeric vector with two elements, specify the range of offset term values in each study.
a postive integer, specify the dimension of count variables.
a postive integer, specify the dimension of covariate matrix.
a postive integer, specify the number of study-shared factors.
a vector with postive integers, specify the number of study-specified factors.
a postive integer, specify the rank of the coefficient matrix.
a numeric vector with length 3 and positive elements, specify the signal strength of regression coefficient and loading matrices, respectively.
a positive real, the variance of overdispersion error.
a postive integer, the random seed for fixing the regression coefficient matrix and loading matrix generation.
None
None
None
seed <- 1; nvec <- c(100,300); p<- 300;
d <- 3; q<- 3; qs <- rep(2,2)
datlist <- gendata_simu_multi2(seed=seed, nvec=nvec, p=p, d=d, q=3, qs=qs)
str(datlist)
Run the code above in your browser using DataLab