calculate offset regression