gendata_simu_multi2 {MultiCOAP}R Documentation

Generate simulated data

Description

Generate simulated data from covariate-augmented Poisson factor models

Usage

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
)

Arguments

seed

a postive integer, the random seed for reproducibility of data generation process.

nvec

a vector with postive integers, specify the sample size in each study/source.

a_interval

a numeric vector with two elements, specify the range of offset term values in each study.

p

a postive integer, specify the dimension of count variables.

d

a postive integer, specify the dimension of covariate matrix.

q

a postive integer, specify the number of study-shared factors.

qs

a vector with postive integers, specify the number of study-specified factors.

rank0

a postive integer, specify the rank of the coefficient matrix.

rho

a numeric vector with length 3 and positive elements, specify the signal strength of regression coefficient and loading matrices, respectively.

sigma2_eps

a positive real, the variance of overdispersion error.

seed.beta

a postive integer, the random seed for fixing the regression coefficient matrix and loading matrix generation.

Details

None

Value

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.

References

None

See Also

None

Examples

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)

[Package MultiCOAP version 1.1 Index]