Class BasisFunctionLrt

java.lang.Object
edu.cmu.tetrad.algcomparison.independence.BasisFunctionLrt
All Implemented Interfaces:
IndependenceWrapper, HasParameters, TetradSerializable, Serializable

@TestOfIndependence(name="BF-LRT (Basis Function Likelihood Ratio Test)", command="bf-lr-test", dataType=Mixed) @Mixed @General public class BasisFunctionLrt extends Object implements IndependenceWrapper
Wrapper for BF-LRT (Basis Function Likelihood Ratio Test).

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 Details

    • BasisFunctionLrt

      public BasisFunctionLrt()
      Initializes a new instance of the BasisFunctionLrt wrapper.
  • Method Details