ddtlcm0.2.1 package

Latent Class Analysis with Dirichlet Diffusion Tree Process Prior

a_t_one

Compute divergence function

a_t_two

Compute divergence function

add_leaf_branch

Add a leaf branch to an existing tree tree_old

add_multichotomous_tip

Add a leaf branch to an existing tree tree_old to make a multichotomus...

add_one_sample

Functions to simulate trees and node parameters from a DDT process. Ad...

add_root

Add a singular root node to an existing nonsingular tree

attach_subtree

Attach a subtree to a given DDT at a randomly selected location

compute_IC

Compute information criteria for the DDT-LCM model

create_leaf_cor_matrix

Create a tree-structured covariance matrix from a given tree

ddtlcm-package

ddtlcm: Latent Class Analysis with Dirichlet Diffusion Tree Process Pr...

ddtlcm_fit

MH-within-Gibbs sampler to sample from the full posterior distribution...

div_time

Sample divergence time on an edge uv previously traversed by m(v) data...

draw_mnorm

Efficiently sample multivariate normal using precision matrix from $x ...

exp_normalize

Compute normalized probabilities: exp(x_i) / sum_j exp(x_j)

expit

The expit function

H_n

Harmonic series

initialize

Initialize the MH-within-Gibbs algorithm for DDT-LCM

initialize_hclust

Estimate an initial binary tree on latent classes using hclust()

initialize_poLCA

Estimate an initial response profile from latent class model using poL...

initialize_randomLCM

Provide a random initial response profile based on latent class mode

J_n

Compute factor in the exponent of the divergence time distribution

log_expit

Numerically accurately compute f(x) = log(x / (1/x)).

logit

The logistic function

logllk_ddt

Calculate loglikelihood of a DDT, including the tree structure and nod...

logllk_ddt_lcm

Calculate loglikelihood of the DDT-LCM

logllk_div_time_one

Compute loglikelihood of divergence times for a(t) = c/(1-t)

logllk_div_time_two

Compute loglikelihood of divergence times for a(t) = c/(1-t)^2

logllk_lcm

Calculate loglikelihood of the latent class model, conditional on tree...

logllk_location

Compute log likelihood of parameters

logllk_tree_topology

Compute loglikelihood of the tree topology

plot.ddt_lcm

Create trace plots of DDT-LCM parameters

plot.summary.ddt_lcm

Plot the MAP tree and class profiles of summarized DDT-LCM results

plot_tree_with_barplot

Plot the MAP tree and class profiles (bar plot) of summarized DDT-LCM ...

plot_tree_with_heatmap

Plot the MAP tree and class profiles (heatmap) of summarized DDT-LCM r...

predict.ddt_lcm

Prediction of class memberships from posterior predictive distribution...

predict.summary.ddt_lcm

Prediction of class memberships from posterior summaries

print.ddt_lcm

Print out setup of a ddt_lcm model

print.summary.ddt_lcm

Print out summary of a ddt_lcm model

proposal_log_prob

Calculate proposal likelihood

quiet

Suppress print from cat()

random_detach_subtree

Metropolis-Hasting algorithm for sampling tree topology and branch len...

reattach_point

Attach a subtree to a given DDT at a randomly selected location

sample_c_one

Sample divergence function parameter c for a(t) = c / (1-t) through Gi...

sample_c_two

Sample divergence function parameter c for a(t) = c / (1-t)^2 through ...

sample_class_assignment

Sample individual class assignments Z_i, i = 1, ..., N

sample_leaf_locations_pg

Sample the leaf locations and Polya-Gamma auxilliary variables

sample_sigmasq

Sample item group-specific variances through Gibbs sampler

sample_tree_topology

Sample a new tree topology using Metropolis-Hastings through randomly ...

simulate_DDT_tree

Simulate a tree from a DDT process. Only the tree topology and branch ...

simulate_lcm_given_tree

Simulate multivariate binary responses from a latent class model given...

simulate_lcm_response

Simulate multivariate binary responses from a latent class model

simulate_parameter_on_tree

Simulate node parameters along a given tree.

summary.ddt_lcm

Summarize the output of a ddt_lcm model

WAIC

Compute WAIC

Implements a Bayesian algorithm for overcoming weak separation in Bayesian latent class analysis. Reference: Li et al. (2023) <arXiv:2306.04700>.

  • Maintainer: Mengbing Li
  • License: MIT + file LICENSE
  • Last published: 2024-04-04