You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@b331e5634fe726ff0e16e87814ac3f85d8164d31/lib/node_modules/@stdlib/stats/incr/mvmr/docs/img/equation_unbiased_sample_variance.svg" alt="Equation for the unbiased sample variance.">
36
+
<img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@b331e5634fe726ff0e16e87814ac3f85d8164d31/lib/node_modules/@stdlib/stats/incr/nanmvmr/docs/img/equation_unbiased_sample_variance.svg" alt="Equation for the unbiased sample variance.">
37
37
<br>
38
38
</div> -->
39
39
@@ -48,7 +48,7 @@ and the [arithmetic mean][arithmetic-mean] is defined as
<img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@164b8f1010c4535340eed9ad0b2af32c4a19863c/lib/node_modules/@stdlib/stats/incr/mvmr/docs/img/equation_arithmetic_mean.svg" alt="Equation for the arithmetic mean.">
51
+
<img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@164b8f1010c4535340eed9ad0b2af32c4a19863c/lib/node_modules/@stdlib/stats/incr/nanmvmr/docs/img/equation_arithmetic_mean.svg" alt="Equation for the arithmetic mean.">
<img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@b331e5634fe726ff0e16e87814ac3f85d8164d31/lib/node_modules/@stdlib/stats/incr/mvmr/docs/img/equation_variance_to_mean_ratio.svg" alt="Equation for the variance-to-mean ratio (VMR).">
66
+
<img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@b331e5634fe726ff0e16e87814ac3f85d8164d31/lib/node_modules/@stdlib/stats/incr/nanmvmr/docs/img/equation_variance_to_mean_ratio.svg" alt="Equation for the variance-to-mean ratio (VMR).">
Returns an accumulator `function` which incrementally computes a moving [variance-to-mean ratio][variance-to-mean-ratio]. The `window` parameter defines the number of values over which to compute the moving [variance-to-mean ratio][variance-to-mean-ratio].
87
87
88
88
```javascript
89
-
var accumulator =incrmvmr( 3 );
89
+
var accumulator =incrnanmvmr( 3 );
90
90
```
91
91
92
92
If the mean is already known, provide a `mean` argument.
93
93
94
94
```javascript
95
-
var accumulator =incrmvmr( 3, 5.0 );
95
+
var accumulator =incrnanmvmr( 3, 5.0 );
96
96
```
97
97
98
98
#### accumulator( \[x] )
99
99
100
100
If provided an input value `x`, the accumulator function returns an updated accumulated value. If not provided an input value `x`, the accumulator function returns the current accumulated value.
101
101
102
102
```javascript
103
-
var accumulator =incrmvmr( 3 );
103
+
var accumulator =incrnanmvmr( 3 );
104
104
105
105
varF=accumulator();
106
106
// returns null
@@ -134,8 +134,6 @@ F = accumulator();
134
134
135
135
## Notes
136
136
137
-
- Input values are **not** type checked. If provided `NaN` or a value which, when used in computations, results in `NaN`, the accumulated value is `NaN` for **at least**`W-1` future invocations. If non-numeric inputs are possible, you are advised to type check and handle accordingly **before** passing the value to the accumulator function.
138
-
139
137
- As `W` values 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.
140
138
141
139
- The following table summarizes how to interpret the [variance-to-mean ratio][variance-to-mean-ratio]:
@@ -165,18 +163,18 @@ F = accumulator();
165
163
166
164
```javascript
167
165
var randu =require( '@stdlib/random/base/randu' );
0 commit comments