Class Wishart

java.lang.Object
edu.cmu.tetrad.search.ntad_test.NtadTest
edu.cmu.tetrad.search.ntad_test.Wishart

public class Wishart extends NtadTest
The Wishart class is a concrete implementation of the NtadTest abstract class, specifically for statistical tests based on the Wishart distribution. It performs calculations for tetrads and their associated p-values using covariance matrices derived from the input data.
Author:
bryanandrews
  • Constructor Summary

    Constructors
    Constructor
    Description
    Wishart(org.ejml.simple.SimpleMatrix df, boolean covariances)
    Constructs a Wishart test object based on the given data matrix and covariance option.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    tetrad(int[][] tet)
    Computes the value of a statistical test based on the input tetrad configuration.
    double
    tetrad(int[][] tet, boolean resample, double frac)
    Computes the value of a statistical test based on the given tetrad configuration, with optional resampling.
    double
    tetrads(int[][]... tets)
    Returns the p-value for the tetrad.
    double
    tetrads(List<int[][]> tets)
    Returns the p-value for the tetrad.

    Methods inherited from class edu.cmu.tetrad.search.ntad_test.NtadTest

    allGreaterThanAlpha, variables

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Wishart

      public Wishart(org.ejml.simple.SimpleMatrix df, boolean covariances)
      Constructs a Wishart test object based on the given data matrix and covariance option. This method initializes
      Parameters:
      df - the input data matrix as a SimpleMatrix object, where each row represents an observation and each
      covariances - a boolean flag indicating whether to compute covariances.
  • Method Details

    • tetrad

      public double tetrad(int[][] tet, boolean resample, double frac)
      Description copied from class: NtadTest
      Computes the value of a statistical test based on the given tetrad configuration, with optional resampling. A tetrad is a set of indices representing structural relationships among variables. This method evaluates the statistical consistency of such configurations.
      Specified by:
      tetrad in class NtadTest
      Parameters:
      tet - a 2D integer array where each inner array defines a tetrad configuration. Each configuration specifies indices representing structural relationships among variables.
      resample - a boolean indicating whether resampling should be applied to the data matrix for the computation.
      frac - a double value representing the fraction of data to use during resampling, ignored if resample is false.
      Returns:
      a double value representing the computed result of the statistical tetrad test.
    • tetrad

      public double tetrad(int[][] tet)
      Description copied from class: NtadTest
      Computes the value of a statistical test based on the input tetrad configuration. A tetrad is a set of indices specifying structural relationships between variables, and this method evaluates the statistical consistency of such configurations.
      Specified by:
      tetrad in class NtadTest
      Parameters:
      tet - a 2D integer array where each inner array defines a tetrad configuration. Each tetrad specifies indices representing a structural relationship among variables.
      Returns:
      a double value representing the computed result of the statistical tetrad test.
    • tetrads

      public double tetrads(int[][]... tets)
      Returns the p-value for the tetrad. This constructor is required by the interface, though in truth it will throw and exception if more than one tetrad is provided.
      Specified by:
      tetrads in class NtadTest
      Parameters:
      tets - A single tetrad.
      Returns:
      The p-value for the tetrad.
    • tetrads

      public double tetrads(List<int[][]> tets)
      Returns the p-value for the tetrad. This constructor is required by the interface, though in truth it will throw and exception if more than one tetrad is provided.
      Specified by:
      tetrads in class NtadTest
      Parameters:
      tets - A single tetrad.
      Returns:
      The p-value for the tetrad.