modified Misc/nplcm_fit for openBUGS