function factory( alpha, beta ) {
	if (
		isnan( alpha ) ||
		isnan( beta ) ||
		alpha < 0.0 ||
		beta <= 0.0
	) {
		return constantFunction( NaN );
	}
	return mgf;

	/**
	* Evaluates the moment-generating function (MGF) of a gamma distribution.
	*
	* @private
	* @param {number} t - input value
	* @returns {number} evaluated MGF
	*
	* @example
	* var y = mgf( 0.5 );
	* // returns <number>
	*/
	function mgf( t ) {
		var base;
		if ( t >= beta ) {
			return NaN;
		}
		base = 1.0 - (t / beta);
		return pow( base, -alpha );
	}
}
Returns a function for evaluating the moment-generating function (MGF) of a gamma distribution with shape `alpha` and rate `beta`.

@param {NonNegativeNumber} alpha - shape parameter
@param {PositiveNumber} beta - rate parameter
@returns {Function} MGF

@example
var mgf = factory( 3.0, 1.5 );

var y = mgf( 1.0 );
// returns ~27.0

y = mgf( 0.5 );
// returns ~3.375