gendata_simu: Generate simulated data

gendata_simuR Documentation

Generate simulated data

Description

Generate simulated data from covariate-augmented Poisson factor models

Usage

gendata_simu(
  seed = 1,
  n = 300,
  p = 50,
  d = 20,
  q = 6,
  rank0 = 3,
  rho = c(1.5, 1),
  sigma2_eps = 0.1,
  seed.beta = 1
)

Arguments

seed

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

n

a postive integer, specify the sample size.

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 factors.

rank0

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

rho

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

sigma2_eps

a positive real, the variance of overdispersion error.

seed.beta

a postive integer, the random seed for reproducibility of data generation process by fixing the regression coefficient matrix beta.

Details

None

Value

return a list including the following components: (1) X, the high-dimensional count matrix; (2) Z, the high-dimensional covriate matrix; (3) bbeta0, the low-rank large coefficient matrix; (4) B0, the loading matrix; (5) H0, the factor matrix; (6) rank: the true rank of bbeta0; (7) q: the true number of factors.

References

None

See Also

RR_COAP

Examples

n <- 300; p <- 100
d <- 20; q <- 6; r <- 3
datlist <- gendata_simu(n=n, p=p, d=20, q=q, rank0=r)
str(datlist)

COAP documentation built on May 29, 2024, 5:06 a.m.