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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getDf()
Returns the adjusted degrees of freedom, or -1 if the degrees of freedom cannot be determined.double
Returns the pValue of the result, or NaN if the p-value cannot be determined.double
Returns the chi square value, or NaN if the chi square value cannot be determined.boolean
isIndep()
Returns whether the conditional independence holds or not.boolean
isValid()
Returns whether the result is valid or not.
-
Constructor Details
-
Result
public 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.)
-
Result
public 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
-
getXSquare
public double getXSquare()Returns the chi square value, or NaN if the chi square value cannot be determined.- Returns:
- the chi square value.
-
getPValue
public double getPValue()Returns the pValue of the result, or NaN if the p-value cannot be determined.- Returns:
- the pValue of the result.
-
getDf
public int getDf()Returns the adjusted degrees of freedom, or -1 if the degrees of freedom cannot be determined.- Returns:
- the adjusted degrees of freedom.
-
isIndep
public 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.
-
isValid
public 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.
-