Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

compare_solutions

Compare latent profile models


Description

Takes an object of class 'tidyLPA', containing multiple latent profile models with different number of classes or model specifications, and helps select the optimal number of classes and model specification.

Usage

compare_solutions(x, statistics = "BIC")

Arguments

x

An object of class 'tidyLPA'.

statistics

Character vector. Which statistics to examine for determining the optimal model. Defaults to 'BIC'.

Value

An object of class 'bestLPA' and 'list', containing a tibble of fits 'fits', a named vector 'best', indicating which model fit best according to each fit index, a numeric vector 'AHP' indicating the best model according to the AHP, an object 'plot' of class 'ggplot', and a numeric vector 'statistics' corresponding to argument of the same name.

Author(s)

Caspar J. van Lissa

Examples

iris_subset <- sample(nrow(iris), 20) # so examples execute quickly
results <- iris %>%
  subset(select = c("Sepal.Length", "Sepal.Width",
    "Petal.Length", "Petal.Width")) %>%
  estimate_profiles(1:3) %>%
  compare_solutions()

tidyLPA

Easily Carry Out Latent Profile Analysis (LPA) Using Open-Source or Commercial Software

v1.0.8
MIT + file LICENSE
Authors
Joshua M Rosenberg [aut, cre], Caspar van Lissa [aut], Jennifer A Schmidt [ctb], Patrick N Beymer [ctb], Daniel Anderson [ctb], Matthew J. Schell [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.