Class IndTestFisherZPercentIndependent
java.lang.Object
edu.cmu.tetrad.search.work_in_progress.IndTestFisherZPercentIndependent
- All Implemented Interfaces:
IndependenceTest
Calculates independence from pooled residuals.
- Version:
- $Id: $Id
- Author:
- josephramsey
-
Constructor Summary
ConstructorsConstructorDescriptionIndTestFisherZPercentIndependent
(List<DataSet> dataSets, double alpha) Initializes an object of the class IndTestFisherZPercentIndependent. -
Method Summary
Modifier and TypeMethodDescriptioncheckIndependence
(Node x, Node y, Set<Node> _z) Checks the independence between two nodes x and y given a set of conditioning nodes z.boolean
determines
(List z, Node x) Determines the independence between a list of conditioning variables (z) and a target variable (x).double
getAlpha()
Gets the getModel significance level.getCov()
Retrieves the covariance matrix.getData()
Retrieves the data set from the method.Retrieves the list of data sets.double
Returns the percentage value.int[]
getRows()
Retrieves the array of row indices.int
Retrieves the sample size of the data set.Getter for the fieldvariables
.indTestSubset
(List<Node> vars) Performs an independence test on a subset of variables.boolean
Returns the value of the verbose flag.void
setAlpha
(double alpha) Sets the significance level for the independence test.void
setFdr
(boolean fdr) Sets the value of the fdr field.void
setPercent
(double percent) Sets the percentage value.void
setVerbose
(boolean verbose) Sets the verbose flag.toString()
Returns a string representation of this object.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, getVariable, getVariableNames
-
Constructor Details
-
IndTestFisherZPercentIndependent
Initializes an object of the class IndTestFisherZPercentIndependent.- Parameters:
dataSets
- The list of data sets to be used for the independence test.alpha
- The significance level for the independence test. Must be between 0.0 and 1.0 (inclusive).- Throws:
IllegalArgumentException
- If alpha is not within the valid range.
-
-
Method Details
-
indTestSubset
Performs an independence test on a subset of variables.- Specified by:
indTestSubset
in interfaceIndependenceTest
- Parameters:
vars
- The sublist of variables to test for independence.- Returns:
- The result of the independence test.
-
checkIndependence
Checks the independence between two nodes x and y given a set of conditioning nodes z.- Specified by:
checkIndependence
in interfaceIndependenceTest
- Parameters:
x
- The first node.y
- The second node._z
- The set of conditioning nodes.- Returns:
- The result of the independence test.
- See Also:
-
getAlpha
public double getAlpha()Gets the getModel significance level.- Specified by:
getAlpha
in interfaceIndependenceTest
- Returns:
- a double
-
setAlpha
public void setAlpha(double alpha) Sets the significance level for the independence test.- Specified by:
setAlpha
in interfaceIndependenceTest
- Parameters:
alpha
- The significance level to set. Must be between 0.0 and 1.0 (inclusive).- Throws:
IllegalArgumentException
- if alpha is not within the valid range.
-
getVariables
Getter for the field
variables
.- Specified by:
getVariables
in interfaceIndependenceTest
- Returns:
- the list of variables over which this independence checker is capable of determinine independence relations-- that is, all the variables in the given graph or the given data set.
-
determines
Determines the independence between a list of conditioning variables (z) and a target variable (x).- Parameters:
z
- The list of conditioning variables.x
- The target variable.- Returns:
- True if the target variable is independent of the conditioning variables, otherwise False.
- Throws:
UnsupportedOperationException
- if the operation is not supported.
-
getData
Retrieves the data set from the method.- Specified by:
getData
in interfaceIndependenceTest
- Returns:
- The data set obtained.
- See Also:
-
getCov
Retrieves the covariance matrix.- Specified by:
getCov
in interfaceIndependenceTest
- Returns:
- The covariance matrix.
-
getDataSets
Retrieves the list of data sets.- Specified by:
getDataSets
in interfaceIndependenceTest
- Returns:
- The list of data sets.
-
getSampleSize
public int getSampleSize()Retrieves the sample size of the data set.- Specified by:
getSampleSize
in interfaceIndependenceTest
- Returns:
- The sample size of the data set.
-
toString
Returns a string representation of this object.- Specified by:
toString
in interfaceIndependenceTest
- Overrides:
toString
in classObject
- Returns:
- The string representation of this object.
-
getRows
public int[] getRows()Retrieves the array of row indices.- Returns:
- The array of row indices represented by an int array.
-
getPercent
public double getPercent()Returns the percentage value.- Returns:
- The percentage value.
-
setPercent
public void setPercent(double percent) Sets the percentage value.- Parameters:
percent
- The percentage value to set. Must be between 0.0 and 1.0 (inclusive).- Throws:
IllegalArgumentException
- if percent is not within the valid range.
-
setFdr
public void setFdr(boolean fdr) Sets the value of the fdr field.- Parameters:
fdr
- The new value of the fdr field.
-
isVerbose
public boolean isVerbose()Returns the value of the verbose flag.- Specified by:
isVerbose
in interfaceIndependenceTest
- Returns:
- True if verbose mode is enabled, False otherwise.
-
setVerbose
public void setVerbose(boolean verbose) Sets the verbose flag.- Specified by:
setVerbose
in interfaceIndependenceTest
- Parameters:
verbose
- True if verbose mode is enabled, False otherwise.
-