2.1.24.2.7 ocmath_wilcoxon_sign_rank


Description

Performs a Wilcoxon signed rank test for paired samples. The main engine is nag_wilcoxon_test. This is an OriginPro only function.

Syntax

int ocmath_wilcoxon_sign_rank( const double * pData1, const uint nSize1, const double * pData2, const uint nSize2, const int nTailType, NPHSummary * WilSiSummary, NPHRanks * WilSiRanks, NPHStats * WilSiStats )

Parameters

pData1
[input] pointer to 1st data points
nSize1
[input] size of 1st data points
pData2
[input] pointer to 2nd data points
nSize2
[input] size of 2nd data points
nTailType
[input] value indicates Tail Type. which containing 3 types:
TAILED_TEST_TWO is 0,
TAILED_TEST_UPPER is 1,
TAILED_TEST_LOWER is 2
WilSiSummary
[output] pointer to structure containing summary statistics of the 2 groups
WilSiSummary[0]: Summary statistics of 1st group
WilSiSummary[1]: Summary statistics of 2nd group
WilSiRanks
[output] pointer to structure containing Statistics of Ranks
WilSiRanks[0]: Statistics of Positive Ranks
WilSiRanks[1]: Statistics of Negative Ranks
WilSiStats
[output] pointer to structure containing the test statistic and p-value. No corrected for ties.

Return

Returns STATS_NO_ERROR on successful exit or an STATS error code on failure.

Examples

EX1

void ocmath_wilcoxon_sign_rank_ex1()
{
    vector pData1 = {1.0, 2.3, 4.5, 2.0, 5.3};
    int nSize1 = pData1.GetSize();
    vector pData2 = {2.2, 5.6, 4.3, 1.7, 3.8};
    int nSize2 = pData2.GetSize();
    int nTailType = TAILED_TEST_TWO;
    NPHSummary WilSiSummary[2];
    NPHRanks WilSiRanks[2];
    NPHStats WilSiStats;
    
    int nRet = ocmath_wilcoxon_sign_rank(pData1, nSize1, pData2, nSize2, nTailType, WilSiSummary, WilSiRanks, &WilSiStats );
    out_int("nRet=", nRet);
}

Remark

See Also

Header to Included

origin.h

Reference