enumerate_lpa: Compare latent profile models

View source: R/lpa.R

enumerate_lpaR Documentation

Compare latent profile models

Description

Fits single-level latent profile models with each number of profiles in n_profiles under each covariance structure in model, and returns them in one table for comparison by information criteria, entropy and the diagnostics of each fit. It is enumerate_classes() with id = NULL, and it returns the same object.

Usage

enumerate_lpa(data, vars, n_profiles = 1:4, model = "basic", ...)

Arguments

data

A data frame with one row per observation.

vars

Names of the indicator columns.

n_profiles

Positive whole numbers of profiles to compare.

model

The covariance structures: "basic", the default, for the four that combine equal or varying variances with covariances absent or present (EEI, VVI, EEE, VVV); "all" for all 14; or their three-letter codes. See enumerate_classes().

...

Further arguments for multilpa(), such as missing, n_starts, seed and categorical, except id and n_group_classes.

Details

For observations nested in groups, use enumerate_classes() with the grouping column as id, which also crosses the number of group classes.

Value

An object of class multilpa_enumeration, as enumerate_classes() returns: as.data.frame() gives one row per candidate, summary() the candidate each criterion prefers, plot() the criteria against the number of profiles, and candidate_fit() one fitted candidate.

Conditions

latents_bad_argument when id or n_group_classes is passed, or when model names an unknown structure.

References

Celeux, G., & Govaert, G. (1995). Gaussian parsimonious clustering models. Pattern Recognition, 28(5), 781–793.

See Also

lpa() to fit one model; enumerate_lca() for categorical indicators; bootstrap_lrt() to test one number of profiles against another.

Examples

models <- enumerate_lpa(srl, c("cognitive_strategies", "intrinsic_value",
                               "self_efficacy", "self_regulation",
                               "test_anxiety"),
                        n_profiles = 1:3, n_starts = 2, seed = 1)
summary(models)
plot(models)

latents documentation built on Oct. 16, 2026, 5:09 p.m.