Generate simulated data from covariate-augmented Poisson factor models
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.
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.
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)
#> List of 12
#> $ Xlist :List of 2
#> ..$ : int [1:100, 1:300] 1 1 1 7 3 3 5 3 0 1 ...
#> ..$ : int [1:300, 1:300] 0 1 1 2 0 3 8 0 0 1 ...
#> $ aList :List of 2
#> ..$ : num [1:100] 1 1 1 1 1 1 1 1 1 1 ...
#> ..$ : num [1:300] 1 1 1 1 1 1 1 1 1 1 ...
#> $ Zlist :List of 2
#> ..$ : num [1:100, 1:3] 1 1 1 1 1 1 1 1 1 1 ...
#> ..$ : num [1:300, 1:3] 1 1 1 1 1 1 1 1 1 1 ...
#> $ bbeta0 : num [1:300, 1:3] 0.03724 -0.03461 0.00616 0.01175 -0.01788 ...
#> $ A0 : num [1:300, 1:3] 0.1879 -0.0551 0.2506 -0.4784 -0.0988 ...
#> $ Blist0 :List of 2
#> ..$ : num [1:300, 1:2] 0.1815 -0.0355 -0.0231 0.1183 -0.0669 ...
#> ..$ : num [1:300, 1:2] 0.09699 -0.01999 -0.17171 0.12224 0.00868 ...
#> $ lambdavec: num [1:2] 1 1
#> $ Flist :List of 2
#> ..$ : num [1:100, 1:3] -0.1598 0.1588 0.0772 1.5905 0.8678 ...
#> .. ..- attr(*, "dimnames")=List of 2
#> .. .. ..$ : NULL
#> .. .. ..$ : NULL
#> ..$ : num [1:300, 1:3] -3.202 1.646 -1.011 -0.459 -1.057 ...
#> .. ..- attr(*, "dimnames")=List of 2
#> .. .. ..$ : NULL
#> .. .. ..$ : NULL
#> $ Hlist :List of 2
#> ..$ : num [1:100, 1:2] 2.833 1.647 1.838 0.857 0.325 ...
#> .. ..- attr(*, "dimnames")=List of 2
#> .. .. ..$ : NULL
#> .. .. ..$ : NULL
#> ..$ : num [1:300, 1:2] 0.966 0.046 -0.108 0.764 0.329 ...
#> .. ..- attr(*, "dimnames")=List of 2
#> .. .. ..$ : NULL
#> .. .. ..$ : NULL
#> $ rank : num 3
#> $ q : num 3
#> $ qs : num [1:2] 2 2