Stata's procedure nlcom is a powerful implementation of the delta method, which approximates the expectation of some function of a random variable