Class IndTestMulti
java.lang.Object
edu.cmu.tetrad.search.test.IndTestMulti
- All Implemented Interfaces:
IndependenceTest
A class that represents a pooled independence test for multiple data sets.
-
Constructor Summary
ConstructorsConstructorDescriptionIndTestMulti(List<IndependenceTest> independenceTests, ResolveSepsets.Method method) Constructs a new pooled independence test for the given data sets. -
Method Summary
Modifier and TypeMethodDescriptioncheckIndependence(Node x, Node y, Set<Node> z) Determines whether variable x is independent of variable y given a list of conditioning variables z.booleandetermines(List<Node> z, Node x) Determines whether variable x is independent of variable y given a list of conditioning variables z.doublegetAlpha()Returns the alpha of the component tests (they are required to agree; the first is reported).getData()Returns the data of the first component test; the pooled test has no single data set.Retrieves the list of independence tests managed by this instance.Retrieves the list of variables associated with this independence test.indTestSubset(List<Node> vars) Returns an Independence test for a sublist of the variables.booleanReturns true if the test prints verbose output.voidsetAlpha(double alpha) Sets the alpha level on every component test and clears the cache.voidsetVerbose(boolean verbose) Sets whether verbose output should be printed during the test.toString()Returns a string representation of this test.Methods inherited from interface IndependenceTest
canBeSubsampled, checkIndependence, determines, getCov, getDataSets, getMissingValueSupport, getSampleSize, getVariable, getVariableNames, isPValueAProbability
-
Constructor Details
-
IndTestMulti
Constructs a new pooled independence test for the given data sets.- Parameters:
independenceTests- the independence tests to pool.method- the method to use for pooling.- See Also:
-
-
Method Details
-
indTestSubset
Returns an Independence test for a sublist of the variables.- Specified by:
indTestSubsetin interfaceIndependenceTest- Parameters:
vars- The sublist of variables.- Returns:
- an
IndependenceTestobject
-
checkIndependence
public IndependenceResult checkIndependence(Node x, Node y, Set<Node> z) throws InterruptedException Determines whether variable x is independent of variable y given a list of conditioning variables z.- Specified by:
checkIndependencein interfaceIndependenceTest- Parameters:
x- aNodeobjecty- aNodeobjectz- aSetobject- Returns:
- a
IndependenceResultobject - Throws:
InterruptedException- If the process is interrupted during the execution.
-
getAlpha
public double getAlpha()Returns the alpha of the component tests (they are required to agree; the first is reported).- Specified by:
getAlphain interfaceIndependenceTest- Returns:
- the alpha level.
-
setAlpha
public void setAlpha(double alpha) Sets the alpha level on every component test and clears the cache.- Specified by:
setAlphain interfaceIndependenceTest- Parameters:
alpha- the alpha level.
-
getVariables
Description copied from interface:IndependenceTestRetrieves the list of variables associated with this independence test.- Specified by:
getVariablesin interfaceIndependenceTest- Returns:
- A list of
Nodeobjects representing the variables.
-
determines
Determines whether variable x is independent of variable y given a list of conditioning variables z.- Parameters:
z- A list of conditioning variables.x- The variable x.- Returns:
- True if variable x is independent of variable y given the conditioning variables z, false otherwise.
- Throws:
UnsupportedOperationException- if the method is not implemented.
-
getData
Returns the data of the first component test; the pooled test has no single data set.- Specified by:
getDatain interfaceIndependenceTest- Returns:
- the first component test's data.
-
getIndependenceTests
Retrieves the list of independence tests managed by this instance. The returned list is unmodifiable to ensure the integrity of the underlying data.- Returns:
- an unmodifiable list of
IndependenceTestobjects.
-
toString
Description copied from interface:IndependenceTestReturns a string representation of this test.- Specified by:
toStringin interfaceIndependenceTest- Overrides:
toStringin classObject- Returns:
- This string.
-
isVerbose
public boolean isVerbose()Returns true if the test prints verbose output.- Specified by:
isVerbosein interfaceIndependenceTest- Returns:
- True if the test prints verbose output, false otherwise.
-
setVerbose
public void setVerbose(boolean verbose) Sets whether verbose output should be printed during the test.- Specified by:
setVerbosein interfaceIndependenceTest- Parameters:
verbose- True to enable verbose output, false otherwise.
-