You are here: Symbol Reference > Dew.Stats Namespace > Regress Class > Regress Methods > ANOVA1 Method > ANOVA1 Method (TMtx, TSample, TSample)
Dew Stats for .NET
Contents
PreviousUpNext
Regress.ANOVA1 Method (TMtx, TSample, TSample)

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

C#
public TANOVA1Result ANOVA1(TMtx Data, ref double p, double alpha);
Parameters
Parameters 
Description 
Data 
Data matrix, each column is separate group. 

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

The following example will perform ANOVA1 on 4 variables.

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
  }
}
What do you think about this topic? Send feedback!
Copyright (c) 1999-2010 by Dew Research. All rights reserved.