Earnings functions and nonpecuniary benefits