One popular method for estimating statistical models is sampling, and in particular Gibbs sampling. As I’ve written before, sampling is based on randomness, which makes it somewhat difficult to debug. On the other hand, one popular way to ensure the quality of code is through arrays of unit tests, which are designed to test your code at a very fine-grained level (e.g. one test for each function in