Package edu.cmu.tetrad.search.test
Class IndTestConditionalCorrelation
java.lang.Object
edu.cmu.tetrad.search.test.IndTestConditionalCorrelation
- All Implemented Interfaces:
IndependenceTest
,RowsSettable
public final class IndTestConditionalCorrelation
extends Object
implements IndependenceTest, RowsSettable
Checks conditional independence of variable in a continuous data set using a conditional correlation test for the
nonlinear nonGaussian with the additive error case. This is for additive (but otherwise general) models.
- Version:
- $Id: $Id
- Author:
- josephramsey
-
Constructor Summary
ConstructorsConstructorDescriptionIndTestConditionalCorrelation
(DataSet dataSet, double alpha, double scalingFactor, int basisType, int numFunctions, double basisScale) Constructs a new Independence test which checks independence facts based on the correlation data implied by the given data set (must be continuous). -
Method Summary
Modifier and TypeMethodDescriptioncheckIndependence
(Node x, Node y, Set<Node> z) Checks the independence of x _||_ y | zdouble
getAlpha()
Returns the model significance level.getData()
Returns the data set being analyzed.getRows()
Returns the number of orthogonal functions used to do the calculations.Returns the list of variables over which this independence checker is capable of determining independence relations-- that is, all the variables in the given graph or the given data set.indTestSubset
(List<Node> vars) Constructs a new Independence test which checks independence facts based on the correlation data implied by the given data set (must be continuous).boolean
Returns true if verbose output should be printed.void
Sets the rows to use for 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, setAlpha
-
Constructor Details
-
IndTestConditionalCorrelation
public IndTestConditionalCorrelation(DataSet dataSet, double alpha, double scalingFactor, int basisType, int numFunctions, double basisScale) Constructs a new Independence test which checks independence facts based on the correlation data implied by the given data set (must be continuous). The given significance level is used.- Parameters:
dataSet
- A data set containing only continuous columns.alpha
- The q level of the test.basisScale
-
-
-
Method Details
-
indTestSubset
Constructs a new Independence test which checks independence facts based on the correlation data implied by the given data set (must be continuous). The given significance level is used.- Specified by:
indTestSubset
in interfaceIndependenceTest
- Parameters:
vars
- The sublist of variables.- Returns:
- a
IndependenceTest
object
-
checkIndependence
Checks the independence of x _||_ y | z- Specified by:
checkIndependence
in interfaceIndependenceTest
- Parameters:
x
- aNode
objecty
- aNode
objectz
- aSet
object- Returns:
- a
IndependenceResult
object - See Also:
-
getAlpha
public double getAlpha()Returns the model significance level.- Specified by:
getAlpha
in interfaceIndependenceTest
- Returns:
- This level.
-
getVariables
Returns the list of variables over which this independence checker is capable of determining independence relations-- that is, all the variables in the given graph or the given data set.- Specified by:
getVariables
in interfaceIndependenceTest
- Returns:
- This list.
-
getData
Returns the data set being analyzed.- Specified by:
getData
in interfaceIndependenceTest
- Returns:
- This dataset.
- 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 if 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 number of orthogonal functions used to do the calculations. The sets used are the polynomial basis functions, x, x^2, x^3, etc. This choice is made to allow for more flexible domains of the functions after standardization.- Specified by:
getRows
in interfaceRowsSettable
- Returns:
- This number.
-
setRows
Sets the rows to use for the test.- Specified by:
setRows
in interfaceRowsSettable
- Parameters:
rows
- The rows.
-