Custom Functions for Specifying Nonlinear Terms to gnm