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 SummaryConstructorsConstructorDescriptionIndTestConditionalCorrelation(DataSet dataSet, double alpha, double scalingFactor, int basisType, double basisScale, int numFunctions) Constructs a newIndTestConditionalCorrelationto check independence based on conditional correlations derived from the given continuous data set.
- 
Method SummaryModifier and TypeMethodDescriptioncheckIndependence(Node x, Node y, Set<Node> z) Checks the independence of x _||_ y | zdoublegetAlpha()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).booleanReturns true if verbose output should be printed.voidsetAlpha(double alpha) Sets the significance level for the test.voidSets the rows to use for the test.voidsetVerbose(boolean verbose) Sets whether verbose output should be printed.toString()Returns a string representation of this test.Methods inherited from class java.lang.Objectequals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface edu.cmu.tetrad.search.IndependenceTestcheckIndependence, determines, getCov, getDataSets, getSampleSize, getVariable, getVariableNames
- 
Constructor Details- 
IndTestConditionalCorrelationpublic IndTestConditionalCorrelation(DataSet dataSet, double alpha, double scalingFactor, int basisType, double basisScale, int numFunctions) Constructs a newIndTestConditionalCorrelationto check independence based on conditional correlations derived from the given continuous data set. The test uses the specified significance level and allows customization of basis settings and a scaling factor.- Parameters:
- dataSet- The continuous data set for performing independence tests.
- alpha- The significance level for the test (must be between 0 and 1 inclusive).
- scalingFactor- The scaling factor applied in the independence test computations.
- basisType- The type of basis functions used in the computations.
- basisScale- The scale of the basis functions applied in computations.
- numFunctions- The number of orthogonal functions used for the calculations.
- Throws:
- IllegalArgumentException- if the data set is not continuous.
- IllegalArgumentException- if the significance level (alpha) is not in the range [0, 1].
 
 
- 
- 
Method Details- 
indTestSubsetConstructs 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:
- indTestSubsetin interface- IndependenceTest
- Parameters:
- vars- The sublist of variables.
- Returns:
- a IndependenceTestobject
 
- 
checkIndependenceChecks the independence of x _||_ y | z- Specified by:
- checkIndependencein interface- IndependenceTest
- Parameters:
- x- a- Nodeobject
- y- a- Nodeobject
- z- a- Setobject
- Returns:
- a IndependenceResultobject
- See Also:
 
- 
getAlphapublic double getAlpha()Returns the model significance level.- Specified by:
- getAlphain interface- IndependenceTest
- Returns:
- This level.
 
- 
setAlphapublic void setAlpha(double alpha) Sets the significance level for the test. The significance level (alpha) must be a value between 0 and 1, inclusive.- Specified by:
- setAlphain interface- IndependenceTest
- Parameters:
- alpha- The new significance level to be set for the test. This value determines the threshold for statistical significance in the independence test computations.
 
- 
getVariablesReturns 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 interface- IndependenceTest
- Returns:
- This list.
 
- 
getDataReturns the data set being analyzed.- Specified by:
- getDatain interface- IndependenceTest
- Returns:
- This dataset.
 
- 
toStringReturns a string representation of this test.- Specified by:
- toStringin interface- IndependenceTest
- Overrides:
- toStringin class- Object
- Returns:
- This string.
 
- 
isVerbosepublic boolean isVerbose()Returns true if verbose output should be printed.- Specified by:
- isVerbosein interface- IndependenceTest
- Returns:
- True if the case.
 
- 
setVerbosepublic void setVerbose(boolean verbose) Sets whether verbose output should be printed.- Specified by:
- setVerbosein interface- IndependenceTest
- Parameters:
- verbose- True, if so.
 
- 
getRowsReturns 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:
- getRowsin interface- RowsSettable
- Returns:
- This number.
 
- 
setRowsSets the rows to use for the test.- Specified by:
- setRowsin interface- RowsSettable
- Parameters:
- rows- The rows.
 
 
-