Class IndTestBasisFunctionLrt
java.lang.Object
edu.cmu.tetrad.search.test.IndTestBasisFunctionLrt
- All Implemented Interfaces:
RawMarginalIndependenceTest, IndependenceTest, RowsSettable
@Deprecated
public class IndTestBasisFunctionLrt
extends Object
implements IndependenceTest, RawMarginalIndependenceTest, RowsSettable
Deprecated.
The IndTestBasisFunctionLrtCovariance class implements the IndependenceTest interface and provides functionality to
perform conditional independence tests using basis functions and likelihood ratio tests based on residual variances
and covariance matrices. It handles the transformations, embeddings, and statistical computations required to compute
p-values for testing conditional independence of variables.
This class is designed to work with a given dataset, perform embedding transformations based on specified basis function parameters, and efficiently compute the required statistics for hypothesis testing over sets of variables.
Note that compared to the full sample version of this class (see), this class uses a covariance matrix as a sufficient statistic and thus cannot do random row subsetting per test.
- Author:
- josephramsey, bryanandrews
-
Constructor Summary
ConstructorsConstructorDescriptionIndTestBasisFunctionLrt(DataSet dataSet, int truncationLimit, double lambda) Deprecated.Constructs an instance of IndTestBasisFunctionLrtCovariance.IndTestBasisFunctionLrt(DataSet dataSet, int truncationLimit, double lambda, MissingDataSpec spec) Deprecated.Constructs the test with an explicit missing-data specification. -
Method Summary
Modifier and TypeMethodDescriptioncheckIndependence(Node x, Node y, Set<Node> z) Deprecated.Tests for the conditional independence of two nodes given a set of conditioning nodes.doublecomputePValue(double[] x, double[] y) Deprecated.Computes the p-value for the statistical test of marginal independence between the two given variables represented by the input arrays.doublegetAlpha()Deprecated.Retrieves the significance level (alpha) for the statistical tests performed by this instance.getData()Deprecated.Retrieves the data model associated with this instance.Deprecated.Declares what this test can do, natively, with data containing missing values.getRows()Deprecated.Gets the rows to use for the test.Deprecated.Retrieves the list of nodes (variables) associated with this instance.booleanDeprecated.Indicates whether verbose mode is enabled.voidsetAlpha(double alpha) Deprecated.Sets the significance level.voidsetDoOneEquationOnly(boolean doOneEquationOnly) Deprecated.When calculation the score for X = <X1 = X, X2, X3,..., Xp> use the equation for X1 only, if true; otherwise, use equations for all of X1, X2,...,Xp.voidDeprecated.Sets the rows to use for the test.voidsetVerbose(boolean verbose) Deprecated.Enables or disables verbose output.Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IndependenceTest
canBeSubsampled, checkIndependence, determines, getCov, getDataSets, getSampleSize, getVariable, getVariableNames, indTestSubset, isPValueAProbability, toStringMethods inherited from interface RawMarginalIndependenceTest
computePValue
-
Constructor Details
-
IndTestBasisFunctionLrt
Deprecated.Constructs an instance of IndTestBasisFunctionLrtCovariance. This constructor initializes the object using a dataset and parameters related to truncation limit, basis type, and basis scale. It processes the input data into an embedded format, computes its covariance matrix, and sets up internal variables for further use.- Parameters:
dataSet- the input dataset containing the variables and data rows to be analyzed.truncationLimit- the limit to truncate the embeddings or basis functions in the data.lambda- Singularity lambda
-
IndTestBasisFunctionLrt
public IndTestBasisFunctionLrt(DataSet dataSet, int truncationLimit, double lambda, MissingDataSpec spec) Deprecated.Constructs the test with an explicit missing-data specification. On a data set with missing values the supported policies are LISTWISE and TESTWISE. Under TESTWISE the embedding carries NaN in every derived column of a variable wherever that variable is missing, and each test computes the covariance of the embedded columns of x, y, and z over the rows complete on all of them, using the number of such rows as the sample size of the likelihood ratio statistic. A null spec on missing data is treated as FAIL.- Parameters:
dataSet- The data being analyzed.truncationLimit- The truncation limit of the basis.lambda- The singularity lambda.spec- The missing-data specification, or null.
-
-
Method Details
-
computePValue
public double computePValue(double[] x, double[] y) Deprecated.Description copied from interface:RawMarginalIndependenceTestComputes the p-value for the statistical test of marginal independence between the two given variables represented by the input arrays.- Specified by:
computePValuein interfaceRawMarginalIndependenceTest- Parameters:
x- the first variable, represented as an array of doublesy- the second variable, represented as an array of doubles- Returns:
- the computed p-value for the test of marginal independence
-
checkIndependence
Deprecated.Tests for the conditional independence of two nodes given a set of conditioning nodes.- Specified by:
checkIndependencein interfaceIndependenceTest- Parameters:
x- The first variable to test, represented as a Node object.y- The second variable to test, represented as a Node object.z- The set of conditioning variables, represented as a Set of Node objects.- Returns:
- An IndependenceResult object representing the outcome of the independence test.
-
getVariables
Deprecated.Retrieves the list of nodes (variables) associated with this instance.- Specified by:
getVariablesin interfaceIndependenceTest- Returns:
- a list of Node objects representing the variables.
-
getData
Deprecated.Retrieves the data model associated with this instance.- Specified by:
getDatain interfaceIndependenceTest- Returns:
- the current DataModel instance held by this class.
-
isVerbose
public boolean isVerbose()Deprecated.Indicates whether verbose mode is enabled. Verbose mode, when enabled, typically results in detailed logging or diagnostic information being output.- Specified by:
isVerbosein interfaceIndependenceTest- Returns:
- true if verbose mode is enabled; false otherwise.
-
setVerbose
public void setVerbose(boolean verbose) Deprecated.Enables or disables verbose output.- Specified by:
setVerbosein interfaceIndependenceTest- Parameters:
verbose- True, if so.
-
getAlpha
public double getAlpha()Deprecated.Retrieves the significance level (alpha) for the statistical tests performed by this instance.- Specified by:
getAlphain interfaceIndependenceTest- Returns:
- the current significance level as a double.
-
setAlpha
public void setAlpha(double alpha) Deprecated.Sets the significance level.- Specified by:
setAlphain interfaceIndependenceTest- Parameters:
alpha- This level.
-
setDoOneEquationOnly
public void setDoOneEquationOnly(boolean doOneEquationOnly) Deprecated.When calculation the score for X = <X1 = X, X2, X3,..., Xp> use the equation for X1 only, if true; otherwise, use equations for all of X1, X2,...,Xp.- Parameters:
doOneEquationOnly- True if only the equation for X1 is to be used for X = X1,...,Xp.
-
getRows
Deprecated.Description copied from interface:RowsSettableGets the rows to use for the test. These rows over override testwise deletion if set.- Specified by:
getRowsin interfaceRowsSettable- Returns:
- The rows to use for the test. Can be null.
-
setRows
Deprecated.Description copied from interface:RowsSettableSets the rows to use for the test. This will override testwise deletion.- Specified by:
setRowsin interfaceRowsSettable- Parameters:
rows- The rows to use for the test. Can be null.
-
getMissingValueSupport
Deprecated.Declares what this test can do, natively, with data containing missing values. The default isMissingValueSupport.NONE, meaning that missingness must be handled upstream (e.g., by imputation, or by supplying an EM-estimated covariance matrix if the test consumes one); tests that handle missing values themselves should override this.TESTWISE: constructed with
MissingDataSpec.testwise(), each test uses the rows complete on the embedded columns of x, y, and z.- Specified by:
getMissingValueSupportin interfaceIndependenceTest- Returns:
- This support level.
-