ocmath_one_sample_wilcoxon
Description
Performs the Wilcoxon signed rank test on a single sample. To test a particular sample came from a popular with a specified median. The main engine is nag_wilcon_test. This is an OriginPro only function.
Syntax
int ocmath_one_sample_wilcoxon( const double * pData, const int nSize, const double dMedian, const int nTailType, NPHSummary * Wilco1Summary, NPHStats * Wilco1Stats )
Parameters
- pData
- [input] pointer to data points for Wilcoxon Sign Rank test
- nSize
- [input] number of pData
- dMedian
- [input] median test value
- 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
- Wilco1Summary
- [output] structure containing summary statistics of the data
- Wilco1Stats
- [output] pointer to structure containing the test statistic and p-value
Return
Returns STATS_NO_ERROR on successful exit or an STATS error code on failure.
Examples
EX1
void ocmath_one_sample_wilcoxon_ex1()
{
vector pData = {1.0, 2.3, 4.5, 2.0, 5.3};
int nSize = pData.GetSize();
double dMedian = 3;
int nTailType = TAILED_TEST_TWO;
NPHSummary Wilco1Summary;
NPHStats Wilco1Stats;
int nRet = ocmath_one_sample_wilcoxon(pData, nSize, dMedian, nTailType, &Wilco1Summary, &Wilco1Stats );
out_int("nRet=", nRet);
}
Remark
See Also
header to Included
origin.h
Reference
|