Simulates values for latent variables \(Z=(Z_1,...,Z_q)\) according to the specification in the mixdpclust model.
get_latents(Y, var_type, mu_Z.ini = NULL, sigma_Z.ini = NULL,
Z.ini = NULL)Matrix or data frame containing the observed data.
Character vector that indicates the type of variable in each column of Y. Three possible types:
"c" for continuous variables.
"o" for ordinal variables (ordered categorical).
"m" for nominal variables (non-ordered categorical).
an optional vector with the expected values \(\mu_Z\) of the latent variables.
an optional matrix with the covariance matrix \(\Sigma_Z\) of the latent variables.
an optional matrix with initial values for the latent variables that will be simulated.
For each variable in the Y data frame, an associated continuos latent variable is generated.
if \(Y_j\) is continuos, the corresponding \(Z_j\) will keep the original values of \(Y_j\).
If \(Y_j\) is categorical, the function will scan the unique values of \(Y_j\) and generate continuous latent variables accordingly.