Package: LCPA 1.0.4

LCPA: A General Framework for Latent Class and Profile Analysis

Provides a unified framework for finite-mixture latent variable models, including latent class analysis (LCA), latent profile analysis (LPA), latent class/profile analysis with covariates, and latent transition analysis (LTA), within one consistent interface. Estimation methods include the expectation-maximization (EM) algorithm; neural network estimation, which requires 'Python' and its dependent libraries; integration with 'Mplus', which requires an installed copy of 'Mplus'; and stochastic EM (SEM) through the optional 'flexmix', 'Rmixmod', and 'RMixtComp' backends. 'flexmix' and the default 'Rmixmod' path perform configurable warm-up trajectories and promote the best candidates to full SEM replications. 'Rmixmod' additionally exposes its native strategy interface, including chained SEM-to-EM estimation, whereas 'RMixtComp' exposes its native SEM and Gibbs controls without the external warm-up stage. Model assessment includes the Akaike information criterion (AIC), Bayesian information criterion (BIC), Schwarz information criterion (SIC), consistent AIC (CAIC), approximate weight of evidence (AWE), sample-size-adjusted BIC (SABIC), entropy, and average posterior probabilities. Model-comparison procedures include the ordinary likelihood-ratio test, the Mplus TECH11 Vuong-Lo-Mendell-Rubin and adjusted Lo-Mendell-Rubin tests, and fixed-replicate or sequential parametric bootstrap likelihood-ratio tests. Standard errors can be estimated by nonparametric bootstrap, numerical observed information, or analytic observed information based on Louis' identity. Classification-error-adjusted maximum-likelihood and Bolck-Croon-Hagenaars three-step methods support covariates predicting latent membership, initial-status and transition regressions, and latent classes or states predicting continuous and categorical external observed dependent variables. Simulation, posterior-probability, classification-error, extraction, summary, plotting, model-adjustment, and update utilities are also provided for reproducible workflows.

Authors:Haijiang Qin [aut, cre, cph], Lei Guo [aut, cph]

LCPA_1.0.4.tar.gz
LCPA_1.0.4.zip(r-4.7-x86_64)LCPA_1.0.4.zip(r-4.7-arm64)LCPA_1.0.4.zip(r-4.6-x86_64)LCPA_1.0.4.zip(r-4.6-arm64)LCPA_1.0.4.zip(r-4.5-x86_64)
LCPA_1.0.4.tgz(r-4.6-x86_64)LCPA_1.0.4.tgz(r-4.6-arm64)LCPA_1.0.4.tgz(r-4.5-x86_64)LCPA_1.0.4.tgz(r-4.5-arm64)
LCPA_1.0.4.tar.gz(r-4.7-arm64)LCPA_1.0.4.tar.gz(r-4.7-x86_64)LCPA_1.0.4.tar.gz(r-4.6-arm64)LCPA_1.0.4.tar.gz(r-4.6-x86_64)
LCPA_1.0.4.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
LCPA/json (API)

# Install 'LCPA' in R:
install.packages('LCPA', repos = c('https://haijiangq.r-universe.dev', 'https://cloud.r-project.org'))
Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library

On CRAN:

Conda:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

openblascppopenmp

1.60 score 420 downloads 36 exports 69 dependencies

Last updated from:44e94bb231. Checks:15 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK255
linux-devel-x86_64OK290
source / vignettesOK477
linux-release-arm64OK249
linux-release-x86_64OK237
macos-release-arm64OK251
macos-release-x86_64OK444
macos-oldrel-arm64OK260
macos-oldrel-x86_64OK513
windows-devel-arm64OK461
windows-devel-x86_64OK272
windows-release-arm64OK463
windows-release-x86_64OK236
windows-oldrel-x86_64OK207
wasm-releaseOK177

Exports:adjust.modeladjust.responsecheck.responsecompare.modelextractget.AvePPget.CEPget.entropyget.fit.indexget.Log.Lik.LCAget.Log.Lik.LPAget.Log.Lik.LTAget.npar.LCAget.npar.LPAget.npar.LTAget.P.Z.Xn.LCAget.P.Z.Xn.LPAget.SEinstall_python_dependenciesKmeans.LCAKmeans.LPALCALCPAlogitLPALRT.testLRT.test.BootstrapLRT.test.VLMRLTAnormalizeplotResponserdirichletsim.correlationsim.LCAsim.LPAsim.LTA

