R Under development (unstable) (2025-12-21 r89216 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > # # library(tidyLPA) > # # data(empathy) > # # response <- as.matrix(empathy[, 1:6]) > # > # library(LCPA) > # N <- 500 > # I <- 6 > # L <- 4 > # constraint = "VV" > # method = "EM" > # > # # data.obj <- sim.LCA(N = N, I = I, L = L, IQ=0.9) > # # response <- data.obj$response > # # object0 <- LCA(response, L = L-1, method = method, nrep = 1) > # # object1 <- LCA(response, L = L, method = method, nrep = 1) > # # object2 <- LCA(response, L = L+1, method = method, nrep = 10) > # > # data.obj <- sim.LPA(N = N, I = I, L = L, constraint = constraint) > # response <- data.obj$response > # object0 <- LPA(response, L = L-1, par.ini = "random", constraint = constraint, method = method) > # object1 <- LPA(response, L = L, par.ini = "random", constraint = constraint, method = method) > # object2 <- LPA(response, L = L+1, par.ini = "random", constraint = constraint, method = method) > # > # LRT.test(object0, object1) > # LRT.test.VLMR(object0, object1) > # > # LRT.test(object1, object2) > # LRT.test.VLMR(object1, object2) > # LRT.test.Bootstrap(object1, object2, 100) > > proc.time() user system elapsed 0.12 0.04 0.15