Class IndTestCramerT

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

@Deprecated(since="7.9", forRemoval=false) public final class IndTestCramerT extends Object implements IndependenceTest
Deprecated.
Checks conditional independence for continuous variables using Cramer's T-test formula (Cramer, Mathematical Methods of Statistics (1951), page 413).
Version:
$Id: $Id
Author:
josephramsey
  • Constructor Summary

    Constructors
    Constructor
    Description
    IndTestCramerT(CorrelationMatrix covMatrix, double alpha)
    Deprecated.
    Constructs a new independence test that will determine conditional independence facts using the given correlation matrix and the given significance level.
    IndTestCramerT(DataSet dataSet, double alpha)
    Deprecated.
    Constructs a new Independence test which checks independence facts based on the correlation matrix implied by the given data set (must be continuous).
    IndTestCramerT(ICovarianceMatrix covMatrix, double alpha)
    Deprecated.
    Constructs a new independence test that will determine conditional independence facts using the given correlation matrix and the given significance level.
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated.
    Checks the independence between two nodes given a set of conditioning nodes.
    boolean
    Deprecated.
    Determines whether the given variables are conditionally independent.
    double
    Deprecated.
    Getter for the field alpha.
    Deprecated.
    Retrieves the dataset used in the independence test.
    double
    Deprecated.
    Calculates the p-value for the independence test.
    Deprecated.
    Retrieves the list of variables used in the independence test.
    Deprecated.
    This method performs an independence test based on a given sublist of variables.
    boolean
    Deprecated.
    Determines if verbose output is enabled or disabled.
    void
    setAlpha(double alpha)
    Deprecated.
    Sets the significance level for the independence test.
    void
    setVerbose(boolean verbose)
    Deprecated.
    Sets the verbose flag to determine if verbose output should be enabled or disabled.
    Deprecated.
    Returns a string representation of the object.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface edu.cmu.tetrad.search.test.IndependenceTest

    checkIndependence, determines, getCov, getDataSets, getSampleSize, getVariable, getVariableNames
  • Constructor Details

    • IndTestCramerT

      public IndTestCramerT(DataSet dataSet, double alpha)
      Deprecated.
      Constructs a new Independence test which checks independence facts based on the correlation matrix implied by the given data set (must be continuous). The given significance level is used.
      Parameters:
      dataSet - A data set with all continuous columns.
      alpha - the alpha level of the test.
    • IndTestCramerT

      public IndTestCramerT(CorrelationMatrix covMatrix, double alpha)
      Deprecated.
      Constructs a new independence test that will determine conditional independence facts using the given correlation matrix and the given significance level.
      Parameters:
      covMatrix - a CorrelationMatrix object
      alpha - a double
    • IndTestCramerT

      public IndTestCramerT(ICovarianceMatrix covMatrix, double alpha)
      Deprecated.
      Constructs a new independence test that will determine conditional independence facts using the given correlation matrix and the given significance level.
      Parameters:
      covMatrix - a ICovarianceMatrix object
      alpha - a double
  • Method Details

    • indTestSubset

      public IndependenceTest indTestSubset(List<Node> vars)
      Deprecated.
      This method performs an independence test based on a given sublist of variables.
      Specified by:
      indTestSubset in interface IndependenceTest
      Parameters:
      vars - The sublist of variables to perform the independence test on.
      Returns:
      An IndependenceTest object representing the results of the test.
      Throws:
      IllegalArgumentException - If the sublist of variables is empty or contains variables that are not original variables.
    • checkIndependence

      public IndependenceResult checkIndependence(Node x, Node y, Set<Node> _z)
      Deprecated.
      Checks the independence between two nodes given a set of conditioning nodes.
      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 check.
      Throws:
      NullPointerException - If _z is null or contains null elements.
      IllegalArgumentException - If the submatrix contains missing values.
      RuntimeException - If the submatrix is singular or the p-value is undefined.
    • getPValue

      public double getPValue()
      Deprecated.
      Calculates the p-value for the independence test. The p-value is calculated by integrating the probability density function (pdf) over the range of storedR (absolute value) to 1.0 with 100 intervals, and then multiplying the result by 2.0.
      Returns:
      the p-value for the independence test.
    • getAlpha

      public double getAlpha()
      Deprecated.

      Getter for the field alpha.

      Specified by:
      getAlpha in interface IndependenceTest
      Returns:
      the getModel significance level.
    • setAlpha

      public void setAlpha(double alpha)
      Deprecated.
      Sets the significance level for the independence test.
      Specified by:
      setAlpha in interface IndependenceTest
      Parameters:
      alpha - The significance level, must be between 0.0 and 1.0 (inclusive).
      Throws:
      IllegalArgumentException - If the significance level is out of range.
    • getVariables

      public List<Node> getVariables()
      Deprecated.
      Retrieves the list of variables used in the independence test.
      Specified by:
      getVariables in interface IndependenceTest
      Returns:
      A list of Node objects representing the variables used in the test.
    • determines

      public boolean determines(List<Node> z, Node x) throws UnsupportedOperationException
      Deprecated.
      Determines whether the given variables are conditionally independent.
      Parameters:
      z - The set of conditioning nodes.
      x - The target node.
      Returns:
      true if the variables are conditionally independent, false otherwise.
      Throws:
      UnsupportedOperationException - If a matrix operation fails.
    • getData

      public DataSet getData()
      Deprecated.
      Retrieves the dataset used in the independence test.
      Specified by:
      getData in interface IndependenceTest
      Returns:
      The dataset used in the independence test.
    • toString

      public String toString()
      Deprecated.
      Returns a string representation of the object.
      Specified by:
      toString in interface IndependenceTest
      Overrides:
      toString in class Object
      Returns:
      A string representation of the object.
    • isVerbose

      public boolean isVerbose()
      Deprecated.
      Determines if verbose output is enabled or disabled.
      Specified by:
      isVerbose in interface IndependenceTest
      Returns:
      true if verbose output is enabled, false otherwise.
    • setVerbose

      public void setVerbose(boolean verbose)
      Deprecated.
      Sets the verbose flag to determine if verbose output should be enabled or disabled.
      Specified by:
      setVerbose in interface IndependenceTest
      Parameters:
      verbose - True if the verbose output should be enabled, false otherwise.