This function is a wrapper around mx_mixture to simplify the specification of latent profile models, also known as finite mixture models. By default, the function estimates free means for all observed variables across classes.

mx_profiles(
data = NULL,
variances = "equal",
covariances = "zero",
classes = 1L,
run = TRUE,
...
)

## Arguments

data The data.frame to be used for model fitting. Character vector. Specifies which variance components to estimate. Defaults to "equal" (constrain variances across classes); the other option is "varying" (estimate variances freely across classes). Each element of this vector refers to one of the models you wish to run. Character vector. Specifies which covariance components to estimate. Defaults to "zero" (covariances constrained to zero; this corresponds to an assumption of conditional independence of the indicators); other options are "equal" (covariances between items constrained to be equal across classes), and "varying" (free covariances across classes). A vector of integers, indicating which class solutions to generate. Defaults to 1L. E.g., classes = 1:6, classes = c(1:4, 6:8). Logical, whether or not to run the model. If run = TRUE, the function calls mixture_starts and run_mx. Additional arguments, passed to functions.

## Value

Returns an mxModel.

## Examples

if (FALSE) {
data("empathy")
df <- empathy[1:6]
mx_profiles(data = df,
classes = 2) -> res
}