0

My question is about how to implement the nested Dirichlet process (NDP) with R code.

The NDP is suitable for clustering over distributions and simultaneously clustering within a distribution. Rodriguez et al. (2008) provided a simulation example to demontrate the ability of the NDP to distinguish different distributions. I am trying to learn this approach by reproducing the results for this example. But failed to do so because I cannot understand well how the base distribution is related to the mixture components.

The simulation example used a normal inverse-gamma distributioin, NIG(0,0.01,3,1), as the base distribution. But the four different distributions are:

The four distributions used for simulation

The algorithm provided in Section 4 (Rodriguez et al.,2008, p.1135) was used to do the simulation. I have problem to understand and execute this algorithm, especially step 5:

step 5 of the NDP sampling algorithm

Can you please provide a sample code to demonstrate this algorithm? Your help is highly appreciated!

Has QUIT--Anony-Mousse
  • 76,138
  • 12
  • 138
  • 194
Y.Zhou
  • 21
  • 2
  • 2
    Welcome! Stack Overflow is a question and answer forum, not a free code writing service. If you'd like help with this question, please edit your question to show what code you've already tried and ask a specific question if you are stuck on a certain step or error message. See [how to make a great R reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) – Jan Boyer Jun 04 '18 at 18:02
  • Sure! Still working on it. Will edit the question soon. – Y.Zhou Jun 04 '18 at 19:29
  • Do you have sample code for this paper now? – Spaceship222 May 22 '20 at 09:31

1 Answers1

1

I have not be able to do the coding by myself but I have found a recent paper which does the simulation using exact inference instead of truncation approximation. I think it might help someone else who has interest just like me, so I post the link to that paper here.

enter link description here

The good thing I like about this paper is that it is well written and has source code (in R) for me to understand this methodology better.

Y.Zhou
  • 21
  • 2