How to debug data analysis?
Here is a suggestion:


Code your analysis in such a way that it can be run on sub-samples.
Code a complementary routine which can sample, either randomly, or by time, or by region, or ...  This may be domain-specific. This is where your knowledge enters.
Combine the two and see if the results are stable across subsamples.