BNPdensity (version 2019.9.11)

plot_clustering_and_CDF: Plot the clustering and the Cumulative Distribution Function

Description

This is a function to visualise the clustering induced by the BNP model. The data points are plotted with a color reflecting their cluster.

Usage

plot_clustering_and_CDF(fit, clustering, label_vector = NULL)

Arguments

fit

The fitted object, obtained from one of the MixNRMIx functions

clustering

A vector of integers with the same length as the data, representing the allocation variable for data each point.

label_vector

A vector of data labels to be plotted, to provide some identification to each point.

Value

A plot of the Cumulative Distribution Function (or Turnbull estimate for censored data) with data points whose colour denotes the cluster allocation. For censored data, right or left censored data points are not represented, while interval censored data points are represented at the middle of the censoring interval.