2.1.24.7.3 ocmath_kolmogorov_smirnov_test


Description

Function to perform a Kolmogorov-Smirnov Normality Test using nag function nag_1_sample_ks_test()

Syntax

int ocmath_kolmogorov_smirnov_test( UINT nSize, const double * pData, NormTestResults * KSRes, const int nParatype = PARA_ESTIMATED, UINT nParSize = 2, double * pPar = NULL )

Parameters

nSize
[Input] value indicates sample size
pData
[Input] pointer containing data points for Normality Test
KSRes
[Output] structure containing Kolmogorov-Smirnov Normality Test results
nParatype
[Input] flag to specify whether mean and var are known or estimated from the data
PARA_ESTIMATED: par would be ouput with estimated mean and var
PARA_SUPPLIED: par need to be supplied with known mean and var.
nParSize
[Input]Size of pPar. It should always set as 2;
pPar
[Input/Output] pointer include the mean and variance. size of pPar should be 2.

Return

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

Examples

EX1

void test()
{
    int nRet=0;
    NormTestResults KSRes1;
    vector vData1={-2,-1,0,1,2};            
    nRet=ocmath_kolmogorov_smirnov_test(vData1.GetSize(), vData1, &KSRes1);
}

Remark

See Also

Header to Include

origin.h

Reference