Package edu.cmu.tetrad.search.utils
Class DeltaTetradTest
java.lang.Object
edu.cmu.tetrad.search.utils.DeltaTetradTest
Implements a test for simultaneously zero tetrads in Bollen, K. (1990). "Outlier screening and distribution-free test
for vanishing tetrads." Sociological Methods and Research 19, 80-92 and Bollen and Ting, Confirmatory Tetrad
Analysis.
- Version:
- $Id: $Id
- Author:
- josephramsey
-
Constructor Summary
ConstructorsConstructorDescriptionDeltaTetradTest
(DataSet dataSet) Constructs a test using a given data set.Constructs a test using the given covariance matrix. -
Method Summary
Modifier and TypeMethodDescriptiondouble
calcChiSquare
(Tetrad... tetrads) Takes a list of tetrads for the given data set and returns the chi square value for the test.double
getPValue.double
Returns a p-value for the given list of tetrad.
-
Constructor Details
-
DeltaTetradTest
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.
-
DeltaTetradTest
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 covaraince matrix to use.
-
-
Method Details
-
calcChiSquare
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 chi-square is needed.- Returns:
- a double
-
getPValue
public double getPValue()getPValue.
- Returns:
- the p value for the most recent test.
-
getPValue
Returns a p-value for the given list of tetrad.- Parameters:
tetrads
- The tetrad for which a p-vaue is needed.- Returns:
- The p-value.
-