Class DeltaTetradTest2

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

public class DeltaTetradTest2 extends Object
Implements a test for simultaneously zero sextads in the style of Bollen, K. (1990). Sociological Methods and Research 19, 80-92 and Bollen and Ting, Confirmatory Tetrad Analysis.
Version:
$Id: $Id
Author:
josephramsey
  • Constructor Details

    • DeltaTetradTest2

      public DeltaTetradTest2(DataSet dataSet)
      Constructs a test using a given data set. If a data set is provided (that is, a tabular data set), fourth moment statistics can be calculated (p. 160); otherwise, it must be assumed that the data are multivariate Gaussian.
      Parameters:
      dataSet - The dataset to use.
    • DeltaTetradTest2

      public DeltaTetradTest2(ICovarianceMatrix cov)
      Constructs a test using the given covariance matrix. Fourth moment statistics are not caculated; it is assumed that the data are distributed as multivariate Gaussian.
      Parameters:
      cov - The covariance matrix to use.
  • Method Details

    • serializableInstance

      public static DeltaTetradTest2 serializableInstance()
      Generates a simple exemplar of this class to test serialization.
      Returns:
      This instance.
    • getPValue

      public double getPValue(TetradInt... tetrads)
      Takes a list of tetrads for the given data set and returns the chi square value for the test. We assume that the tetrads are non-redundant; if not, a matrix exception will be thrown.

      Calculates the T statistic (Bollen and Ting, p. 161). This is significant if tests as significant using the Chi Square distribution with degrees of freedom equal to the number of nonredundant tetrads tested.

      Parameters:
      tetrads - The tetrads for which a p-value is needed.
      Returns:
      The p-value.
    • calcChiSquare

      public double calcChiSquare(Set<TetradInt> tetrads)
      Calculates the chi-square statistic for a given set of tetrads. The method computes the T statistic for a set of non-redundant tetrads using either a covariance matrix or a data set depending on the provided inputs. The T statistic is significant if it follows a Chi-Square distribution with degrees of freedom equivalent to the number of non-redundant tetrads.
      Parameters:
      tetrads - A set of TetradInt objects representing the tetrads to evaluate.
      Returns:
      The chi-square value computed for the given set of tetrads.
    • getVariables

      public List<Node> getVariables()
      Returns the variables of the data being used.
      Returns:
      This list.