Class/Object

au.id.cxd.math.probability.analysis

ShapiroWilksTest

Related Docs: object ShapiroWilksTest | package analysis

Permalink

class ShapiroWilksTest extends StatisticalTest

Shapiro Wilks Univariate test for normality

https://en.wikipedia.org/wiki/Shapiro%E2%80%93Wilk_test

See: https://ww2.mathworks.cn/matlabcentral/mlc-downloads/downloads/submissions/13964/versions/2/previews/swtest.m/index.html

as well as: https://github.com/wch/r-source/blob/trunk/src/library/stats/src/swilk.c

Both reference the AS R94 article on the shapiro wilk normality test. The R source version swilk.c is converted from the fortran implementation of that algorithm. The matlab source being a DSL is much easier to read through. However in both cases the coefficients of the polynomials are provided in tables and these are used in the expansion when calculating the a_i coefficients in the statistic.

In order to provide an implementation, the same constant coefficients will be used. However simplification of the C version is attempted with heavy influence from the approach taken in matlab.

Linear Supertypes
StatisticalTest, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ShapiroWilksTest
  2. StatisticalTest
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ShapiroWilksTest(series: Seq[Double])

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. val c1: Seq[Double]

    Permalink
  6. val c2: Seq[Double]

    Permalink
  7. val c3: Seq[Double]

    Permalink
  8. val c4: Seq[Double]

    Permalink
  9. val c5: Seq[Double]

    Permalink
  10. val c6: Seq[Double]

    Permalink
  11. val c7: Seq[Double]

    Permalink
  12. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  13. def computeStat(): (Double, Double)

    Permalink

    Compute the critical value of the test statistic.

    Compute the critical value of the test statistic.

    returns

    Returns a tuple (critical value x p value)

  14. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  16. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  18. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  19. def indexed(set: Seq[Double]): Seq[(Int, Double)]

    Permalink
  20. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  21. def mQuantiles(n: Int): DenseVector[Double]

    Permalink

    approximate the mean of ith order statistics for quantiles 1:n

  22. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  23. val norm: Normal

    Permalink

    normal distribution.

  24. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. def ordered(): Seq[Double]

    Permalink

    the ordered function.

  27. val series: Seq[Double]

    Permalink
  28. def shapiroFrancia(x: Seq[Double]): (Double, Double)

    Permalink

    Compute the shapiro francia statistic and the corresponding pvalue

    Compute the shapiro francia statistic and the corresponding pvalue

    returns

    tuple of (critical value x p value)

  29. def shapiroWilks(x: Seq[Double]): (Double, Double)

    Permalink

    Compute the shapiro wilks statistic and corresponding pvalue

    Compute the shapiro wilks statistic and corresponding pvalue

    returns

    tuple of (critival value x p value)

  30. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  31. def test(alpha: Double): TestResult

    Permalink
    Definition Classes
    ShapiroWilksTestStatisticalTest
  32. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  33. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. def zeros(n: Int): Seq[Double]

    Permalink

Inherited from StatisticalTest

Inherited from AnyRef

Inherited from Any

Ungrouped