Regress.ANOVA1 Method

Overload List

#SignatureDescription
1TANOVA1Result ANOVA1(TMtx Data, ref Double p, Double Alpha)Performs a one-way (single-factor) analysis of variance (ANOVA).
2TANOVA1Result ANOVA1(TVec Data, TVecInt GroupIndex, ref Double p, Double Alpha)Perform the one-way analysis of variance where Data vector (one variable) is indexed by a second grouping GroupIndex vector variable.

Overload 1: TANOVA1Result ANOVA1(TMtx Data, ref Double p, Double Alpha)

Performs a one-way (single-factor) analysis of variance (ANOVA).

#NameDescription
1DataData matrix, each column is separate group.
2AlphaDesired significance level.
3pReturns the significance probability of null hypothesis that two means are equal. If p is less than desired significance alpha then the result suggests the null hypothesis (two means are equal) can be rejected.

Returns: TANOVA1Result

Remarks:

Performs a one-way (single-factor) analysis of variance.

Examples
using Dew.Math;
using Dew.Stats;
using Dew.Stats.Units;
namespace Dew.Examples
{
    private void Example()
    {
        Matrix Data = new Matrix(0,0);
        double signprob;
        TANOVA1Result ar;
        Data.SetIt(4,4,false, new double[] {3.2, 2.5, 5.5, 7.0,
            6.2, 12.0, 3.0, 4.1,
            1.5, 5.7, 4.9, 3.5,
            2.5, 3.1, 3.2, 3.4});
        ar = Regress.ANOVA1(Data,out signprob,0.05);
        // ar = (SS1:12.771875; SS2:82.1475; SSTotal:94.919375;
        // Deg1:3; Deg2:12; DegTotal:15; MS1:4.2572916667;
        // MS2:6.845625; FDist:0.62189963176; FCrit:3.4902948195
        // signprob = 0.614256442
    }
}

Overload 2: TANOVA1Result ANOVA1(TVec Data, TVecInt GroupIndex, ref Double p, Double Alpha)

Perform the one-way analysis of variance where Data vector (one variable) is indexed by a second grouping GroupIndex vector variable.

#NameDescription
1DataData vector of single variable.
2AlphaDesired significance level.
3GroupIndexStores group indexes.
4pReturns the significance probability of null hypothesis that two means are equal. If p is less than desired significance alpha then the result suggests the null hypothesis (two means are equal) can be rejected.

Returns: TANOVA1Result

Examples
using Dew.Math;
using Dew.Stats;
using Dew.Stats.Units;
namespace Dew.Examples
{
    private void Example()
    {
        Vector Data = new Vector(0);
        Vector GroupIndex = new Vector(0);
        double signprob;
        TANOVA1Result ar;
        Data.SetIt(false, new double[] {1,2,3,4,5,6,7,8,9,10,11,12});
        GroupIndex.SetIt(false, new double[] {0,0,0,0,1,1,1,1,2,2,2,2});
        ar = Regress.ANOVA1(Data,GroupIndex,out signprob,0.05);
        // ANOVARes = (SS1:128; SS2:15; SSTotal:143;
        // Deg1:2; Deg2:9; DegTotal:11; MS1:64;
        // MS2:1.6666666667; FDist:38.4; FCrit:4.2564947291)
        // signprob = 3.9210149408e-05
    }
}
See Also: Regress.ANOVA2