The functions allows to simulate values from a double (nested) univariate
Gaussian mixture:
$$
(Y_i|Z_i=j) \sim \sum_{s=1}^{2} p_{js}\, \mathcal{N}(\mu_{j}, \sigma^{2}_{js}),
$$
or from a multivariate nested Gaussian mixture:
$$
(Y_i|Z_i=j) \sim \sum_{s=1}^{2} p_{js}\, \mathcal{N}_{D}(\bm{\mu}_{j}, \Sigma_{s}),
$$
where \(\sigma^{2}_{js}\) is the variance for the group \(j\) and
the subgroup \(s\) (stdev
is the
argument for specifying the k x 2
standard deviations
for univariate mixtures);
\(\Sigma_s\) is the covariance matrix for the
subgroup \(s, s=1,2\), where the two matrices are
specified by Sigma.p1
and Sigma.p2
respectively; \(\mu_j\) and
\(\bm{\mu}_j, \ j=1,\ldots,k\)
are the mean input vector and matrix respectively,
specified by the argument Mu
;
W
is a vector of dimension 2 for the subgroups weights.