Theory and Computational Methods for Nonlinear Mixed-Effects Models