  Traditional applications of latent class models (LCMs) often focus on
scenarios where a set of unobserved classes are well-defined and easily
distinguishable. However, in numerous real-world applications, these classes
are weakly separated and difficult to distinguish, creating significant
numerical challenges. To address these issues, we have developed an R package
ddtlcm that provides comprehensive analysis and visualization tools designed to
enhance the robustness and interpretability of LCMs in the presence of weak
class separation, particularly useful for small sample sizes. This package
implements a tree-regularized Bayesian LCM that leverages statistical strength
between latent classes to make better estimates using limited data. A Shiny app
has also been developed to improve user interactivity. In this paper, we
showcase a typical analysis pipeline with simulated data using ddtlcm. All
software has been made publicly available on CRAN and GitHub.
