File: repl.txt

package info (click to toggle)
node-stdlib 0.0.96%2Bds1%2B~cs0.0.429-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 421,476 kB
  • sloc: javascript: 1,562,831; ansic: 109,702; lisp: 49,823; cpp: 27,224; python: 7,871; sh: 6,807; makefile: 6,089; fortran: 3,102; awk: 387
file content (81 lines) | stat: -rw-r--r-- 2,595 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81

{{alias}}( W[, options] )
    Returns an accumulator function which incrementally performs a moving
    Grubbs' test for detecting outliers.

    Grubbs' test assumes that data is normally distributed. Accordingly, one
    should first verify that the data can be reasonably approximated by a normal
    distribution before applying the Grubbs' test.

    The `W` parameter defines the number of values over which to perform Grubbs'
    test. The minimum window size is 3.

    If provided a value, the accumulator function returns updated test results.
    If not provided a value, the accumulator function returns the current test
    results.

    Until provided `W` values, the accumulator function returns `null`.

    The accumulator function returns an object having the following fields:

    - rejected: boolean indicating whether the null hypothesis should be
    rejected.
    - alpha: significance level.
    - criticalValue: critical value.
    - statistic: test statistic.
    - df: degrees of freedom.
    - mean: sample mean.
    - sd: corrected sample standard deviation.
    - min: minimum value.
    - max: maximum value.
    - alt: alternative hypothesis.
    - method: method name.
    - print: method for pretty-printing test output.

    Parameters
    ----------
    W: integer
        Window size.

    options: Object (optional)
        Function options.

    options.alpha: number (optional)
        Significance level. Default: 0.05.

    options.alternative: string (optional)
        Alternative hypothesis. The option may be one of the following values:

        - 'two-sided': test whether the minimum or maximum value is an outlier.
        - 'min': test whether the minimum value is an outlier.
        - 'max': test whether the maximum value is an outlier.

        Default: 'two-sided'.

    Returns
    -------
    acc: Function
        Accumulator function.

    Examples
    --------
    > var acc = {{alias}}( 20 );
    > var res = acc()
    null
    > for ( var i = 0; i < 200; i++ ) {
    ...     res = acc( {{alias:@stdlib/random/base/normal}}( 10.0, 5.0 ) );
    ... };
    > res.print()

    References
    ----------
    - Grubbs, Frank E. 1950. "Sample Criteria for Testing Outlying
    Observations." _The Annals of Mathematical Statistics_ 21 (1). The Institute
    of Mathematical Statistics: 27–58. doi:10.1214/aoms/1177729885.
    - Grubbs, Frank E. 1969. "Procedures for Detecting Outlying Observations in
    Samples." _Technometrics_ 11 (1). Taylor & Francis: 1–21. doi:10.1080/
    00401706.1969.10490657.

    See Also
    --------