Dependencies:askpassbackportsbootcheckmatecliclueclustercodaCompQuadFormcpp11curldata.tabledigestdplyrfarverfastDummiesgenericsggplot2gluegsubfngtableherehttrisobandjsonlitelabelinglatticelifecyclemagrittrMASSMatrixmimeMplusAutomationmvtnormnloptrnumDerivopensslpanderpatchworkpillarpkgconfigplyrpngprotopurrrR6rappdirsRColorBrewerRcppRcppArmadilloRcppTOMLreshape2reticulaterlangrprojrootS7scalesstringistringrsystexregtibbletidyrtidyselectutf8vctrsviridisLitewithrxtable

Readme and manuals

Help Manual

Help pageTopics
Align Latent Class/Profile Models via Optimal Permutationadjust.model
Adjust Categorical Response Data for Polytomous Indicatorsadjust.response
Validate response matrix against expected polytomous category countscheck.response
Model Comparison Toolcompare.model
S3 Methods: extractextract extract.compare.model extract.fit.index extract.LCA extract.LCPA extract.LPA extract.LTA extract.SE extract.sim.LCA extract.sim.LPA extract.sim.LTA
Calculate Average Posterior Probability (AvePP)get.AvePP
Compute Classification Error Probability (CEP) Matricesget.CEP
Calculate Classification Entropyget.entropy
Calculate Fit Indicesget.fit.index
Calculate Log-Likelihood for Latent Class Analysisget.Log.Lik.LCA
Calculate Log-Likelihood for Latent Profile Analysisget.Log.Lik.LPA
Calculate Log-Likelihood for Latent Transition Analysisget.Log.Lik.LTA
Calculate Number of Free Parameters in Latent Class Analysisget.npar.LCA
Calculate Number of Free Parameters in Latent Profile Analysisget.npar.LPA
Calculate Number of Free Parameters in Latent Transition Analysisget.npar.LTA
Compute Posterior Latent Class Probabilities Based on Fixed Parametersget.P.Z.Xn.LCA
Compute Posterior Latent Profile Probabilities Based on Fixed Parametersget.P.Z.Xn.LPA
Compute Standard Errorsget.SE
Install Required Python Dependencies for Neural Latent Variable Modelsinstall_python_dependencies
Initialize LCA Parameters via K-means ClusteringKmeans.LCA
Initialize LPA Parameters via K-means ClusteringKmeans.LPA
Fit Latent Class Analysis ModelsLCA
Three-step latent class/profile analysisLCPA
Compute the Logistic (Sigmoid) Functionlogit
Fit Latent Profile AnalysisLPA
Likelihood Ratio TestLRT.test
Bootstrap Likelihood Ratio Test for Latent Class/Profile ModelsLRT.test.Bootstrap
Vuong-Lo-Mendell-Rubin likelihood ratio testLRT.test.VLMR
Latent Transition AnalysisLTA
Column-wise Z-Score Standardizationnormalize
S3 Methods: plotplot plot.LCA plot.LPA
Visualize Response Distributions with Density PlotsplotResponse
S3 Methods: printprint print.compare.model print.fit.index print.LCA print.LCPA print.LPA print.LTA print.SE print.sim.LCA print.sim.LPA print.sim.LTA print.summary.compare.model print.summary.fit.index print.summary.LCA print.summary.LCPA print.summary.LPA print.summary.LTA print.summary.SE print.summary.sim.LCA print.summary.sim.LPA print.summary.sim.LTA
Generate Random Samples from the Dirichlet Distributionrdirichlet
Generate a Random Correlation Matrix via C-Vine Partial Correlationssim.correlation
Simulate Data for Latent Class Analysissim.LCA
Simulate Data for Latent Profile Analysissim.LPA
Simulate Data for Latent Transition Analysis (LTA)sim.LTA
S3 Methods: summarysummary summary.compare.model summary.fit.index summary.LCA summary.LCPA summary.LPA summary.LTA summary.SE summary.sim.LCA summary.sim.LPA summary.sim.LTA
S3 Methods: updateupdate update.LCA update.LCPA update.LPA update.LTA update.sim.LCA update.sim.LPA update.sim.LTA