bundles / scipy 1.17.1 / scipy / stats / _ansari_swilk_statistics / swilk
cython_function_or_method
scipy.stats._ansari_swilk_statistics:swilk
Signature
def swilk ( x , a , init = False , n1 = -1 ) Summary
Calculates the Shapiro-Wilk W test and its significance level
Extended Summary
This is a double precision Cython translation (with modifications) of the FORTRAN 77 code given in:
Royston P., "Remark AS R94: A Remark on Algorithm AS 181: The W-test for Normality", 1995, Applied Statistics, Vol. 44, 10.2307/2986146
IFAULT error code details from the R94 paper: - 0 for no fault - 1 if N, N1 < 3 - 2 if N > 5000 (a non-fatal error) - 3 if N2 < N/2, so insufficient storage for A - 4 if N1 > N or (N1 < N and N < 20) - 5 if the proportion censored (N-N1)/N > 0.8 - 6 if the data have zero range (if sorted on input)
For SciPy, n1 is never used, set to a positive number to enable the functionality. Otherwise n1 = n is used.
Aliases
-
scipy.stats._ansari_swilk_statistics.swilk