Skip to content

Commit b82041b

Browse files
shiv343kgryte
andauthored
chore: fix EditorConfig lint errors
PR-URL: #7595 Closes: #7576 Co-authored-by: Athan Reines <[email protected]> Reviewed-by: Athan Reines <[email protected]>
1 parent 0ce3935 commit b82041b

File tree

1 file changed

+14
-37
lines changed
  • lib/node_modules/@stdlib/stats/wilcoxon

1 file changed

+14
-37
lines changed

lib/node_modules/@stdlib/stats/wilcoxon/README.md

Lines changed: 14 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ table = out.print();
186186
*/
187187
```
188188

189-
By default, all zero-differences are discarded before calculating the ranks. Set `zeroMethod` to `pratt` when you wish differences of zero to be used in the rank calculation but then drop them or to `zsplit` when differences of zero are shall be used in the ranking procedure and the ranks then split between positive and negative ones.
189+
By default, all zero-differences are discarded before calculating the ranks. Set `zeroMethod` to `pratt` when you wish differences of zero to be used in the rank calculation but then drop them or to `zsplit` when differences of zero are shall be used in the ranking procedure and the ranks then split between positive and negative ones.
190190

191191
```javascript
192192
var arr = [ 0, 2, 3, -1, -4, 0, 0, 8, 9 ];
@@ -220,21 +220,14 @@ out = wilcoxon( arr, {
220220
By default, the test uses the exact distribution of the rank statistic to calculate the critical values for the test in case of no ties and no zero-differences. Since it is more computationally efficient, starting with fifty observations a normal approximation is employed. If you would like the test to use the correct distribution even for larger samples, set the `exact` option to `true`.
221221

222222
```javascript
223-
var normal = require( '@stdlib/random/base/normal' ).factory;
224-
var rnorm;
225-
var arr;
226-
var out;
227-
var i;
223+
var normal = require( '@stdlib/random/array/normal' );
228224

229-
rnorm = normal( 0.0, 4.0, {
225+
var rnorm = normal.factory( 0.0, 4.0, {
230226
'seed': 100
231227
});
232-
arr = new Array( 100 );
233-
for ( i = 0; i < arr.length; i++ ) {
234-
arr[ i ] = rnorm();
235-
}
228+
var arr = rnorm( 100 );
236229

237-
out = wilcoxon( arr, {
230+
var out = wilcoxon( arr, {
238231
'exact': false
239232
});
240233
/* e.g., returns
@@ -264,21 +257,14 @@ out = wilcoxon( arr, {
264257
By default, when using the normal approximation, the test uses a continuity correction, which adjusts the Wilcoxon rank statistic by `0.5` towards the mean. To disable this correction, set `correction` to `false`.
265258

266259
```javascript
267-
var normal = require( '@stdlib/random/base/normal' ).factory;
268-
var rnorm;
269-
var arr;
270-
var out;
271-
var i;
260+
var normal = require( '@stdlib/random/array/normal' );
272261

273-
rnorm = normal( 0.0, 4.0, {
262+
var rnorm = normal.factory( 0.0, 4.0, {
274263
'seed': 100
275264
});
276-
arr = new Array( 100 );
277-
for ( i = 0; i < arr.length; i++ ) {
278-
arr[ i ] = rnorm();
279-
}
265+
var arr = rnorm( 100 );
280266

281-
out = wilcoxon( arr, {
267+
var out = wilcoxon( arr, {
282268
'correction': false
283269
});
284270
/* e.g., returns
@@ -316,26 +302,17 @@ out = wilcoxon( arr, {
316302
<!-- eslint no-undef: "error" -->
317303

318304
```javascript
319-
var uniform = require( '@stdlib/random/base/discrete-uniform' ).factory;
305+
var uniform = require( '@stdlib/random/array/discrete-uniform' );
320306
var wilcoxon = require( '@stdlib/stats/wilcoxon' );
321307

322-
var table;
323-
var runif;
324-
var arr;
325-
var out;
326-
var i;
327-
328-
runif = uniform( -50.0, 50.0, {
308+
var runif = uniform.factory( -50.0, 50.0, {
329309
'seed': 37827
330310
});
331-
arr = new Array( 100 );
332-
for ( i = 0; i < arr.length; i++ ) {
333-
arr[ i ] = runif();
334-
}
311+
var arr = runif( 100 );
335312

336313
// Test whether distribution is symmetric around zero:
337-
out = wilcoxon( arr );
338-
table = out.print();
314+
var out = wilcoxon( arr );
315+
var table = out.print();
339316
/* e.g., returns
340317
One-Sample Wilcoxon signed rank test
341318

0 commit comments

Comments
 (0)