Skip to content

citest

Conditional independence testing for missing data.

citest tests whether an outcome variable is independent of missingness, conditional on the observed covariates. It compares classifier performance in predicting missingness with and without the outcome, using multiple imputation and cross-fitting to produce a valid t-statistic and p-value.

import pandas as pd
from citest import CIMissTest
from citest.data import Dataset

data = pd.read_csv("my_data.csv")
ds = Dataset()
ds.make(data, y="outcome", expl_vars=["x1", "x2", "x3"])

test = CIMissTest(ds)
test.run()
test.summary()

Install

pip install citest

Next steps