Class IndTestConditionalCorrelation

java.lang.Object
edu.cmu.tetrad.search.test.IndTestConditionalCorrelation
All Implemented Interfaces:
IndependenceTest

public final class IndTestConditionalCorrelation extends Object implements IndependenceTest
Checks conditional independence of variable in a continuous data set using a conditional correlation test for the nonlinear nonGaussian with the additive error case. This is for additive (but otherwise general) models.
Author:
josephramsey
  • Constructor Details

    • IndTestConditionalCorrelation

      public IndTestConditionalCorrelation(DataSet dataSet, double alpha)
      Constructs a new Independence test which checks independence facts based on the correlation data implied by the given data set (must be continuous). The given significance level is used.
      Parameters:
      dataSet - A data set containing only continuous columns.
      alpha - The q level of the test.
  • Method Details

    • indTestSubset

      public IndependenceTest indTestSubset(List<Node> vars)
      Description copied from interface: IndependenceTest
      Returns an Independence test for a sublist of the variables.
      Specified by:
      indTestSubset in interface IndependenceTest
      Parameters:
      vars - The sublist of variables.
      Throws:
      UnsupportedOperationException - This method is not implemented.
    • checkIndependence

      public IndependenceResult checkIndependence(Node x, Node y, Set<Node> z)
      Checks the independence of x _||_ y | z
      Specified by:
      checkIndependence in interface IndependenceTest
      Returns:
      the result.
      See Also:
    • getPValue

      public double getPValue()
      Returns the p-value of the test.
      Returns:
      The p-value.
    • getAlpha

      public double getAlpha()
      Returns the model significance level.
      Specified by:
      getAlpha in interface IndependenceTest
      Returns:
      This level.
    • setAlpha

      public void setAlpha(double alpha)
      Sets the significance level at which independence judgments should be made. Affects the cutoff for partial correlations to be considered statistically equal to zero.
      Specified by:
      setAlpha in interface IndependenceTest
      Parameters:
      alpha - The alpha level.
    • getVariables

      public List<Node> getVariables()
      Returns the list of variables over which this independence checker is capable of determining independence relations-- that is, all the variables in the given graph or the given data set.
      Specified by:
      getVariables in interface IndependenceTest
      Returns:
      This list.
    • determines

      public boolean determines(List<Node> z, Node x) throws UnsupportedOperationException
      Throws:
      UnsupportedOperationException - Since such code is not available.
    • getData

      public DataSet getData()
      Returns the data set being analyzed.
      Specified by:
      getData in interface IndependenceTest
      Returns:
      This dataset.
      See Also:
    • toString

      public String toString()
      Returns a string representation of this test.
      Specified by:
      toString in interface IndependenceTest
      Overrides:
      toString in class Object
      Returns:
      This string.
    • isVerbose

      public boolean isVerbose()
      Returns true if verbose output should be printed.
      Specified by:
      isVerbose in interface IndependenceTest
      Returns:
      True if the case.
    • setVerbose

      public void setVerbose(boolean verbose)
      Sets whether verbose output should be printed.
      Specified by:
      setVerbose in interface IndependenceTest
      Parameters:
      verbose - True, if so.
    • setNumFunctions

      public void setNumFunctions(int numFunctions)
      Sets the number of orthogonal functions to use to do the calculations.
      Parameters:
      numFunctions - This number.
    • getWidth

      public double getWidth()
      Returns the kernel width.
      Returns:
      This width.
    • setKernelMultiplier

      public void setKernelMultiplier(double multiplier)
      Returns the kernel multiplier.
      Parameters:
      multiplier - This multiplier.
    • setKernel

      public void setKernel(ConditionalCorrelationIndependence.Kernel kernel)
      Sets the kernel to be used.
      Parameters:
      kernel - This kernel.
      See Also:
    • setBasis

      public void setBasis(ConditionalCorrelationIndependence.Basis basis)
      Sets the basis used for the calculation.
      Parameters:
      basis - This basis.
      See Also:
    • setKernelRegressionSampleSize

      public void setKernelRegressionSampleSize(int size)
      Sets the kernel regression sample size.
      Parameters:
      size - This size.