citk.tests.regression_tests

Regression-based CI tests (survey family): RegressionCI, CiMM.

  • RegressionCI — tigramite’s mixed-data regression-residual test (requires the optional tigramite dependency).

  • CiMM — symmetric ci.mm test from R MXM (Tsagris et al., 2018; requires the [r] extra and the R MXM package installed in your R environment).

Classes

CiMM

Symmetric regression-based CI test from R MXM package (Tsagris et al., 2018).

RegressionCI

Tigramite's mixed-data regression-residual CI test.

Module Contents

class citk.tests.regression_tests.CiMM(data: numpy.ndarray, **kwargs: Any)[source]

Bases: citk.tests.base.CITKTest

Symmetric regression-based CI test from R MXM package (Tsagris et al., 2018).

ci.mm automatically selects the regression model based on variable type: linear regression for continuous, logistic for binary/categorical. It runs two asymmetric likelihood-ratio tests (X→Y and Y→X) and combines them. Handles mixed continuous/categorical data natively.

Initialise the test and (optionally) load a JSON p-value cache.

Parameters:
  • data – Sample matrix in shape (n, p).

  • cache_path – Optional path to a JSON cache file used to memoise p-values across calls. The cache is keyed by (data_hash, method_name, parameters_hash) and stamped with format_version so v0.1.0 caches can be detected and invalidated by future releases.

Raises:

TypeError – If kwargs contains keys outside cls.accepted_kwargs and cls._protocol_kwargs.

accepted_kwargs
data_type
supported_dtypes
class citk.tests.regression_tests.RegressionCI(data: numpy.ndarray, **kwargs: Any)[source]

Bases: citk.tests._backends._TigramiteBase

Tigramite’s mixed-data regression-residual CI test.

Initialise the test and (optionally) load a JSON p-value cache.

Parameters:
  • data – Sample matrix in shape (n, p).

  • cache_path – Optional path to a JSON cache file used to memoise p-values across calls. The cache is keyed by (data_hash, method_name, parameters_hash) and stamped with format_version so v0.1.0 caches can be detected and invalidated by future releases.

Raises:

TypeError – If kwargs contains keys outside cls.accepted_kwargs and cls._protocol_kwargs.

class_candidates = ['tigramite.independence_tests.regressionCI.RegressionCI']
method_name = 'regci'