Adapted from Milliman et al. (1989).