function incrmsummary( W ) {
	var mvariance;
	var mmidrange;
	var summary;
	var mrange;
	var mstdev;
	var mmean;
	var msum;
	var mmax;
	var mmin;
	if ( !isPositiveInteger( W ) ) {
		throw new TypeError( format( 'invalid argument. Must provide a positive integer. Value: `%s`.', W ) );
	}
	mvariance = incrmvariance( W );
	mmidrange = incrmmidrange( W );
	mrange = incrmrange( W );
	mstdev = incrmstdev( W );
	mmean = incrmmean( W );
	msum = incrmsum( W );
	mmin = incrmmin( W );
	mmax = incrmmax( W );
	summary = {};

	return accumulator;

	/**
	* If provided a value, the accumulator function returns an updated summary. If not provided a value, the accumulator function returns the current summary.
	*
	* @private
	* @param {number} [x] - new value
	* @returns {Object} summary
	*/
	function accumulator( x ) {
		if ( arguments.length === 0 ) {
			return summary;
		}
		summary.window = W;
		summary.sum = msum( x );
		summary.mean = mmean( x );
		summary.variance = mvariance( x );
		summary.stdev = mstdev( x );
		summary.min = mmin( x );
		summary.max = mmax( x );
		summary.range = mrange( x );
		summary.midrange = mmidrange( x );
		return summary;
	}
}
Returns an accumulator function which incrementally computes a moving statistical summary.

@param {PositiveInteger} W - window size
@throws {TypeError} must provide a positive integer
@returns {Function} accumulator function

@example
var accumulator = incrmsummary( 3 );

var summary = accumulator();
// returns {}

summary = accumulator( 2.0 );
// returns {...}

summary = accumulator( -5.0 );
// returns {...}

summary = accumulator();
// returns {...}