| ocmath_sign_test  DescriptionPerforms a Sign test for related samples. The main engine is nag_sign_test. This is an OriginPro only function. Syntax
int ocmath_sign_test( const double * pData1, const double * pData2, const uint nSize, const int nTailType, int * nTies, NPHFreqs * SignFreqs, NPHStats * SignStats )
 Parameters
    pData1[input] pointer to 1st data pointspData2[input] pointer to 2nd data pointsnSize[input] size of 1st and 2nd data pointsnTailType[input] value indicates Tail Type. which containing 3 types:TAILED_TEST_TWO is 0,TAILED_TEST_UPPER is 1,TAILED_TEST_LOWER is 2nTies[output] pointer to number of tiesSignFreqs[output] pointer to structure containing Statistics of FrequenciesSignStats[output] pointer to structure containing the test statistic and p-value. No corrected for ties. ReturnReturns STATS_NO_ERROR on successful exit or an STATS error code on failure. ExamplesEX1 
void ocmath_sign_test_ex1()
{
    vector pData1 = {1.0, 2.3, 4.5, 2.0, 5.3};
    vector pData2 = {2.2, 5.6, 4.3, 1.7, 3.8};
    int nSize = pData1.GetSize();
    int nTailType = TAILED_TEST_TWO;
    int nTies;
    NPHFreqs SignFreqs;
    NPHStats SignStats;
    
    int nRet = ocmath_sign_test(pData1, pData2, nSize, nTailType, &nTies, &SignFreqs, &SignStats);
    out_int("nRet=", nRet);
}
RemarkSee Alsoheader to Includedorigin.h Reference |