Description Usage Arguments Details Value Examples
Generate inverse covariances, means, mixing probabilities, and simulate data from resulting mixture model.
1 2 | sim_mix_networks(n, p, n.comp, sparsity = 0.7, mix.prob = rep(1/n.comp,
n.comp), Mu = NULL, Sig = NULL, ...)
|
n |
Number of data points to simulate. |
p |
Dimensionality of the data. |
n.comp |
Number of components of the mixture model. |
sparsity |
Determines the proportion of non-zero off-diagonal entries. |
mix.prob |
Mixture probabilities for the components; defaults to uniform distribution. |
Mu |
Means for the mixture components, a p by n.comp matrix. If NULL, sampled from a standard Gaussian. |
Sig |
Covariances for the mixture components, a p by p by n.comp
array. If NULL,
generated using |
... |
Further arguments passed to |
This function generates n.comp mean vectors from a standard Gaussian and
n.comp covariance matrices, with at most (1-sparsity)*p(p-1)/2
non-zero off-diagonal entries, where the non-zero entries are sampled from a
beta distribution. Then it uses sim_mix
to simulate from a
mixture model with these means and covariance matrices.
Means Mu and covariance matrices Sig can also be supplied by the user.
A list with components:
Mu
Means of the mixture components.
Sig
Covariances of the mixture components.
data
Simulated data, a n by p matrix.
S
Component assignments, a vector of length n.
1 2 | # Generate dataset with 100 samples of dimensionality 30, and 4 components
test.data = sim_mix_networks(n=100, p=30, n.comp=4)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.