| 2.1.24.2.2 ocmath_friedman_test
 DescriptionPerforms the Frieman two-way analysis of variance. The main engine is nag_friedman_test(g08aec). This is an OriginPro only function.
 Syntaxint ocmath_friedman_test( const double * pData, const uint nSize, const double * dpTreaments, const uint nTreatmSize, const double * dpBlocks, const uint nBlockSize, NPHSummary * FriSummary, NPHRanks * FriRanks, NPHStats * FriStats ) Parameters pData[input] pointer to data points nSize[input] size of pData dpTreaments[input] pointer to integer treaments nTreatmSize[input] size of dpTreaments, it should equal to nSize dpBlocks[input] pointer to integer blocks. nBlockSize[input] size of dpBlocks. it should equal to nSize FriSummary[output] pointer to structure containing summary statistics of each groupsKruSummary[i-1]: Summary statistics of i-th group FriRanks[output] pointer to structure containing Statistics of RanksFriRanks[i-1]: Ranks of i-th group FriStats[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_friedman_test_ex1()
{
    vector pData;
    pData.Data(1.1,2.0,0.1);
    int nSize = pData.GetSize();
    
    vector dpTreaments;
    dpTreaments.Data(1.1,2,0.1);
    int nTreatmSize = dpTreaments.GetSize();
    
    vector dpBlocks;
    dpBlocks.Data(4.1,5,0.1);
    int nBlockSize = dpBlocks.GetSize();
    
    NPHSummary FriSummary[10];
    NPHRanks FriRanks[10];
    NPHStats FriStats;
    
    int nRet = ocmath_friedman_test(pData, nSize, dpTreaments, nTreatmSize, dpBlocks, nBlockSize, FriSummary, FriRanks, &FriStats);
    out_int("nRet", nRet);
}RemarkSee AlsoHeader to Includedorigin.h
 Reference |