Latent Class Analysis with Dirichlet Diffusion Tree Process Prior
Compute divergence function
Compute divergence function
Add a leaf branch to an existing tree tree_old
Add a leaf branch to an existing tree tree_old to make a multichotomus...
Functions to simulate trees and node parameters from a DDT process. Ad...
Add a singular root node to an existing nonsingular tree
Attach a subtree to a given DDT at a randomly selected location
Compute information criteria for the DDT-LCM model
Create a tree-structured covariance matrix from a given tree
ddtlcm: Latent Class Analysis with Dirichlet Diffusion Tree Process Pr...
MH-within-Gibbs sampler to sample from the full posterior distribution...
Sample divergence time on an edge uv previously traversed by m(v) data...
Efficiently sample multivariate normal using precision matrix from $x ...
Compute normalized probabilities: exp(x_i) / sum_j exp(x_j)
The expit function
Harmonic series
Initialize the MH-within-Gibbs algorithm for DDT-LCM
Estimate an initial binary tree on latent classes using hclust()
Estimate an initial response profile from latent class model using poL...
Provide a random initial response profile based on latent class mode
Compute factor in the exponent of the divergence time distribution
Numerically accurately compute f(x) = log(x / (1/x)).
The logistic function
Calculate loglikelihood of a DDT, including the tree structure and nod...
Calculate loglikelihood of the DDT-LCM
Compute loglikelihood of divergence times for a(t) = c/(1-t)
Compute loglikelihood of divergence times for a(t) = c/(1-t)^2
Calculate loglikelihood of the latent class model, conditional on tree...
Compute log likelihood of parameters
Compute loglikelihood of the tree topology
Create trace plots of DDT-LCM parameters
Plot the MAP tree and class profiles of summarized DDT-LCM results
Plot the MAP tree and class profiles (bar plot) of summarized DDT-LCM ...
Plot the MAP tree and class profiles (heatmap) of summarized DDT-LCM r...
Prediction of class memberships from posterior predictive distribution...
Prediction of class memberships from posterior summaries
Print out setup of a ddt_lcm model
Print out summary of a ddt_lcm model
Calculate proposal likelihood
Suppress print from cat()
Metropolis-Hasting algorithm for sampling tree topology and branch len...
Attach a subtree to a given DDT at a randomly selected location
Sample divergence function parameter c for a(t) = c / (1-t) through Gi...
Sample divergence function parameter c for a(t) = c / (1-t)^2 through ...
Sample individual class assignments Z_i, i = 1, ..., N
Sample the leaf locations and Polya-Gamma auxilliary variables
Sample item group-specific variances through Gibbs sampler
Sample a new tree topology using Metropolis-Hastings through randomly ...
Simulate a tree from a DDT process. Only the tree topology and branch ...
Simulate multivariate binary responses from a latent class model given...
Simulate multivariate binary responses from a latent class model
Simulate node parameters along a given tree.
Summarize the output of a ddt_lcm model
Compute WAIC
Implements a Bayesian algorithm for overcoming weak separation in Bayesian latent class analysis. Reference: Li et al. (2023) <arXiv:2306.04700>.