| lpa | R Documentation |
Fits a single-level latent profile model: a finite mixture of multivariate
normal distributions, in which each observation belongs to one of
n_profiles unobserved profiles and each profile has its own mean on every
indicator. It is the model multilpa() fits with id = NULL, and it
returns the same object, so every accessor, plot and inference verb of the
package applies to it.
lpa(data, vars, n_profiles, ...)
data |
A data frame with one row per observation. |
vars |
Names of the indicator columns. Numeric columns are continuous
indicators; name categorical ones in |
n_profiles |
Number of profiles, a positive whole number. |
... |
Further arguments for |
For observations nested in groups (students in schools, occasions in
persons), use multilpa() with the grouping column as id, which adds
latent classes of groups above the profiles.
A fitted multilpa object, as multilpa() returns.
latents_bad_argument when id or n_group_classes is passed; the
conditions multilpa() raises otherwise.
Oberski, D. (2016). Mixture models: Latent profile and latent class analysis. In J. Robertson & M. Kaptein (Eds.), Modern Statistical Methods for HCI (pp. 275–287). Springer.
lca() for categorical indicators; multilpa() for the two-level
model; enumerate_lpa() to compare numbers of profiles.
fit <- lpa(srl, c("cognitive_strategies", "intrinsic_value",
"self_efficacy", "self_regulation", "test_anxiety"),
n_profiles = 2, variance_model = "equal",
covariance_model = "full", n_starts = 3, seed = 1)
fit
plot(fit, what = "raincloud")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.