We also provide tools for assessing goodness of fit.
Graphical assessment can be performed comparing various representations of the estimated distributions against representations of the empirical distribution (GOFplot).
Such plots may be obtained from a fitted object using the command GOFplots(fit, qq_plot = TRUE).
The density plot provides a familiar representation of the Nonparametric distribution, while the CDF plot is probably the most classical visualisation of goodness of fit.
The percentile-percentile plot focuses on the goodness of fit in the center of the distribution, while the quantile-quantile plot focuses on the goodness of fit in the tails of the distribution.
The density, CDF, percentile and quantiles used in the plots are the expected posterior quantities, computed from the MCMC sample.
Computation of the theoretical quantiles is a fairly expensive operation because it requires numerically inverting the CDF.
We choose not to compute the quantile-quantile plot by default, and when we do, the computation is done on a thinned MCMC chain with an argument provided to control the level of thinning.
<FIGURE>
<FIGURE>
figureGraphical goodness of fit plots for censored (right) and non censored data (left).
The top row is the mean density estimate with a histogram for the non censored data.
The middle row is the estimated CDF with the empirical CDF for non censored data, and with the Turnbull estimate of the CDF for censored data.
The bottom row are percentile-percentile plots where the empirical percentiles are computed from the empirical CDF for the non censored data, and from the Turnbull estimate for the censored data.

We also provide tools for model comparison based on expected predictive density.
The cpo is the expected predictive density of a data point given the prior and all other data points, so it is the leave-one-out expected predictive density of the model [1]}, a typical cross-validation criterion.
As such, it is a measure of predictive power with a penalisation for over-fitting.
A Monte Carlo approximation of the cpo is easily available and can be used to compare a semi-parametric model to the fully nonparametric model for instance:
