2.1.24.2.6 ocmath_sign_test
Description
Performs 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 points
- pData2
- [input] pointer to 2nd data points
- nSize
- [input] size of 1st and 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
- nTies
- [output] pointer to number of ties
- SignFreqs
- [output] pointer to structure containing Statistics of Frequencies
- SignStats
- [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_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);
}
Remark
See Also
Header to Included
origin.h
Reference
|