Description Usage Arguments Value Examples
Generate synthetic OTU abundance table from DirFactor model with block diagonal between-sample Gram matrix.
1 | SimDirFactorBlock(vcounts, n, p, m, hyper, K = 1, a = 2)
|
vcounts |
Required. A vector of total counts per biological sample. Example:
|
n |
Required. Number of biological samples in the simualted table. |
p |
Required. Number of species in the simulated dataset. |
m |
Required. True number of factors in the simulated dataset. |
hyper |
Required. A list of hyper-parameters in the priors. See Details in DirFactor for the fields in this list. |
K |
Number of diagonal blocks in the Gram matrix of biological samples. Default is 1 (not block diagonal). |
a |
Random weights of species are generated by |
A list contains the following fields:
sigma
: a vector with p
components of simulated sigma
.
Q
: a p*n matrix of normal latent variables.
X.tru
: a m*p matrix of species latent factors.
Y.tru
: a m*n matrix of biological sample latent factors.
er
: a scalar of the simulated pure error.
data
: a list with the same size of vcounts
. data[[i]]
is the simulated
dataset with total counts vcounts[[i]]
.
1 2 3 | my.hyper = list( nv = 3, a.er = 1, b.er = 0.3, a1 = 3,
a2 = 4, m = 10, alpha = 10, beta = 0 )
SimDirFactorBlock( vcounts=c(1e5,1e6), n = 22, p = 68, m = 3, hyper = my.hyper )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.