Package edu.cmu.tetrad.search.test
Class IndTestConditionalCorrelation
java.lang.Object
edu.cmu.tetrad.search.test.IndTestConditionalCorrelation
- All Implemented Interfaces:
IndependenceTest
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.
- Author:
- josephramsey
-
Constructor Summary
ConstructorsConstructorDescriptionIndTestConditionalCorrelation
(DataSet dataSet, double alpha) 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 | zboolean
determines
(List<Node> z, Node x) double
getAlpha()
Returns the model significance level.getData()
Returns the data set being analyzed.double
Returns the p-value of the test.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.double
getWidth()
Returns the kernel width.indTestSubset
(List<Node> vars) Returns an Independence test for a sublist of the variables.boolean
Returns true if verbose output should be printed.void
setAlpha
(double alpha) Sets the significance level at which independence judgments should be made.void
Sets the basis used for the calculation.void
Sets the kernel to be used.void
setKernelMultiplier
(double multiplier) Returns the kernel multiplier.void
setKernelRegressionSampleSize
(int size) Sets the kernel regression sample size.void
setNumFunctions
(int numFunctions) Sets the number of orthogonal functions to use to do the calculations.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
clone, equals, finalize, 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
-
IndTestConditionalCorrelation
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.
-
-
Method Details
-
indTestSubset
Description copied from interface:IndependenceTest
Returns an Independence test for a sublist of the variables.- Specified by:
indTestSubset
in interfaceIndependenceTest
- Parameters:
vars
- The sublist of variables.- Throws:
UnsupportedOperationException
- This method is not implemented.
-
checkIndependence
Checks the independence of x _||_ y | z- Specified by:
checkIndependence
in interfaceIndependenceTest
- Returns:
- the result.
- See Also:
-
getPValue
public double getPValue()Returns the p-value of the test.- Returns:
- The p-value.
-
getAlpha
public double getAlpha()Returns the model significance level.- Specified by:
getAlpha
in interfaceIndependenceTest
- Returns:
- This level.
-
setAlpha
public void setAlpha(double alpha) Sets the significance level at which independence judgments should be made. Affects the cutoff for partial correlations to be considered statistically equal to zero.- Specified by:
setAlpha
in interfaceIndependenceTest
- Parameters:
alpha
- The alpha 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.
-
determines
- Throws:
UnsupportedOperationException
- Since such code is not available.
-
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.
-
setNumFunctions
public void setNumFunctions(int numFunctions) Sets the number of orthogonal functions to use to do the calculations.- Parameters:
numFunctions
- This number.
-
getWidth
public double getWidth()Returns the kernel width.- Returns:
- This width.
-
setKernelMultiplier
public void setKernelMultiplier(double multiplier) Returns the kernel multiplier.- Parameters:
multiplier
- This multiplier.
-
setKernel
Sets the kernel to be used.- Parameters:
kernel
- This kernel.- See Also:
-
setBasis
Sets the basis used for the calculation.- Parameters:
basis
- This basis.- See Also:
-
setKernelRegressionSampleSize
public void setKernelRegressionSampleSize(int size) Sets the kernel regression sample size.- Parameters:
size
- This size.
-