View source: R/plot_functions.R
plot.summary.ddt_lcm | R Documentation |
Plot the MAP tree and class profiles of summarized DDT-LCM results
## 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"),
...
)
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 |
color_palette |
a vector of color names. Default is a color-blinded friendly palette. |
... |
Further arguments passed to each method |
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.
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.