Package edu.cmu.tetrad.search.test
Class IndTestDegenerateGaussianLrt
java.lang.Object
edu.cmu.tetrad.search.test.IndTestDegenerateGaussianLrt
- All Implemented Interfaces:
IndependenceTest
,RowsSettable
Implements a degenerate Gaussian score as a LRT. The reference is here:
Andrews, B., Ramsey, J., & Cooper, G. F. (2019, July). Learning high-dimensional directed acyclic graphs with mixed data-types. In The 2019 ACM SIGKDD Workshop on Causal Discovery (pp. 4-21). PMLR.
- Version:
- $Id: $Id
- Author:
- Bryan Andrews
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Stores a return value for a likelihood--i.e., a likelihood value and the degrees of freedom for it. -
Constructor Summary
ConstructorsConstructorDescriptionIndTestDegenerateGaussianLrt
(DataSet dataSet) Constructs the score using a covariance matrix. -
Method Summary
Modifier and TypeMethodDescriptioncheckIndependence
(Node x, Node y, Set<Node> _z) Returns an independence result specifying whether x _||_ y | Z and what its p-values are.double
getAlpha()
Returns the significance level of the independence test.getData()
Returns the dataset being analyzed.double
Returns the probability associated with the most recently executed independence test, of Double.NaN if p value is not meaningful for this test.getRows()
Returns the rows used in the test.Returns the list of searchVariables over which this independence checker is capable of determinining independence relations.indTestSubset
(List<Node> vars) Subsets the variables used in the independence test.boolean
Returns true iff verbose output should be printed.void
setAlpha
(double alpha) Sets the significance level.void
Allows the user to set which rows are used in the test.void
setVerbose
(boolean verbose) Sets whether verbose output should be printed.toString()
Returns a string representation of this test.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface edu.cmu.tetrad.search.IndependenceTest
checkIndependence, determines, getCov, getDataSets, getSampleSize, getVariable, getVariableNames
-
Constructor Details
-
IndTestDegenerateGaussianLrt
Constructs the score using a covariance matrix.- Parameters:
dataSet
- The data being analyzed.
-
-
Method Details
-
indTestSubset
Subsets the variables used in the independence test.- Specified by:
indTestSubset
in interfaceIndependenceTest
- Parameters:
vars
- The sublist of variables.- Returns:
- The IndependenceTest object with subset of variables.
-
checkIndependence
Returns an independence result specifying whether x _||_ y | Z and what its p-values are.- Specified by:
checkIndependence
in interfaceIndependenceTest
- Parameters:
x
- aNode
objecty
- aNode
object_z
- aSet
object- Returns:
- a
IndependenceResult
object - See Also:
-
getPValue
public double getPValue()Returns the probability associated with the most recently executed independence test, of Double.NaN if p value is not meaningful for this test.- Returns:
- This p-value.
-
getVariables
Returns the list of searchVariables over which this independence checker is capable of determinining independence relations.- Specified by:
getVariables
in interfaceIndependenceTest
- Returns:
- This list.
-
getAlpha
public double getAlpha()Returns the significance level of the independence test.- Specified by:
getAlpha
in interfaceIndependenceTest
- Returns:
- this level.
-
setAlpha
public void setAlpha(double alpha) Sets the significance level.- Specified by:
setAlpha
in interfaceIndependenceTest
- Parameters:
alpha
- This level.
-
getData
Returns the dataset being analyzed.- Specified by:
getData
in interfaceIndependenceTest
- Returns:
- This data.
- See Also:
-
toString
Returns a string representation of this test.- Specified by:
toString
in interfaceIndependenceTest
- Overrides:
toString
in classObject
- Returns:
- This string.
-
isVerbose
public boolean isVerbose()Returns true iff verbose output should be printed.- Specified by:
isVerbose
in interfaceIndependenceTest
- Returns:
- True if the case.
-
setVerbose
public void setVerbose(boolean verbose) Sets whether verbose output should be printed.- Specified by:
setVerbose
in interfaceIndependenceTest
- Parameters:
verbose
- True, if so.
-
getRows
Returns the rows used in the test.- Specified by:
getRows
in interfaceRowsSettable
- Returns:
- The rows used in the test.
-
setRows
Allows the user to set which rows are used in the test. Otherwise, all rows are used, except those with missing values.- Specified by:
setRows
in interfaceRowsSettable
- Parameters:
rows
- The rows to use for the test. Can be null.
-