The $r$-value: evaluating stability with respect to distributional shifts