Function to computer hypothetical Sample size for a one sample one way ANOVA. This is an OriginPro only function.
int ocmath_anova_samplesize( const double dSigLevel, const double * pPowers, const UINT nSize, ANOVAPowerOpts * tPowerOpts, double * pSampleSizes )
Returns STATS_NO_ERROR on successful exit and a non-zero STATS error code on failure.
EX1
void ocmath_anova_samplesize_ex1() { double dSigLevel = 0.05; vector vSampleSizes; ANOVAPowerOpts tPowerOpts; vector vPowers; vPowers.SetSize(3); vPowers[0] = 0.087; vPowers[1] = 0.184; vPowers[2] = 0.293; tPowerOpts.Level = 5; tPowerOpts.CSS = 4; tPowerOpts.SD = 2.34; vSampleSizes.SetSize(vPowers.GetSize()); int nRet = ocmath_anova_samplesize( dSigLevel, vPowers, vPowers.GetSize(), &tPowerOpts, vSampleSizes ); out_int("nRet=", nRet); }
origin.h