Suppose there are some survival data and we want to fit a distribution on them using Bayesian semiparametric approach. Dirichlet process prior is useful in this method. after computing conditional posterior distribution for all unknown parameters I want to simulating data from dirichlet process using Gibbs sampler method. now how can I do these?