Class GSquareTest

java.lang.Object
edu.cmu.tetrad.search.GSquareTest

public final class GSquareTest extends Object
Performs conditional independence tests of discrete data using the G Square method. Degrees of freedom are calculated as in Fienberg, The Analysis of Cross-Classified Categorical Data, 2nd Edition, 142.
Author:
Frank Wimberly original version, Joseph Ramsey revision 10/01
  • Constructor Details

    • GSquareTest

      public GSquareTest(DataSet dataSet, double alpha)
  • Method Details

    • calcGSquare

      public GSquareTest.Result calcGSquare(int[] testIndices)
      Calculates g square for a conditional crosstabulation table for independence question 0 _||_ 1 | 2, 3, ...max by summing up g square and degrees of freedom for each conditional table in turn, where rows or columns that consist entirely of zeros have been removed.
    • getDims

      public int[] getDims()
    • getCellTable

      public CellTable getCellTable()
    • getAlpha

      public double getAlpha()
      Returns:
      the getModel significance level being used for tests.
    • setAlpha

      public void setAlpha(double alpha)
      Sets the significance level to be used for tests.
    • selectFromArray

      public int[] selectFromArray(int[] arr, int[] indices)
    • getDataSet

      public DataSet getDataSet()
    • isDetermined

      public boolean isDetermined(int[] testIndices, double p)