ocmath_shapiro_wilk_test

 

Description

Function to perform a Shapiro-Wilk Normality Test.

Syntax

int ocmath_shapiro_wilk_test( UINT nSize, const double * pX, NormTestResults * SWRes, const int iOption = SHAPIRO_WILK_R94 )

Parameters

nSize
[Input] value indicates sample size
pX
[Input] pointer to sample values
SWRes
[Output] structure containing Shapiro_Wilk Normality Test results
iOption
[Input] integer that indicates which Algorithm to be used
SHAPIRO_WILK_R94: Algorithm R94, SAS and SPSS used
SHAPIRO_WILK_AS181: Algorithm AS181, NAG used

Return

Returns STATS_NO_ERROR on successful exit or a non-zero STATS error code on failure.

Examples

EX1

void ocmath_shapiro_wilk_test_ex1()
{
    vector vTestData={ 3.1, 4.2, 2.2, 3, 6 };
    NormTestResults SWRes;
    int nRet = ocmath_shapiro_wilk_test(vTestData.GetSize(), vTestData, &SWRes, 1);  
}

Remark

See Also

header to Include

origin.h

Reference