Simulate data from the covariate-varying interaction model (Simulation 1)
Source:R/simulate.R
simulate_bcaia.RdGenerates a dataset mirroring Simulation 1 of the paper: a categorical
design with two factors (a binary and a ternary covariate) giving six
experimental conditions, a rank-K_true covariate-varying covariance,
and mean-abundance regression coefficients. Useful for quick demonstrations
and for reproducing the simulation study.
Value
A list with the count matrix Y, the design matrices
Xmean and Xcov, and a truth sublist containing
Sigma (a J x J x n array), Q, F, beta,
ri, alpha and mu.
Examples
sim <- simulate_bcaia(seed = 6)
dim(sim$Y)
#> [1] 30 15