Class ResolveSepsets

java.lang.Object
edu.cmu.tetrad.search.utils.ResolveSepsets

public final class ResolveSepsets extends Object

Provides some utilities for resolving inconsistencies that arise between sepsets learned for overlapping datasets. This occurs frequently when using the DCI and ION algorithm. A reference is here:

Tillman, R. E., & Eberhardt, F. (2014). Learning causal structure from multiple datasets with similar variable sets. Behaviormetrika, 41(1), 41-64.

Version:
$Id: $Id
Author:
roberttillman
  • Constructor Details

    • ResolveSepsets

      public ResolveSepsets()
      The method to use for resolving sepsets
  • Method Details

    • isIndependentPooled

      public static boolean isIndependentPooled(ResolveSepsets.Method method, List<IndependenceTest> independenceTests, Node x, Node y, Set<Node> condSet) throws InterruptedException
      Tests for independence using one of the pooled methods
      Parameters:
      method - a ResolveSepsets.Method object
      independenceTests - a List object
      x - a Node object
      y - a Node object
      condSet - a Set object
      Returns:
      a boolean
      Throws:
      InterruptedException - if any.
    • getPValuePooled

      public static double getPValuePooled(ResolveSepsets.Method method, List<IndependenceTest> independenceTests, Node x, Node y, Set<Node> condSet) throws InterruptedException
      Tests for independence using one of the pooled methods and returns the combined p-value, on the scale where "independent iff p > alpha" is the correct decision for every method. Each is a valid one-sided combination of the per-data-set p-values under the null that the independence holds in every data set (small p-values are evidence of dependence):
      • fisher, fisher2: Fisher's chi-square on -2 sum log p (fisher2 skips NaN p-values).
      • tippett: min p, Sidak-adjusted: 1 - (1 - min p)^k.
      • stouffer: Phi(sum Phi^{-1}(p_i) / sqrt k), one-sided.
      • mudholkergeorge, mudholkergeorge2: the logit combination, one-sided t.
      • worsleyfriston: (max p)^k - a test of dependence in EVERY data set (conjunction), not in the shared structure; included for comparison.
      • average: the mean p-value, referred to its exact null (Irwin-Hall) distribution.
      The vote-style methods (majority, fdr, random, averagetest) carry no p-value; for them 1.0/0.0 is returned according to the vote.
      Parameters:
      method - a ResolveSepsets.Method object
      independenceTests - a List object
      x - a Node object
      y - a Node object
      condSet - a Set object
      Returns:
      the pooled p-value.
      Throws:
      InterruptedException - if any.
    • isIndependentPooledFisher

      public static boolean isIndependentPooledFisher(List<IndependenceTest> independenceTests, Node x, Node y, Set<Node> condSet) throws InterruptedException
      Checks independence from pooled samples using Fisher's method.

      See R. A. Fisher. Statistical Methods for Research Workers. Oliver and Boyd, 11th edition, 1950.

      Parameters:
      independenceTests - a List object
      x - a Node object
      y - a Node object
      condSet - a Set object
      Returns:
      a boolean
      Throws:
      InterruptedException - if any.
    • getPValuePooledFisher

      public static double getPValuePooledFisher(List<IndependenceTest> independenceTests, Node x, Node y, Set<Node> condSet) throws InterruptedException
      Returns the pooled p-value using Fisher's method.
      Parameters:
      independenceTests - a List object
      x - a Node object
      y - a Node object
      condSet - a Set object
      Returns:
      the pooled p-value.
      Throws:
      InterruptedException - if any.
    • isIndependentPooledFisher2

      public static boolean isIndependentPooledFisher2(List<IndependenceTest> independenceTests, Node x, Node y, Set<Node> condSet)
      Eliminates from considerations independence tests that cannot be evaluated (due to missing variables mainly).
      Parameters:
      independenceTests - a List object
      x - a Node object
      y - a Node object
      condSet - a Set object
      Returns:
      a boolean
    • getPValuePooledFisher2

      public static double getPValuePooledFisher2(List<IndependenceTest> independenceTests, Node x, Node y, Set<Node> condSet)
      Returns the pooled p-value using Fisher's method 2.
      Parameters:
      independenceTests - a List object
      x - a Node object
      y - a Node object
      condSet - a Set object
      Returns:
      the pooled p-value.
    • isIndependentPooledTippett

      public static boolean isIndependentPooledTippett(List<IndependenceTest> independenceTests, Node x, Node y, Set<Node> condSet) throws InterruptedException
      Checks independence from pooled samples using Tippett's method

      See L. H. C. Tippett. The Method of Statistics. Williams and Norgate, 1st edition, 1950.

      Parameters:
      independenceTests - a List object
      x - a Node object
      y - a Node object
      condSet - a Set object
      Returns:
      a boolean
      Throws:
      InterruptedException - if any.
    • getPValuePooledTippett

      public static double getPValuePooledTippett(List<IndependenceTest> independenceTests, Node x, Node y, Set<Node> condSet) throws InterruptedException
      Returns the pooled p-value using Tippett's method.
      Parameters:
      independenceTests - a List object
      x - a Node object
      y - a Node object
      condSet - a Set object
      Returns:
      the pooled p-value.
      Throws:
      InterruptedException - if any.
    • isIndependentPooledWilkinson

      public static boolean isIndependentPooledWilkinson(List<IndependenceTest> independenceTests, Node x, Node y, Set<Node> condSet, int r) throws InterruptedException
      Checks independence from pooled samples using Wilkinson's method

      I don't have a reference for this but its basically in between Tippett and Worsley and Friston.

      Parameters:
      independenceTests - a List object
      x - a Node object
      y - a Node object
      condSet - a Set object
      r - a int
      Returns:
      a boolean
      Throws:
      InterruptedException - if any.
    • isIndependentPooledWorsleyFriston

      public static boolean isIndependentPooledWorsleyFriston(List<IndependenceTest> independenceTests, Node x, Node y, Set<Node> condSet) throws InterruptedException
      Checks independence from pooled samples using Worsley and Friston's method

      See K. J. Worsely and K. J. Friston. A test for conjunction. Statistics and Probability Letters 2000.

      Parameters:
      independenceTests - a List object
      x - a Node object
      y - a Node object
      condSet - a Set object
      Returns:
      a boolean
      Throws:
      InterruptedException - if any.
    • isIndependentPooledStouffer

      public static boolean isIndependentPooledStouffer(List<IndependenceTest> independenceTests, Node x, Node y, Set<Node> condSet) throws InterruptedException
      Checks independence from pooled samples using Stouffer et al.'s method

      See S. A. Stouffer, E. A. Suchman, L. C. Devinney, S. A. Star, and R. M. Williams. The American Soldier: Vol. 1. Adjustment During Army Life. Princeton University Press, 1949.

      Parameters:
      independenceTests - a List object
      x - a Node object
      y - a Node object
      condSet - a Set object
      Returns:
      a boolean
      Throws:
      InterruptedException - if any.
    • isIndependentPooledMudholkerGeorge

      public static boolean isIndependentPooledMudholkerGeorge(List<IndependenceTest> independenceTests, Node x, Node y, Set<Node> condSet) throws InterruptedException
      Checks independence from pooled samples using Mudholker and George's method

      See G. S. Mudholkar and E. O. George. The logit method for combining probabilities. In J. Rustagi, editor, Symposium on Optimizing Method in Statistics, pages 345-366. Academic Press, 1979.

      Parameters:
      independenceTests - a List object
      x - a Node object
      y - a Node object
      condSet - a Set object
      Returns:
      a boolean
      Throws:
      InterruptedException - if any.
    • isIndependentPooledMudholkerGeorge2

      public static boolean isIndependentPooledMudholkerGeorge2(List<IndependenceTest> independenceTests, Node x, Node y, Set<Node> condSet)
      The same as isIndepenentPooledMudholkerGeoerge, except that only available independence tests are used.
      Parameters:
      independenceTests - a List object
      x - a Node object
      y - a Node object
      condSet - a Set object
      Returns:
      a boolean
    • isIndependentPooledAverage

      public static boolean isIndependentPooledAverage(List<IndependenceTest> independenceTests, Node x, Node y, Set<Node> condSet) throws InterruptedException
      Checks independence from pooled samples by taking the average p value
      Parameters:
      independenceTests - a List object
      x - a Node object
      y - a Node object
      condSet - a Set object
      Returns:
      a boolean
      Throws:
      InterruptedException - if any.
    • isIndependentPooledAverageTest

      public static boolean isIndependentPooledAverageTest(List<IndependenceTest> independenceTests, Node x, Node y, Set<Node> condSet) throws InterruptedException
      Checks independence from pooled samples by taking the average test statistic CURRENTLY ONLY WORKS FOR CHISQUARE TEST
      Parameters:
      independenceTests - a List object
      x - a Node object
      y - a Node object
      condSet - a Set object
      Returns:
      a boolean
      Throws:
      InterruptedException - if any.
    • isIndependentPooledRandom

      public static boolean isIndependentPooledRandom(List<IndependenceTest> independenceTests, Node x, Node y, Set<Node> condSet) throws InterruptedException
      Checks independence from pooled samples by randomly selecting a p value
      Parameters:
      independenceTests - a List object
      x - a Node object
      y - a Node object
      condSet - a Set object
      Returns:
      a boolean
      Throws:
      InterruptedException - if any.