ocmath_anova_powers1

 

Description

Function to compute actual or hypothetical powers for a one way ANOVA.

Syntax

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

Parameters

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

Return

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

Examples

EX1

void ocmath_anova_powers1_ex1()
{
    double dSigLevel = 0.05;
    vector vSampleSizes;
    ANOVAPowerOpts tPowerOpts;
    vector vPowers;
    
    vSampleSizes.SetSize(3);
    vSampleSizes[0] = 2;
    vSampleSizes[1] = 4;
    vSampleSizes[2] = 6;
    
    tPowerOpts.Level = 5;
    tPowerOpts.CSS = 4;
    tPowerOpts.SD = 2.34;
    
    vPowers.SetSize(vSampleSizes.GetSize());
    
    int nRet = ocmath_anova_powers1( dSigLevel, vSampleSizes, vSampleSizes.GetSize(), &tPowerOpts, vPowers );
    out_int("nRet=", nRet);
}

Remark

See Also

header to Included

origin.h

Reference