get_latents | R Documentation |
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 = NULL, sigma_Z = NULL, Z_old = NULL, USING_CPP = TRUE )
Y |
Matrix or data frame containing the observed data. |
var_type |
Character vector that indicates the type of variable in each column of Y. Three possible types:
|
mu_Z |
an optional vector with the expected values μ_Z of the latent variables. |
sigma_Z |
an optional matrix with the covariance matrix Σ_Z of the latent variables. |
Z_old |
an optional matrix with initial values for the latent variables that will be simulated. |
USING_CPP |
indicates usage of C++ in some modules. |
For each variable in the Y
data frame, an associated continuous latent variable is generated.
if Y_j is continuous, 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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.