mdrw function

Mean difference from a reference point (weighted) (MDRW)