Fixed max shift credibility code / R - usage also changed, see demo scrip