Package edu.cmu.tetrad.search
Class GSquareTest
java.lang.Object
edu.cmu.tetrad.search.GSquareTest
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classSimple class to store the parameters of the result returned by the G Square test. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncalcGSquare(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.doublegetAlpha()int[]getDims()booleanisDetermined(int[] testIndices, double p) int[]selectFromArray(int[] arr, int[] indices) voidsetAlpha(double alpha) Sets the significance level to be used for tests.
-
Constructor Details
-
GSquareTest
-
-
Method Details
-
calcGSquare
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
-
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
-
isDetermined
public boolean isDetermined(int[] testIndices, double p)
-