Package: LCPA 1.0.2

LCPA: A General Framework for Latent Classify and Profile Analysis

A unified latent class modeling framework that encompasses both latent class analysis (LCA) and latent profile analysis (LPA), offering a one-stop solution for latent class modeling. It implements state-of-the-art parameter estimation methods, including the expectation–maximization (EM) algorithm, neural network estimation (NNE; requires users to have 'Python' and its dependent libraries installed on their computer), and integration with 'Mplus' (requires users to have 'Mplus' installed on their computer). In addition, it provides commonly used model fit indices such as the Akaike information criterion (AIC) and Bayesian information criterion (BIC), as well as classification accuracy measures such as entropy. The package also includes fully functional likelihood ratio tests (LRT) and bootstrap likelihood ratio tests (BLRT) to facilitate model comparison, along with bootstrap-based and observed information matrix-based standard error estimation. Furthermore, it supports the standard three-step approach for LCA, LPA, and latent transition analysis (LTA) with covariates, enabling detailed covariate analysis. Finally, it includes several user-friendly auxiliary functions to enhance interactive usability.

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

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

# 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.48 score 1 stars 520 downloads 35 exports 68 dependencies

Last updated from:ed93c5f74b. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK243
linux-devel-x86_64OK231
source / vignettesOK265
linux-release-arm64OK240
linux-release-x86_64OK206
macos-release-arm64OK146
macos-release-x86_64OK311
macos-oldrel-arm64OK121
macos-oldrel-x86_64OK440
windows-develOK166
windows-releaseOK162
windows-oldrelOK178
wasm-releaseOK167

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.LCALCALCPAlogitLPALRT.testLRT.test.BootstrapLRT.test.VLMRLTAnormalizeplotResponserdirichletsim.correlationsim.LCAsim.LPAsim.LTA

Dependencies:askpassbackportsbootcheckmatecliclueclustercodacpp11curldata.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
Fit Latent Class Analysis ModelsLCA
Latent Class/Profile Analysis with CovariatesLCPA
Compute the Logistic (Sigmoid) Functionlogit
Fit Latent Profile AnalysisLPA
Likelihood Ratio TestLRT.test
Bootstrap Likelihood Ratio Test for Latent Class/Profile ModelsLRT.test.Bootstrap
Lo-Mendell-Rubin likelihood ratio testLRT.test.VLMR
Latent Transition Analysis (LTA)LTA
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