plot_tree_with_heatmap {ddtlcm} | R Documentation |
Plot the MAP tree and class profiles (heatmap) of summarized DDT-LCM results
Description
Plot the MAP tree and class profiles (heatmap) of summarized DDT-LCM results
Usage
plot_tree_with_heatmap(
tree_with_parameter,
response_prob,
item_membership_list
)
Arguments
tree_with_parameter |
a "phylo4d" tree with node parameters |
response_prob |
a K by J matrix, where the k,j-th element is the response probability of item j for individuals in class k |
item_membership_list |
a list of G elements, where the g-th element contains the column indices of the observed data matrix corresponding to items in major group g |
Value
a ggplot2 object. A plot with the tree structure on the left and a heatmap of item response probabilities on the right, with indication of item group memberships beneath the heatmap.
Examples
# load the MAP tree structure obtained from the real HCHS/SOL data
data(data_synthetic)
# extract elements into the global environment
list2env(setNames(data_synthetic, names(data_synthetic)), envir = globalenv())
plot_tree_with_heatmap(tree_with_parameter, response_prob, item_membership_list)
[Package ddtlcm version 0.2.1 Index]