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.booleandetermines(List z, Node x) Determines the independence between a list of conditioning variables (z) and a target variable (x).doublegetAlpha()Gets the getModel significance level.getCov()Retrieves the covariance matrix.getData()Retrieves the data set from the method.Retrieves the list of data sets.doubleReturns the percentage value.int[]getRows()Retrieves the array of row indices.intRetrieves the sample size of the data set.Getter for the fieldvariables.indTestSubset(List<Node> vars) Performs an independence test on a subset of variables.booleanReturns the value of the verbose flag.voidsetAlpha(double alpha) Sets the significance level for the independence test.voidsetFdr(boolean fdr) Sets the value of the fdr field.voidsetPercent(double percent) Sets the percentage value.voidsetVerbose(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, waitMethods 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:
indTestSubsetin 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:
checkIndependencein 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:
getAlphain interfaceIndependenceTest- Returns:
- a double
-
setAlpha
public void setAlpha(double alpha) Sets the significance level for the independence test.- Specified by:
setAlphain 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:
getVariablesin 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:
getDatain interfaceIndependenceTest- Returns:
- The data set obtained.
- See Also:
-
getCov
Retrieves the covariance matrix.- Specified by:
getCovin interfaceIndependenceTest- Returns:
- The covariance matrix.
-
getDataSets
Retrieves the list of data sets.- Specified by:
getDataSetsin interfaceIndependenceTest- Returns:
- The list of data sets.
-
getSampleSize
public int getSampleSize()Retrieves the sample size of the data set.- Specified by:
getSampleSizein interfaceIndependenceTest- Returns:
- The sample size of the data set.
-
toString
Returns a string representation of this object.- Specified by:
toStringin interfaceIndependenceTest- Overrides:
toStringin 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:
isVerbosein interfaceIndependenceTest- Returns:
- True if verbose mode is enabled, False otherwise.
-
setVerbose
public void setVerbose(boolean verbose) Sets the verbose flag.- Specified by:
setVerbosein interfaceIndependenceTest- Parameters:
verbose- True if verbose mode is enabled, False otherwise.
-