Refactored simulation for ADF z test