diff --git a/lib/node_modules/@stdlib/stats/incr/README.md b/lib/node_modules/@stdlib/stats/incr/README.md
index b38ec15fd2ed..f4a1b58ce2c8 100644
--- a/lib/node_modules/@stdlib/stats/incr/README.md
+++ b/lib/node_modules/@stdlib/stats/incr/README.md
@@ -118,6 +118,7 @@ var incr = ns;
- [`incrnanmaxabs()`][@stdlib/stats/incr/nanmaxabs]: compute a maximum absolute value incrementally, ignoring `NaN` values.
- [`incrnanmean()`][@stdlib/stats/incr/nanmean]: compute an arithmetic mean incrementally, ignoring `NaN` values.
- [`incrnanmeanabs()`][@stdlib/stats/incr/nanmeanabs]: compute an arithmetic mean of absolute values incrementally, ignoring `NaN` values.
+- [`incrnanmmaape( window )`][@stdlib/stats/incr/nanmmaape]: compute a moving mean arctangent absolute percentage error (MAAPE) incrementally, ignoring NaN values.
- [`incrnanmstdev( window[, mean] )`][@stdlib/stats/incr/nanmstdev]: compute a moving corrected sample standard deviation incrementally, ignoring NaN values.
- [`incrnanmsum( window )`][@stdlib/stats/incr/nanmsum]: compute a moving sum incrementally, ignoring `NaN` values.
- [`incrnanskewness()`][@stdlib/stats/incr/nanskewness]: compute a corrected sample skewness incrementally, ignoring `NaN` values.
@@ -336,6 +337,8 @@ console.log( getKeys( ns ) );
[@stdlib/stats/incr/nanmeanabs]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/stats/incr/nanmeanabs
+[@stdlib/stats/incr/nanmmaape]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/stats/incr/nanmmaape
+
[@stdlib/stats/incr/nanmstdev]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/stats/incr/nanmstdev
[@stdlib/stats/incr/nanmsum]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/stats/incr/nanmsum
diff --git a/lib/node_modules/@stdlib/stats/incr/lib/index.js b/lib/node_modules/@stdlib/stats/incr/lib/index.js
index 8e95b0eca2ac..ee5756b24137 100644
--- a/lib/node_modules/@stdlib/stats/incr/lib/index.js
+++ b/lib/node_modules/@stdlib/stats/incr/lib/index.js
@@ -711,6 +711,15 @@ setReadOnly( ns, 'incrnanmean', require( '@stdlib/stats/incr/nanmean' ) );
*/
setReadOnly( ns, 'incrnanmeanabs', require( '@stdlib/stats/incr/nanmeanabs' ) );
+/**
+* @name incrnanmmaape
+* @memberof ns
+* @readonly
+* @type {Function}
+* @see {@link module:@stdlib/stats/incr/nanmmaape}
+*/
+setReadOnly( ns, 'incrnanmmaape', require( '@stdlib/stats/incr/nanmmaape' ) );
+
/**
* @name incrnanmstdev
* @memberof ns
diff --git a/lib/node_modules/@stdlib/stats/incr/nanmmaape/README.md b/lib/node_modules/@stdlib/stats/incr/nanmmaape/README.md
new file mode 100644
index 000000000000..3c641747981c
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanmmaape/README.md
@@ -0,0 +1,187 @@
+
+
+# incrmmaape
+
+> Compute a moving [mean arctangent absolute percentage error][@kim:2016a] (MAAPE) incrementally, ignoring `NaN` values.
+
+
+
+For a window of size `W`, the [mean arctangent absolute percentage error][@kim:2016a] is defined as
+
+
+
+```math
+\mathop{\mathrm{MAAPE}} = \frac{1}{W} \sum_{i=0}^{W-1} \mathop{\mathrm{arctan}}\biggl( \biggl| \frac{a_i - f_i}{a_i} \biggr| \biggr)
+```
+
+
+
+
+
+where `f_i` is the forecast value and `a_i` is the actual value.
+
+
+
+
+
+
+
+## Usage
+
+```javascript
+var incrnanmmaape = require( '@stdlib/stats/incr/nanmmaape' );
+```
+
+#### incrnanmmaape( window )
+
+Returns an accumulator `function` which incrementally computes a moving [mean arctangent absolute percentage error][@kim:2016a]. The `window` parameter defines the number of values over which to compute the moving [mean arctangent absolute percentage error][@kim:2016a].
+
+```javascript
+var accumulator = incrnanmmaape( 3 );
+```
+
+#### accumulator( \[f, a] )
+
+If provided input values `f` and `a`, the accumulator function returns an updated [mean arctangent absolute percentage error][@kim:2016a]. If not provided input values `f` and `a`, the accumulator function returns the current [mean arctangent absolute percentage error][@kim:2016a].
+
+```javascript
+var accumulator = incrnanmmaape( 3 );
+
+var m = accumulator();
+// returns null
+
+// Fill the window...
+m = accumulator( 2.0, 3.0 );
+// returns ~0.32
+
+m = accumulator( NaN, 4.0 );
+// returns ~0.32
+
+m = accumulator( 1.0, 4.0 );
+// returns ~0.48
+
+m = accumulator( 3.0, 9.0 );
+// returns ~0.52
+
+// Window begins sliding...
+m = accumulator( 7.0, 3.0 );
+// returns ~0.72
+
+m = accumulator();
+// returns ~0.72
+```
+
+
+
+
+
+
+
+## Notes
+
+- Input values are **not** type checked. If non-numeric inputs are possible, you are advised to type check and handle accordingly **before** passing the value to the accumulator function.
+- As `W` (f,a) pairs are needed to fill the window buffer, the first `W-1` returned values are calculated from smaller sample sizes. Until the window is full, each returned value is calculated from all provided values.
+- Note that, unlike the [mean absolute percentage error][@stdlib/stats/incr/mape] (MAPE), the [mean arctangent absolute percentage error][@kim:2016a] is expressed in radians on the interval \[0,π/2].
+
+
+
+
+
+
+
+## Examples
+
+
+
+```javascript
+var randu = require( '@stdlib/random/base/randu' );
+var incrnanmmaape = require( '@stdlib/stats/incr/nanmmaape' );
+
+var accumulator;
+var v1;
+var v2;
+var i;
+
+// Initialize an accumulator:
+accumulator = incrnanmmaape( 5 );
+
+// For each simulated datum, update the moving mean arctangent absolute percentage error...
+for ( i = 0; i < 100; i++ ) {
+ if ( randu() < 0.2 ) {
+ v1 = NaN;
+ } else {
+ v1 = ( randu()*100.0 ) + 50.0;
+ }
+ if ( randu() < 0.2 ) {
+ v2 = NaN;
+ } else {
+ v2 = ( randu()*100.0 ) + 50.0;
+ }
+ accumulator( v1, v2 );
+}
+console.log( accumulator() );
+```
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+[@kim:2016a]: https://www.sciencedirect.com/science/article/pii/S0169207016000121
+
+[@stdlib/stats/incr/mape]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/stats/incr/mape
+
+
+
+
+[@stdlib/stats/incr/mmaape]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/stats/incr/mmaape
+
+
+
+
+
+
diff --git a/lib/node_modules/@stdlib/stats/incr/nanmmaape/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/incr/nanmmaape/benchmark/benchmark.js
new file mode 100644
index 000000000000..77062ec0212d
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanmmaape/benchmark/benchmark.js
@@ -0,0 +1,69 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2018 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var bench = require( '@stdlib/bench' );
+var randu = require( '@stdlib/random/base/randu' );
+var pkg = require( './../package.json' ).name;
+var incrmmaape = require( './../lib' );
+
+
+// MAIN //
+
+bench( pkg, function benchmark( b ) {
+ var f;
+ var i;
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ f = incrmmaape( (i%5)+1 );
+ if ( typeof f !== 'function' ) {
+ b.fail( 'should return a function' );
+ }
+ }
+ b.toc();
+ if ( typeof f !== 'function' ) {
+ b.fail( 'should return a function' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+});
+
+bench( pkg+'::accumulator', function benchmark( b ) {
+ var acc;
+ var v;
+ var i;
+
+ acc = incrmmaape( 5 );
+
+ b.tic();
+ for ( i = 0; i < b.iterations; i++ ) {
+ v = acc( randu()+0.5, randu()+0.5 );
+ if ( v !== v ) {
+ b.fail( 'should not return NaN' );
+ }
+ }
+ b.toc();
+ if ( v !== v ) {
+ b.fail( 'should not return NaN' );
+ }
+ b.pass( 'benchmark finished' );
+ b.end();
+});
diff --git a/lib/node_modules/@stdlib/stats/incr/nanmmaape/docs/img/equation_mean_arctangent_absolute_percentage_error.svg b/lib/node_modules/@stdlib/stats/incr/nanmmaape/docs/img/equation_mean_arctangent_absolute_percentage_error.svg
new file mode 100644
index 000000000000..c4129c1be11f
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanmmaape/docs/img/equation_mean_arctangent_absolute_percentage_error.svg
@@ -0,0 +1,103 @@
+
\ No newline at end of file
diff --git a/lib/node_modules/@stdlib/stats/incr/nanmmaape/docs/repl.txt b/lib/node_modules/@stdlib/stats/incr/nanmmaape/docs/repl.txt
new file mode 100644
index 000000000000..f53bc10ea5bb
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanmmaape/docs/repl.txt
@@ -0,0 +1,51 @@
+
+{{alias}}( W )
+ Returns an accumulator function which incrementally computes a moving
+ mean arctangent absolute percentage error (MAAPE), ignoring `NaN` values.
+
+ The `W` parameter defines the number of values over which to compute the
+ moving mean arctangent absolute percentage error.
+
+ If provided input values, the accumulator function returns an updated moving
+ mean arctangent absolute percentage error. If not provided input values, the
+ accumulator function returns the current moving mean arctangent absolute
+ percentage error.
+
+ Note that, unlike the mean absolute percentage error (MAPE), the mean
+ arctangent absolute percentage error is expressed in radians on the interval
+ [0,π/2].
+
+ As `W` (f,a) pairs are needed to fill the window buffer, the first `W-1`
+ returned values are calculated from smaller sample sizes. Until the window
+ is full, each returned value is calculated from all provided values.
+
+ Input values which are `NaN` are ignored and do not affect the accumulated
+ result.
+
+ Parameters
+ ----------
+ W: integer
+ Window size.
+
+ Returns
+ -------
+ acc: Function
+ Accumulator function.
+
+ Examples
+ --------
+ > var accumulator = {{alias}}( 3 );
+ > var m = accumulator()
+ null
+ > m = accumulator( 2.0, 3.0 )
+ ~0.32
+ > m = accumulator( NaN, 3.0 )
+ ~0.32
+ > m = accumulator( 5.0, 2.0 )
+ ~0.65
+ > m = accumulator()
+ ~0.65
+
+ See Also
+ --------
+
diff --git a/lib/node_modules/@stdlib/stats/incr/nanmmaape/docs/types/index.d.ts b/lib/node_modules/@stdlib/stats/incr/nanmmaape/docs/types/index.d.ts
new file mode 100644
index 000000000000..0cbc7f36316d
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanmmaape/docs/types/index.d.ts
@@ -0,0 +1,73 @@
+/*
+* @license Apache-2.0
+*
+* Copyright (c) 2020 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+// TypeScript Version: 4.1
+
+///
+
+/**
+* If provided input values, the accumulator function returns an updated mean arctangent absolute percentage error; otherwise, returns the current mean arctangent absolute percentage error.
+*
+* ## Notes
+*
+* - Note that, unlike the mean absolute percentage error (MAPE), the mean arctangent absolute percentage error is expressed in radians on the interval [0,π/2].
+* - If provided `NaN` values, the accumulator ignores the values.
+*
+* @param f - input value
+* @param a - input value
+* @returns mean arctangent absolute percentage error or null
+*/
+type accumulator = ( f?: number, a?: number ) => number | null;
+
+/**
+* Returns an accumulator function which incrementally computes a moving mean arctangent absolute percentage error, ignoring `NaN` values.
+*
+* ## Notes
+*
+* - The `W` parameter defines the number of values over which to compute the moving mean arctangent absolute percentage error.
+* - As `W` (f,a) pairs are needed to fill the window buffer, the first `W-1` returned values are calculated from smaller sample sizes. Until the window is full, each returned value is calculated from all provided values.
+* - Input values which are `NaN` are ignored and do not affect the accumulated result.
+*
+* @param W - window size
+* @throws must provide a positive integer
+* @returns accumulator function
+*
+* @example
+* var accumulator = incrnanmmaape( 3 );
+*
+* var m = accumulator();
+* // returns null
+*
+* m = accumulator( 2.0, 3.0 );
+* // returns ~0.32
+*
+* m = accumulator( NaN, 3.0 );
+* // returns ~0.32
+*
+* m = accumulator( 5.0, 2.0 );
+* // returns ~0.65
+*
+* m = accumulator();
+* // returns ~0.65
+*/
+declare function incrnanmmaape( W: number ): accumulator;
+
+
+// EXPORTS //
+
+export = incrnanmmaape;
diff --git a/lib/node_modules/@stdlib/stats/incr/nanmmaape/docs/types/test.ts b/lib/node_modules/@stdlib/stats/incr/nanmmaape/docs/types/test.ts
new file mode 100644
index 000000000000..d61c80bf8a11
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanmmaape/docs/types/test.ts
@@ -0,0 +1,74 @@
+/*
+* @license Apache-2.0
+*
+* Copyright (c) 2020 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+import incrnanmmaape = require( './index' );
+
+
+// TESTS //
+
+// The function returns an accumulator function...
+{
+ incrnanmmaape( 3 ); // $ExpectType accumulator
+}
+
+// The compiler throws an error if the function is provided an argument that is not a number...
+{
+ incrnanmmaape( '5' ); // $ExpectError
+ incrnanmmaape( true ); // $ExpectError
+ incrnanmmaape( false ); // $ExpectError
+ incrnanmmaape( null ); // $ExpectError
+ incrnanmmaape( undefined ); // $ExpectError
+ incrnanmmaape( [] ); // $ExpectError
+ incrnanmmaape( {} ); // $ExpectError
+ incrnanmmaape( ( x: number ): number => x ); // $ExpectError
+}
+
+// The compiler throws an error if the function is provided an invalid number of arguments...
+{
+ incrnanmmaape(); // $ExpectError
+ incrnanmmaape( 2, 3 ); // $ExpectError
+}
+
+// The function returns an accumulator function which returns an accumulated result...
+{
+ const acc = incrnanmmaape( 3 );
+
+ acc(); // $ExpectType number | null
+ acc( 3.14, 2.0 ); // $ExpectType number | null
+}
+
+// The compiler throws an error if the returned accumulator function is provided invalid arguments...
+{
+ const acc = incrnanmmaape( 3 );
+
+ acc( '5', 2.0 ); // $ExpectError
+ acc( true, 2.0 ); // $ExpectError
+ acc( false, 2.0 ); // $ExpectError
+ acc( null, 2.0 ); // $ExpectError
+ acc( [], 2.0 ); // $ExpectError
+ acc( {}, 2.0 ); // $ExpectError
+ acc( ( x: number ): number => x, 2.0 ); // $ExpectError
+
+ acc( 3.14, '5' ); // $ExpectError
+ acc( 3.14, true ); // $ExpectError
+ acc( 3.14, false ); // $ExpectError
+ acc( 3.14, null ); // $ExpectError
+ acc( 3.14, [] ); // $ExpectError
+ acc( 3.14, {} ); // $ExpectError
+ acc( 3.14, ( x: number ): number => x ); // $ExpectError
+}
diff --git a/lib/node_modules/@stdlib/stats/incr/nanmmaape/examples/index.js b/lib/node_modules/@stdlib/stats/incr/nanmmaape/examples/index.js
new file mode 100644
index 000000000000..a026f1337d1e
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanmmaape/examples/index.js
@@ -0,0 +1,48 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2020 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+var randu = require( '@stdlib/random/base/randu' );
+var incrnanmmaape = require( './../lib' );
+
+var accumulator;
+var err;
+var v1;
+var v2;
+var i;
+
+// Initialize an accumulator:
+accumulator = incrnanmmaape( 5 );
+
+// For each simulated datum, update the moving mean arctangent absolute percentage error...
+console.log( '\nValue\tValue\tMAAPE\n' );
+for ( i = 0; i < 100; i++ ) {
+ if ( randu() < 0.2 ) {
+ v1 = NaN;
+ } else {
+ v1 = ( randu()*100.0 ) + 50.0;
+ }
+ if ( randu() < 0.2 ) {
+ v2 = NaN;
+ } else {
+ v2 = ( randu()*100.0 ) + 50.0;
+ }
+ err = accumulator( v1, v2 );
+ console.log( '%d\t%d\t%d', v1.toFixed( 3 ), v2.toFixed( 3 ), ( err === null ) ? NaN : err.toFixed( 3 ) );
+}
diff --git a/lib/node_modules/@stdlib/stats/incr/nanmmaape/lib/index.js b/lib/node_modules/@stdlib/stats/incr/nanmmaape/lib/index.js
new file mode 100644
index 000000000000..2ebb6fb85113
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanmmaape/lib/index.js
@@ -0,0 +1,57 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2020 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+/**
+* Compute a moving mean arctangent absolute percentage error incrementally, ignoring `NaN` values.
+*
+* @module @stdlib/stats/incr/nanmmaape
+*
+* @example
+* var incrnanmmaape = require( '@stdlib/stats/incr/nanmmaape' );
+*
+* var accumulator = incrnanmmaape( 3 );
+*
+* var m = accumulator();
+* // returns null
+*
+* m = accumulator( 2.0, 3.0 );
+* // returns ~0.32
+*
+* m = accumulator( NaN, 3.0 );
+* // returns ~0.32
+*
+* m = accumulator( 5.0, NaN );
+* // returns ~0.32
+*
+* m = accumulator( -5.0, 2.0 );
+* // returns ~0.8071236110932138
+*
+* m = accumulator();
+* // returns ~0.8071236110932138
+*/
+
+// MODULES //
+
+var main = require( './main.js' );
+
+
+// EXPORTS //
+
+module.exports = main;
diff --git a/lib/node_modules/@stdlib/stats/incr/nanmmaape/lib/main.js b/lib/node_modules/@stdlib/stats/incr/nanmmaape/lib/main.js
new file mode 100644
index 000000000000..20178111a933
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanmmaape/lib/main.js
@@ -0,0 +1,80 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2020 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var incrmmaape = require( '@stdlib/stats/incr/mmaape' );
+
+
+// MAIN //
+
+/**
+* Returns an accumulator function which incrementally computes a moving mean arctangent absolute percentage error, ignoring `NaN` values.
+*
+* @param {PositiveInteger} W - window size
+* @throws {TypeError} must provide a positive integer
+* @returns {Function} accumulator function
+*
+* @example
+* var accumulator = incrnanmmaape( 3 );
+*
+* var m = accumulator();
+* // returns null
+*
+* m = accumulator( 2.0, 3.0 );
+* // returns ~0.32
+*
+* m = accumulator( NaN, 3.0 );
+* // returns ~0.32
+*
+* m = accumulator( 5.0, NaN );
+* // returns ~0.32
+*
+* m = accumulator( -5.0, 2.0 );
+* // returns ~0.8071236110932138
+*
+* m = accumulator();
+* // returns ~0.8071236110932138
+*/
+function incrnanmmaape( W ) {
+ var mmaape = incrmmaape( W );
+ return accumulator;
+
+ /**
+ * If provided input values, the accumulator function returns an updated mean arctangent absolute percentage error. If not provided input values, the accumulator function returns the current value.
+ *
+ * @private
+ * @param {number} [f] - input value
+ * @param {number} [a] - input value
+ * @returns {(number|null)} mean arctangent absolute percentage error or null
+ */
+ function accumulator( f, a ) {
+ if ( arguments.length === 0 || isnan( f ) || isnan( a ) ) {
+ return mmaape();
+ }
+ return mmaape( f, a );
+ }
+}
+
+
+// EXPORTS //
+
+module.exports = incrnanmmaape;
diff --git a/lib/node_modules/@stdlib/stats/incr/nanmmaape/package.json b/lib/node_modules/@stdlib/stats/incr/nanmmaape/package.json
new file mode 100644
index 000000000000..b80ee06dfb10
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanmmaape/package.json
@@ -0,0 +1,85 @@
+{
+ "name": "@stdlib/stats/incr/nanmmaape",
+ "version": "0.0.0",
+ "description": "Compute a moving arctangent mean absolute percentage error (MAAPE) incrementally, ignoring NaN values.",
+ "license": "Apache-2.0",
+ "author": {
+ "name": "The Stdlib Authors",
+ "url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
+ },
+ "contributors": [
+ {
+ "name": "The Stdlib Authors",
+ "url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
+ }
+ ],
+ "main": "./lib",
+ "directories": {
+ "benchmark": "./benchmark",
+ "doc": "./docs",
+ "example": "./examples",
+ "lib": "./lib",
+ "test": "./test"
+ },
+ "types": "./docs/types",
+ "scripts": {},
+ "homepage": "https://github.com/stdlib-js/stdlib",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/stdlib-js/stdlib.git"
+ },
+ "bugs": {
+ "url": "https://github.com/stdlib-js/stdlib/issues"
+ },
+ "dependencies": {},
+ "devDependencies": {},
+ "engines": {
+ "node": ">=0.10.0",
+ "npm": ">2.7.0"
+ },
+ "os": [
+ "aix",
+ "darwin",
+ "freebsd",
+ "linux",
+ "macos",
+ "openbsd",
+ "sunos",
+ "win32",
+ "windows"
+ ],
+ "keywords": [
+ "stdlib",
+ "stdmath",
+ "statistics",
+ "stats",
+ "mathematics",
+ "math",
+ "average",
+ "avg",
+ "mean",
+ "error",
+ "err",
+ "mape",
+ "maape",
+ "absolute",
+ "abs",
+ "incremental",
+ "accumulator",
+ "moving mean",
+ "moving average",
+ "sliding window",
+ "sliding",
+ "window",
+ "moving",
+ "rolling",
+ "time series",
+ "timeseries",
+ "demand",
+ "forecasting",
+ "forecast",
+ "difference",
+ "diff",
+ "delta"
+ ]
+}
diff --git a/lib/node_modules/@stdlib/stats/incr/nanmmaape/test/test.js b/lib/node_modules/@stdlib/stats/incr/nanmmaape/test/test.js
new file mode 100644
index 000000000000..6d6747b4ecd3
--- /dev/null
+++ b/lib/node_modules/@stdlib/stats/incr/nanmmaape/test/test.js
@@ -0,0 +1,181 @@
+/**
+* @license Apache-2.0
+*
+* Copyright (c) 2020 The Stdlib Authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+'use strict';
+
+// MODULES //
+
+var tape = require( 'tape' );
+var isnan = require( '@stdlib/math/base/assert/is-nan' );
+var abs = require( '@stdlib/math/base/special/abs' );
+var atan = require( '@stdlib/math/base/special/atan' );
+var EPS = require( '@stdlib/constants/float64/eps' );
+var incrnanmmaape = require( './../lib' );
+
+
+// TESTS //
+
+tape( 'main export is a function', function test( t ) {
+ t.ok( true, __filename );
+ t.strictEqual( typeof incrnanmmaape, 'function', 'main export is a function' );
+ t.end();
+});
+
+tape( 'the function throws an error if not provided a positive integer', function test( t ) {
+ var values;
+ var i;
+
+ values = [
+ '5',
+ -5.0,
+ 0.0,
+ 3.14,
+ true,
+ null,
+ void 0,
+ NaN,
+ [],
+ {},
+ function noop() {}
+ ];
+
+ for ( i = 0; i < values.length; i++ ) {
+ t.throws( badValue( values[i] ), TypeError, 'throws an error when provided '+values[i] );
+ }
+ t.end();
+
+ function badValue( value ) {
+ return function badValue() {
+ incrnanmmaape( value );
+ };
+ }
+});
+
+tape( 'the function returns an accumulator function', function test( t ) {
+ t.strictEqual( typeof incrnanmmaape( 3 ), 'function', 'returns expected value' );
+ t.end();
+});
+
+tape( 'the initial accumulated value is `null`', function test( t ) {
+ var acc = incrnanmmaape( 3 );
+ t.strictEqual( acc(), null, 'returns expected value' );
+ t.end();
+});
+
+tape( 'the accumulator function computes a moving mean arctangent absolute percentage error incrementally', function test( t ) {
+ var expected;
+ var actual;
+ var delta;
+ var data;
+ var acc;
+ var tol;
+ var N;
+ var i;
+
+ data = [
+ [ 2.0, 3.0 ],
+ [ 3.0, 1.0 ],
+ [ 5.0, 2.0 ],
+ [ 4.0, 4.0 ],
+ [ 3.0, 10.0 ],
+ [ 4.0, 5.0 ]
+ ];
+ N = data.length;
+
+ acc = incrnanmmaape( 3 );
+
+ // Note: manually computed
+ expected = [
+ (1.0/1.0)*( atan(1.0/3.0) ),
+ (1.0/2.0)*( atan(1.0/3.0)+atan(2.0/1.0) ),
+ (1.0/3.0)*( atan(1.0/3.0)+atan(2.0/1.0)+atan(3.0/2.0) ),
+ (1.0/3.0)*( atan(2.0/1.0)+atan(3.0/2.0)+atan(0.0/4.0) ),
+ (1.0/3.0)*( atan(3.0/2.0)+atan(0.0/4.0)+atan(7.0/10.0) ),
+ (1.0/3.0)*( atan(0.0/4.0)+atan(7.0/10.0)+atan(1.0/5.0) )
+ ];
+
+ for ( i = 0; i < N; i++ ) {
+ actual = acc( data[i][0], data[i][1] );
+ if ( actual === expected[i] ) {
+ t.strictEqual( actual, expected[i], 'returns expected value' );
+ } else {
+ delta = abs( expected[i] - actual );
+ tol = 1.0 * EPS * abs( expected[i] );
+ t.strictEqual( delta <= tol, true, 'within tolerance. Actual: '+actual+'. Expected: '+expected[i]+'. Delta: '+delta+'. Tol: '+tol+'.' );
+ }
+ }
+ t.end();
+});
+
+tape( 'if provided `NaN`, the accumulator ignores the value', function test( t ) {
+ var expected;
+ var data;
+ var acc;
+ var v;
+ var i;
+
+ expected = [
+ null,
+ atan( 1.0/3.0 ),
+ atan( 1.0/3.0 ),
+ atan( 1.0/3.0 ),
+ (1.0/2.0)*( atan(1.0/3.0)+atan(2.0/1.0) )
+ ];
+
+ data = [
+ [ NaN, 3.0 ], // ignored
+ [ 2.0, 3.0 ], // valid
+ [ NaN, 3.0 ], // ignored
+ [ 3.0, NaN ], // ignored
+ [ 3.0, 1.0 ] // valid
+ ];
+
+ acc = incrnanmmaape( 2 );
+
+ for ( i = 0; i < data.length; i++ ) {
+ v = acc( data[i][0], data[i][1] );
+ if ( expected[i] === null ) {
+ t.strictEqual( v, null, 'returns null at index '+i );
+ } else {
+ t.strictEqual( isnan( v ), false, 'does not return NaN at index '+i );
+ t.strictEqual( v, expected[i], 'returns expected value at index '+i );
+ }
+ }
+ t.end();
+});
+
+tape( 'if not provided input values, the accumulator returns the current mean arctangent absolute percentage error', function test( t ) {
+ var data;
+ var acc;
+ var i;
+
+ data = [
+ [ 2.0, 3.0 ],
+ [ NaN, 3.0 ],
+ [ 3.0, 5.0 ],
+ [ NaN, NaN ],
+ [ 19.0, 10.0 ]
+ ];
+
+ acc = incrnanmmaape( 2 );
+ for ( i = 0; i < data.length; i++ ) {
+ acc( data[i][0], data[i][1] );
+ }
+ t.strictEqual( acc(), 0.5*( atan(2.0/5.0)+atan(9.0/10.0) ), 'returns expected value' );
+ t.end();
+});