plot.summary.ddt_lcm {ddtlcm}R Documentation

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

Description

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

Usage

## S3 method for class 'summary.ddt_lcm'
plot(
  x,
  log = TRUE,
  plot_option = c("all", "profile", "tree"),
  item_name_list = NULL,
  color_palette = c("#E69F00", "#56B4E9", "#009E73", "#000000", "#0072B2", "#D55E00",
    "#CC79A7", "#F0E442", "#999999"),
  ...
)

Arguments

x

a "summary.ddt_lcm" object

log

Default argument passed to plot(). Not used.

plot_option

option to select which part of the plot to return. If "all", return the plot of MAP tree on the left and the plot of class profiles on the right. If "profile", only return the plot of class profiles. If "tree", only return the plot of MAP tree.

item_name_list

a named list of G elements, where the g-th element contains a vector of item names for items in item_membership_list[[g]]. The name of the g-th element is the name of the major item group.

color_palette

a vector of color names. Default is a color-blinded friendly palette.

...

Further arguments passed to each method

Value

a ggplot2 object. If plot_option is "all", then a plot with maximum a posterior tree structure on the left and a bar plot of item response probabilities (with 95% credible intervals and class probabilities) on the right. If plot_option is "profile", then only a bar plot of item response probabilities. If plot_option is "tree", then only a plot of the tree structure.

Examples

data(result_diet_1000iters)
burnin <- 500
summarized_result <- summary(result_diet_1000iters, burnin, relabel = TRUE, be_quiet = TRUE)
plot(x = summarized_result, item_name_list = NULL, plot_option = "all")

[Package ddtlcm version 0.2.1 Index]