Class TetradTestDiscrete

java.lang.Object
edu.cmu.tetrad.search.utils.TetradTestDiscrete
All Implemented Interfaces:
TetradTest

public final class TetradTestDiscrete extends Object implements TetradTest
Implements a test of tetrad constraints with discrete variables. We are assuming that variables are ordinal or binary. Such tests are a core statistical procedure in algorithm BuildPureClusters and Purify. An "underlying latent variable" approach is used to test tetrads indirectly by fitting discrete one-factor and two-factor models. See Bartholomew and Knott (1999) for details. A two-stage procedure for fitting polychorics correlations (Olsson, 1979) and a chi-square test of tetrad constraints over those correlations is the key for this method. References: Bartholomew, D. and Knott, M. (1999). Latent Variable Models and Factor Analysis, 2nd edition. Arnold. Olsson, Ulf (1979). "Maximum likelihood estimation of the polychoric correlation coefficient". Psychometrika 44, 443-460. Stroud, A. and Secrest D. (1966) Gaussian Quadrature Formulas. Prentice Hall.
Author:
Ricardo Silva
  • Field Details

    • verbose

      public boolean verbose
  • Constructor Details

    • TetradTestDiscrete

      public TetradTestDiscrete(DataSet dataSet, double sig)
  • Method Details

    • getVarNames

      public String[] getVarNames()
      Specified by:
      getVarNames in interface TetradTest
    • getVariables

      public List<Node> getVariables()
      Specified by:
      getVariables in interface TetradTest
    • getDataSet

      public DataSet getDataSet()
      Specified by:
      getDataSet in interface TetradTest
    • resetCache

      public void resetCache()
    • getSignificance

      public double getSignificance()
      Specified by:
      getSignificance in interface TetradTest
    • setSignificance

      public void setSignificance(double sig)
      Specified by:
      setSignificance in interface TetradTest
    • tetradScore

      public int tetradScore(int i, int j, int k, int l)
      Specified by:
      tetradScore in interface TetradTest
    • tetradScore1

      public boolean tetradScore1(int v1, int v2, int v3, int v4)
      Tests the tetrad (v1, v3) x (v2, v4) = (v1, v4) x (v2, v3), and only that.
      Specified by:
      tetradScore1 in interface TetradTest
    • tetradScore3

      public boolean tetradScore3(int v1, int v2, int v3, int v4)
      Tests if all tetrad constraints hold
      Specified by:
      tetradScore3 in interface TetradTest
    • tetradPValue

      public double tetradPValue(int v1, int v2, int v3, int v4)
      Specified by:
      tetradPValue in interface TetradTest
    • tetradHolds

      public boolean tetradHolds(int i, int j, int k, int l)
      Specified by:
      tetradHolds in interface TetradTest
    • oneFactorTest

      public boolean oneFactorTest(int i, int j, int k, int l)
      Specified by:
      oneFactorTest in interface TetradTest
    • oneFactorTest

      public boolean oneFactorTest(int i, int j, int k, int l, int x)
      Specified by:
      oneFactorTest in interface TetradTest
    • twoFactorTest

      public boolean twoFactorTest(int i, int j, int k, int l)
      Specified by:
      twoFactorTest in interface TetradTest
    • twoFactorTest

      public boolean twoFactorTest(int i, int j, int k, int l, int x)
      Specified by:
      twoFactorTest in interface TetradTest
    • twoFactorTest

      public boolean twoFactorTest(int i, int j, int k, int l, int x, int y)
      Specified by:
      twoFactorTest in interface TetradTest
    • getCovMatrix

      public ICovarianceMatrix getCovMatrix()
      Specified by:
      getCovMatrix in interface TetradTest