Class IndTestFisherZPercentIndependent

java.lang.Object
edu.cmu.tetrad.search.work_in_progress.IndTestFisherZPercentIndependent
All Implemented Interfaces:
IndependenceTest

public final class IndTestFisherZPercentIndependent extends Object implements IndependenceTest
Calculates independence from pooled residuals.
Version:
$Id: $Id
Author:
josephramsey
  • Constructor Details

    • IndTestFisherZPercentIndependent

      public IndTestFisherZPercentIndependent(List<DataSet> dataSets, double alpha)
      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

      public IndependenceTest indTestSubset(List<Node> vars)
      Performs an independence test on a subset of variables.
      Specified by:
      indTestSubset in interface IndependenceTest
      Parameters:
      vars - The sublist of variables to test for independence.
      Returns:
      The result of the independence test.
    • checkIndependence

      public IndependenceResult checkIndependence(Node x, Node y, Set<Node> _z)
      Checks the independence between two nodes x and y given a set of conditioning nodes z.
      Specified by:
      checkIndependence in interface IndependenceTest
      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 interface IndependenceTest
      Returns:
      a double
    • setAlpha

      public void setAlpha(double alpha)
      Sets the significance level for the independence test.
      Specified by:
      setAlpha in interface IndependenceTest
      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

      public List<Node> getVariables()

      Getter for the field variables.

      Specified by:
      getVariables in interface IndependenceTest
      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

      public boolean determines(List z, Node x) throws UnsupportedOperationException
      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

      public DataSet getData()
      Retrieves the data set from the method.
      Specified by:
      getData in interface IndependenceTest
      Returns:
      The data set obtained.
      See Also:
    • getCov

      public ICovarianceMatrix getCov()
      Retrieves the covariance matrix.
      Specified by:
      getCov in interface IndependenceTest
      Returns:
      The covariance matrix.
    • getDataSets

      public List<DataSet> getDataSets()
      Retrieves the list of data sets.
      Specified by:
      getDataSets in interface IndependenceTest
      Returns:
      The list of data sets.
    • getSampleSize

      public int getSampleSize()
      Retrieves the sample size of the data set.
      Specified by:
      getSampleSize in interface IndependenceTest
      Returns:
      The sample size of the data set.
    • toString

      public String toString()
      Returns a string representation of this object.
      Specified by:
      toString in interface IndependenceTest
      Overrides:
      toString in class Object
      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 interface IndependenceTest
      Returns:
      True if verbose mode is enabled, False otherwise.
    • setVerbose

      public void setVerbose(boolean verbose)
      Sets the verbose flag.
      Specified by:
      setVerbose in interface IndependenceTest
      Parameters:
      verbose - True if verbose mode is enabled, False otherwise.