You are here: Symbol Reference > Dew.Stats Namespace > Regress Class > Regress Methods > ANOVA2 Method
Dew Stats for .NET
Contents
C# Example 2

This example shows the ANOVA on data with Replications set to 2 meaning there are two rows/cols per "cell".

using Dew.Math;
using Dew.Stats;
using Dew.Stats.Units;
namespace Dew.Examples
{
  private void Example()
  {
    Matrix Data = new Matrix(0,0);
    Data.SetIt(4,4,false, new double[] {2.5, 3.2, 4.2, 3.9,
             1.9, 3.5, 3.6, 3.7,
             3.4, 3.5, 3.3, 3.4,
             4.2, 5.0, 3.1, 2.4});
    TANOVA2Result ar = Regress.ANOVA2(Data,out prows, out pcols, ount pinteract, 2, 0.05);
    // ar =(SS1:0.2025; SS2:1.37; SS3:4.4675; SS4:2.39; SSTotal:8.43 ;
    // Deg1: 1; Deg2:3 ; Deg3:3; Deg4:8 ; DegTotal:15 ;
    // MS1:0.2025 ; MS2:0.45666666667 ; MS3:1.4891666667 ; MS4:0.29875 ;
    // FDist1:0.060496875 ; FDist2:0.13642916667 ; FDist3:0.44488854167 ;
    // FCrit1:5.3176550716 ; FCrit2:4.0661805514 ; FCrit3:4.0661805514 ;
    // pRows: 0.81190529881
    // pCols: 0.93549639694
    // pInteract: 0.72753486979
  }
}
Copyright (c) 1999-2010 by Dew Research. All rights reserved.