Skip to contents

Plot a longitudinal consensus clustering


# S3 method for lcc
plot(x, color_palette = NULL, which_plots = "all", n_item_consensus = 3, ...)



lcc object (output from longitudinal_consensus_cluster)


optional character vector of colors for consensus matrix


determine which plots should be plotted; the default is "all". Alternatively, a combination of the following values can be specified to plot only some of the below mentioned plots: "consensusmatrix_legend", "consensusmatrix_x" where x is replaced by the corresponding number of clusters, "CDF", "delta", "cluster_tracking", "item_consensus" or "cluster_consensus". When you want to plot all consensus matrices and the legend, you can just use "consensusmatrix".


determines how many item consensus plots are plotted together in one plot before a new plot is used; the default is 3.


additional parameters for plotting; currently not used


Plots the following plots (when selected):

consensus matrix legendthe legend for the following consensus matrix plots (select with "consensusmatrix_legend")
consensus matrix plotfor every specified number of clusters, a heatmap of the consensus matrix and the result of the final clustering is shown (select with "consensusmatrix_x" where x is replaced by the corresponding number of clusters)
consensus CDFa line plot of the CDFs for all different specified numbers of clusters (select with "CDF")
Delta areaelbow plot of the difference in the CDFs between the different numbers of clusters (select with "delta")
tracking plotcluster assignment of the subjects throughout the different cluster solutions (select with "cluster_tracking")
item-consensusfor every item (subject), calculate the average consensus value with all items that are assigned to one consensus cluster. This is repeated for every cluster and for all different numbers of clusters (select with "item_consensus")
cluster-consensusevery bar represents the average pair-wise item-consensus within one consensus cluster (select with "cluster_consensus")