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 | zbooleandetermines(List<Node> z, Node x) doublegetAlpha()Returns the model significance level.getData()Returns the data set being analyzed.doubleReturns 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.doublegetWidth()Returns the kernel width.indTestSubset(List<Node> vars) Returns an Independence test for a sublist of the variables.booleanReturns true if verbose output should be printed.voidsetAlpha(double alpha) Sets the significance level at which independence judgments should be made.voidSets the basis used for the calculation.voidSets the kernel to be used.voidsetKernelMultiplier(double multiplier) Returns the kernel multiplier.voidsetKernelRegressionSampleSize(int size) Sets the kernel regression sample size.voidsetNumFunctions(int numFunctions) Sets the number of orthogonal functions to use to do the calculations.voidsetVerbose(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, waitMethods 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:IndependenceTestReturns an Independence test for a sublist of the variables.- Specified by:
indTestSubsetin interfaceIndependenceTest- Parameters:
vars- The sublist of variables.- Throws:
UnsupportedOperationException- This method is not implemented.
-
checkIndependence
Checks the independence of x _||_ y | z- Specified by:
checkIndependencein 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:
getAlphain 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:
setAlphain 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:
getVariablesin interfaceIndependenceTest- Returns:
- This list.
-
determines
- Throws:
UnsupportedOperationException- Since such code is not available.
-
getData
Returns the data set being analyzed.- Specified by:
getDatain interfaceIndependenceTest- Returns:
- This dataset.
- See Also:
-
toString
Returns a string representation of this test.- Specified by:
toStringin interfaceIndependenceTest- Overrides:
toStringin classObject- Returns:
- This string.
-
isVerbose
public boolean isVerbose()Returns true if verbose output should be printed.- Specified by:
isVerbosein interfaceIndependenceTest- Returns:
- True if the case.
-
setVerbose
public void setVerbose(boolean verbose) Sets whether verbose output should be printed.- Specified by:
setVerbosein 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.
-