ocmath_anova_samplesize

 

Description

Function to computer hypothetical Sample size for a one sample one way ANOVA. This is an OriginPro only function.

Syntax

int ocmath_anova_samplesize( const double dSigLevel, const double * pPowers, const UINT nSize, ANOVAPowerOpts * tPowerOpts, double * pSampleSizes )

Parameters

dSigLevel
[input] Significance level for power computations
pPowers
[input] pointer containing powers
nSize
[input] number indicates the size of pPowers
tPowerOpts
[input] structure containing Power&SampleSize input options
pSampleSizes
[output] pointer containing hypothetical sample sizes

Return

Returns STATS_NO_ERROR on successful exit and a non-zero STATS error code on failure.

Examples

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);
}

Remark

See Also

header to Included

origin.h

Reference