Package edu.cmu.tetrad.search.ntad_test
Class Wishart
java.lang.Object
edu.cmu.tetrad.search.ntad_test.NtadTest
edu.cmu.tetrad.search.ntad_test.Wishart
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
ConstructorsConstructorDescriptionWishart(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 TypeMethodDescriptiondoubletetrad(int[][] tet) Computes the value of a statistical test based on the input tetrad configuration.doubletetrad(int[][] tet, boolean resample, double frac) Computes the value of a statistical test based on the given tetrad configuration, with optional resampling.doubletetrads(int[][]... tets) Returns the p-value for the tetrad.doubleReturns the p-value for the tetrad.Methods inherited from class edu.cmu.tetrad.search.ntad_test.NtadTest
allGreaterThanAlpha, variables
-
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 eachcovariances- a boolean flag indicating whether to compute covariances.
-
-
Method Details
-
tetrad
public double tetrad(int[][] tet, boolean resample, double frac) Description copied from class:NtadTestComputes 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:
tetradin classNtadTest- 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:NtadTestComputes 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:
tetradin classNtadTest- 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. -
tetrads
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.
-