Modified calculation of R. Not yet verified