Package edu.cmu.tetrad.search.ntad_test
Class BollenTing
java.lang.Object
edu.cmu.tetrad.search.ntad_test.NtadTest
edu.cmu.tetrad.search.ntad_test.BollenTing
The BollenTing class extends the NtadTest class and provides statistical methods for computing tetrad and tetrads
statistics. These computations are used in hypothesis testing and involve tetrad determinants and p-values derived
from chi-squared distributions. The class supports handling single and multiple tetrads, as well as flexible options
such as resampling and fractional sampling rates.
-
Constructor Summary
ConstructorsConstructorDescriptionBollenTing(org.ejml.simple.SimpleMatrix df, boolean correlations, int ess) Constructs a BollenTing object for performing statistical operations.BollenTing(org.ejml.simple.SimpleMatrix df, int ess) Constructs a BollenTing object for performing statistical operations. -
Method Summary
Modifier and TypeMethodDescriptiondoublentad(int[][] ntad) Computes the NTAD statistic for a given 2D array of integer pairs.doublentad(int[][] ntad, boolean resample, double frac) Computes the NTAD statistic for a given 2D array of integer pairs.doublentads(int[][]... ntads) Computes the NTADS (Non-Testable Assumption Detection Score) for a given set of NTAD structures, each passed as a 2D array.doubleComputes a statistical measure based on the input list of ntad configurations.doubleComputes the NTADS for a given list of NTAD (Non-Testable Assumption Detection) structures.Methods inherited from class edu.cmu.tetrad.search.ntad_test.NtadTest
allGreaterThanAlpha, variables
-
Constructor Details
-
BollenTing
public BollenTing(org.ejml.simple.SimpleMatrix df, int ess) Constructs a BollenTing object for performing statistical operations. This constructor initializes the instance using a data matrix and assumes the input matrix is treated as raw data from which correlations should be calculated.- Parameters:
df- the input data matrix as a SimpleMatrix object, where each row represents an observation and each column represents a variable.ess- an integer value representing the effective sample size used in statistical computations.
-
BollenTing
public BollenTing(org.ejml.simple.SimpleMatrix df, boolean correlations, int ess) Constructs a BollenTing object for performing statistical operations. This constructor initializes the instance using a data matrix and a boolean flag indicating whether corelation matrices should be used directly or computed from the input data.- Parameters:
df- the input data matrix as a SimpleMatrix object, where each row represents an observation and each column represents a variable.correlations- a boolean flag that determines whether the input matrix is treated as a correlation matrix (true) or as raw data from which correlations should be calculated (false).ess- the effective sample size used in the computation, or -1 if the actual sample size is to be used.
-
-
Method Details
-
ntad
public double ntad(int[][] ntad, boolean resample, double frac) Computes the NTAD statistic for a given 2D array of integer pairs. The method determines the fit of specified pairs in the provided NTAD based on correlation computations and statistical distribution measures. An optional flag allows for resampling based on input data with a specified fraction, altering the results dynamically.- Specified by:
ntadin classNtadTest- Parameters:
ntad- a 2D array where each sub-array contains pairs of integers indicating relationships to evaluate.resample- a boolean flag that specifies whether the computations should involve resampling the data.frac- a double representing the fraction of the data to use if resampling is enabled.- Returns:
- a double value representing the NTAD significance statistic, indicating fit or anomalies.
-
ntads
Computes the NTADS for a given list of NTAD (Non-Testable Assumption Detection) structures. Each NTAD structure is represented as a 2D array of integer pairs, where each pair denotes a set of variables to evaluate. This method calculates the NTADS significance statistic using correlation matrices and chi-squared distribution for hypothesis testing. It optionally supports resampling to dynamically alter the effective sample size.- Parameters:
ntads- a list of 2D arrays, where each 2D array contains integer pairs representing the NTAD structures to evaluateresample- a boolean flag indicating whether resampling of the data rows should be performed for the calculationsfrac- a double representing the fraction of the data to sample when resampling is enabled- Returns:
- a double value representing the NTADS significance statistic, with a higher value indicating a better fit or reduced anomalies
-
ntad
public double ntad(int[][] ntad) Computes the NTAD statistic for a given 2D array of integer pairs. This method packages the single NTAD structure into a list and delegates the computation to the NTADS method. -
ntads
public double ntads(int[][]... ntads) Computes the NTADS (Non-Testable Assumption Detection Score) for a given set of NTAD structures, each passed as a 2D array. This method converts variable-length NTAD arrays into a list and delegates the computation to the overloaded ntads method.- Specified by:
ntadsin classNtadTest- Parameters:
ntads- a variable-length array where each element is a 2D array containing integer pairs that define the NTAD structures to evaluate.- Returns:
- a double value representing the NTADS significance statistic, with a higher value indicating a better fit or reduced anomalies.
-
ntads
Description copied from class:NtadTestComputes a statistical measure based on the input list of ntad configurations. Each ntad configuration represents a set of structural relationships among variables. This method evaluates and combines the statistical results of all provided configurations.- Specified by:
ntadsin classNtadTest- Parameters:
ntads- a list of 2D integer arrays where each array contains multiple ntad configurations. Each configuration is a set of integer indices representing structural relationships.- Returns:
- a double value representing the combined statistical measure for the provided ntad configurations.
-