Class BasisFunctionLrt
- All Implemented Interfaces:
IndependenceWrapper, HasParameters, TetradSerializable, Serializable
Changes from the pre-2026-8 implementation: this wrapper now delegates to
IndTestBasisFunctionBlocks, which tests block-level conditional independence using the
Wilks-lambda / Bartlett chi-square statistic over the basis-embedded blocks, with degrees of
freedom |X-block| x |Y-block| (rank-aware). The previous implementation
(IndTestBasisFunctionLrt, now deprecated) computed a
trace-averaged residual-variance ratio referred to chi-square with |Y-block| degrees of freedom;
that statistic is not a likelihood ratio for the block regression and its p-values are not
uniformly distributed under the null, which distorts consumers of the p-values such as PC-Max
sepset selection and the Markov Checker. The Wilks form is also symmetric in X and Y, whereas
the previous statistic was not.
The basis type is fixed to Legendre (basisType = 1), matching the published description of BF-LRT; use the BF-Blocks-Test wrapper to select other basis families. The SINGULARITY_LAMBDA parameter of the previous implementation no longer applies: the Wilks path handles near-singularity via rank-aware whitening with an internal ridge. This wrapper now supports EFFECTIVE_SAMPLE_SIZE.
- Version:
- $Id: $Id
- Author:
- josephramsey, bryanandrews
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInitializes a new instance of the BasisFunctionLrt wrapper. -
Method Summary
Modifier and TypeMethodDescriptionReturns the data type that the search requires, whether continuous, discrete, or mixed.Returns a short of this independence test.Returns the parameters that this search uses.getTest(DataModel dataSet, Parameters parameters) Returns true iff x and y are independent conditional on z for the given data set.
-
Constructor Details
-
BasisFunctionLrt
public BasisFunctionLrt()Initializes a new instance of the BasisFunctionLrt wrapper.
-
-
Method Details
-
getTest
Returns true iff x and y are independent conditional on z for the given data set.- Specified by:
getTestin interfaceIndependenceWrapper- Parameters:
dataSet- The data set to test independence against.parameters- The paramters of the test.- Returns:
- True iff independence holds.
-
getDescription
Returns a short of this independence test.- Specified by:
getDescriptionin interfaceIndependenceWrapper- Returns:
- This description.
-
getDataType
Returns the data type that the search requires, whether continuous, discrete, or mixed.- Specified by:
getDataTypein interfaceIndependenceWrapper- Returns:
- This type.
-
getParameters
Returns the parameters that this search uses.- Specified by:
getParametersin interfaceHasParameters- Specified by:
getParametersin interfaceIndependenceWrapper- Returns:
- A list of String names of parameters.
-