Package edu.cmu.tetrad.search.test
Class ChiSquareTest.Result
java.lang.Object
edu.cmu.tetrad.search.test.ChiSquareTest.Result
- Enclosing class:
- ChiSquareTest
Simple class to store the parameters of the result returned by the G Square test.
- Author:
- Frank Wimberly
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionintgetDf()Returns the adjusted degrees of freedom, or -1 if the degrees of freedom cannot be determined.doubleReturns the pValue of the result, or NaN if the p-value cannot be determined.doubleReturns the chi square value, or NaN if the chi square value cannot be determined.booleanisIndep()Returns whether the conditional independence holds or not.booleanisValid()Returns whether the result is valid or not.
- 
Constructor Details- 
Resultpublic Result(double chiSquare, double pValue, int df, boolean isIndep) Constructs a new g square result using the given parameters.- Parameters:
- chiSquare- The chi square value.
- pValue- The pValue of the result.
- df- The adjusted degrees of freedom.
- isIndep- Whether the conditional independence holds or not. (True if it does, false if it doesn't.)
 
- 
Resultpublic Result(double chiSquare, double pValue, int df, boolean isIndep, boolean isValid) Constructs a new g square result using the given parameters.- Parameters:
- chiSquare- The chi square value.
- pValue- The pValue of the result.
- df- The adjusted degrees of freedom.
- isIndep- Whether the conditional independence holds or not. (True if it does, false if it doesn't.)
- isValid- Whether the result is isValid or not.
 
 
- 
- 
Method Details- 
getXSquarepublic double getXSquare()Returns the chi square value, or NaN if the chi square value cannot be determined.- Returns:
- the chi square value.
 
- 
getPValuepublic double getPValue()Returns the pValue of the result, or NaN if the p-value cannot be determined.- Returns:
- the pValue of the result.
 
- 
getDfpublic int getDf()Returns the adjusted degrees of freedom, or -1 if the degrees of freedom cannot be determined.- Returns:
- the adjusted degrees of freedom.
 
- 
isIndeppublic boolean isIndep()Returns whether the conditional independence holds or not. (True if it does, false if it doesn't.) For invalid results, this method returns a value set by the test.- Returns:
- whether the conditional independence holds or not.
 
- 
isValidpublic boolean isValid()Returns whether the result is valid or not. A result is valid if its judgment of independence is not indeterminate.- Returns:
- whether the result is valid or not.
 
 
-