Analysis code for EDRMH